• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetFactory函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetFactory函数的典型用法代码示例。如果您正苦于以下问题:C++ GetFactory函数的具体用法?C++ GetFactory怎么用?C++ GetFactory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetFactory函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SDL_LockAudio

bool Game::Update(GameTime)
{
	time.StartFrame();

	SDL_LockAudio();
	{
		ParseInput();
		if (Transitioning())
		{
			Transist();
		}
		else if (phase)
		{
			phase->Update(time);
		}
	}
	SDL_UnlockAudio();

	GetFactory()->Purge();

	if (finished)
	{
		SDL_CloseAudio();
	}

	return !finished;
}
开发者ID:MihailTrajkovski,项目名称:xiq,代码行数:27,代码来源:Game.cpp


示例2: GetFactory

bool LevelWorkerGameObjects::RemoveFeature()
{
    // Remove this worker from the ID->Worker map maintained by the factory.
    GetFactory()->ClearWorkerForObject(m_pGo->GetId());
    // Remove the object.
    Engine::Instance()->ClearGameObject(m_pGo->GetId());
    return true;
}
开发者ID:jason-amju,项目名称:amju-scp,代码行数:8,代码来源:LevelWorkerGameObjects.cpp


示例3: GetParameterList

  void RebalanceMapFactory<LocalOrdinal, GlobalOrdinal, Node>::DeclareInput(Level & currentLevel) const {
    const Teuchos::ParameterList & pL = GetParameterList();
    std::string mapName                        = pL.get<std::string> ("Map name");
    Teuchos::RCP<const FactoryBase> mapFactory = GetFactory          ("Map factory");
    currentLevel.DeclareInput(mapName,mapFactory.get(),this);

    Input(currentLevel, "Importer");
  } //DeclareInput()
开发者ID:KineticTheory,项目名称:Trilinos,代码行数:8,代码来源:MueLu_RebalanceMapFactory_def.hpp


示例4: GetFactory

bool pgCollection::IsCollectionFor(pgObject *obj)
{
	if (!obj)
		return false;
	pgaFactory *f = obj->GetFactory();
	if (!f)
		return false;
	return GetFactory() == f->GetCollectionFactory();
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:9,代码来源:pgCollection.cpp


示例5: Input

  void SaPFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>::DeclareInput(Level &fineLevel, Level &coarseLevel) const {
    Input(fineLevel, "A");

    // Get default tentative prolongator factory
    // Getting it that way ensure that the same factory instance will be used for both SaPFactory and NullspaceFactory.
    RCP<const FactoryBase> initialPFact = GetFactory("P");
    if (initialPFact == Teuchos::null) { initialPFact = coarseLevel.GetFactoryManager()->GetFactory("Ptent"); }
    coarseLevel.DeclareInput("P", initialPFact.get(), this); // --
  }
开发者ID:abhishek4747,项目名称:trilinos,代码行数:9,代码来源:MueLu_SaPFactory_def.hpp


示例6: m

  void RebalanceMapFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(Level &level) const {
    FactoryMonitor m(*this, "Build", level);

    //Teuchos::RCP<Teuchos::FancyOStream> fos = Teuchos::getFancyOStream(Teuchos::rcpFromRef(std::cout));

    // extract data from Level object
    const Teuchos::ParameterList & pL = GetParameterList();
    std::string mapName = pL.get<std::string> ("Map name");
    Teuchos::RCP<const FactoryBase> mapFactory = GetFactory ("Map factory");

    RCP<const Import> rebalanceImporter = Get<RCP<const Import> >(level, "Importer");

    if(rebalanceImporter != Teuchos::null) {
      // input map (not rebalanced)
      RCP<const Map> map = level.Get< RCP<const Map> >(mapName,mapFactory.get());

      // create vector based on input map
      // Note, that the map can be a part only of the full map stored in rebalanceImporter.getSourceMap()
      RCP<Vector> v = VectorFactory::Build(map);
      v->putScalar(1.0);

      // create a new vector based on the full rebalanceImporter.getSourceMap()
      // import the partial map information to the full source map
      RCP<const Import> blowUpImporter = ImportFactory::Build(map, rebalanceImporter->getSourceMap());
      RCP<Vector> pv = VectorFactory::Build(rebalanceImporter->getSourceMap());
      pv->doImport(*v,*blowUpImporter,Xpetra::INSERT);

      // do rebalancing using rebalanceImporter
      RCP<Vector> ptv = VectorFactory::Build(rebalanceImporter->getTargetMap());
      ptv->doImport(*pv,*rebalanceImporter,Xpetra::INSERT);

      if (pL.get<bool>("repartition: use subcommunicators") == true)
        ptv->replaceMap(ptv->getMap()->removeEmptyProcesses());

      // reconstruct rebalanced partial map
      Teuchos::ArrayRCP< const Scalar > ptvData = ptv->getData(0);
      std::vector<GlobalOrdinal> localGIDs;  // vector with GIDs that are stored on current proc

      for (size_t k = 0; k < ptv->getLocalLength(); k++) {
        if(ptvData[k] == 1.0) {
          localGIDs.push_back(ptv->getMap()->getGlobalElement(k));
        }
      }

      const Teuchos::ArrayView<const GlobalOrdinal> localGIDs_view(&localGIDs[0],localGIDs.size());

      Teuchos::RCP<const Map> localGIDsMap = MapFactory::Build(
          map->lib(),
          Teuchos::OrdinalTraits<int>::invalid(),
          localGIDs_view,
          0, ptv->getMap()->getComm());  // use correct communicator here!

      // store rebalanced partial map using the same name and generating factory as the original map
      // in the level class
      level.Set(mapName, localGIDsMap, mapFactory.get());
    }
  } //Build()
开发者ID:KineticTheory,项目名称:Trilinos,代码行数:57,代码来源:MueLu_RebalanceMapFactory_def.hpp


示例7: GetFactory

//---------------------------------------------------------------------------
// 初期化
bool TModuleJava::Initialize(void){
	JavaVM *vm; JNIEnv *env;
	if (JNI_OK!=setup(GetFactory().GetLogger(), &vm, &env)) return false;

	obj_saori=(jobject)handle;
	jclass lref_cls=env->GetObjectClass(obj_saori);
	cls_saori=(jclass)env->NewGlobalRef(lref_cls);

	mid_load=env->GetMethodID(cls_saori, "load", "([B)Z");
	mid_unload=env->GetMethodID(cls_saori, "unload", "()Z");
	mid_request=env->GetMethodID(cls_saori, "request", "([B)[B");

	if (mid_request==NULL){
		GetFactory().GetLogger().GetStream(LOG_ERROR) << "[SAORI Java] importing 'request' from ("+path+") failed." << endl;
		return false;
	}
	return true;
}
开发者ID:Narazaka,项目名称:kawari,代码行数:20,代码来源:saori_java.cpp


示例8: Input

 void RigidBodyModeFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps>::DeclareInput(Level &currentLevel) const {
   if (currentLevel.IsAvailable(nspName_, NoFactory::get()) == false && currentLevel.GetLevelID() == 0) {
     Input(currentLevel, "A");
     //Input(currentLevel,"Coordinates");
   }
   if (currentLevel.GetLevelID() !=0) {
     currentLevel.DeclareInput("Nullspace", GetFactory(nspName_).get(), this); /* ! "Nullspace" and nspName_ mismatch possible here */
   }
 }
开发者ID:gitter-badger,项目名称:quinoa,代码行数:9,代码来源:MueLu_RigidBodyModeFactory_def.hpp


示例9: GetFactory

IGameComponent* GameComponentCreator::CreateObject(const core::string&name,GameEntityManager*mngr)
{
	IGameComponentFactory* f= GetFactory(name);
	if(!f)
	{
		gLogManager.log(mT("Game Component Factory with type: '")+name+mT("' was not found"),ELL_WARNING,EVL_Normal);
		return 0;
	}
	return f->CreateComponent(mngr);
}
开发者ID:yingzhang536,项目名称:mrayy-Game-Engine,代码行数:10,代码来源:GameComponentCreator.cpp


示例10: Input

void PermutationFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps>::DeclareInput(Level &currentLevel) const {
  Input(currentLevel, "A");

  const ParameterList & pL = GetParameterList();
  std::string mapName                        = pL.get<std::string> ("PermutationRowMapName");
  Teuchos::RCP<const FactoryBase> mapFactory = GetFactory          ("PermutationRowMapFactory");

  if(mapName.length() > 0 ) {
    currentLevel.DeclareInput(mapName,mapFactory.get(),this);
  }
}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:11,代码来源:MueLu_PermutationFactory_def.hpp


示例11: Request

//---------------------------------------------------------------------------
// SAORI/1.0 Request
string TModuleJava::Request(const string &req){
	if (!mid_request) return ("");

	JavaVM *vm; JNIEnv *env;
	if (JNI_OK!=setup(GetFactory().GetLogger(), &vm, &env)) return ("");

	jobject obj_saori=(jobject)handle;

	return jba2string(env, (jbyteArray)env->CallObjectMethod(
		obj_saori, mid_request, string2jba(env, req)));
}
开发者ID:Narazaka,项目名称:kawari,代码行数:13,代码来源:saori_java.cpp


示例12: GetFactory

void Ghost::Process()
{
    --seconds_until_respawn_;
    if (seconds_until_respawn_ < 0)
    {
        size_t net_id = GetFactory().GetNetId(GetId());
        if (net_id)
        {
            auto login_mob = GetFactory().Create<IMob>(LoginMob::T_ITEM_S());

            GetFactory().SetPlayerId(net_id, login_mob.ret_id());
            if (GetId() == GetMob().ret_id())
            {
                ChangeMob(login_mob);
            }
            delThis();
            //qDebug() << "Ghost deleted: net_id: " << net_id;
        }
    }
}
开发者ID:Disasm,项目名称:karya-valya,代码行数:20,代码来源:Ghost.cpp


示例13:

pgaFactory *pgaFactory::GetFactoryByMetaType(const int type)
{
	int i;
	pgaFactory *factory;

	for (i = FACTORY_OFFSET ; (factory = GetFactory(i)) != 0 ; i++)
	{
		if (factory->GetMetaType() == type)
			return factory;
	}
	return 0;
}
开发者ID:AnnaSkawinska,项目名称:pgadmin3,代码行数:12,代码来源:factory.cpp


示例14: PlaySoundIfVisible

void Grille::AttackBy(id_ptr_on<Item> item)
{
    if (id_ptr_on<Wirecutters> w = item)
    {
        PlaySoundIfVisible("Wirecutter.ogg", owner.ret_id());
        if (!cutted_)
        {
            SetState("brokengrille");
            SetPassable(D_ALL, Passable::FULL);
            cutted_ = true;
            GetFactory().Create<IOnMapObject>(Rod::T_ITEM_S(), GetOwner());
        }
        else
        {
            GetFactory().Create<IOnMapObject>(Rod::T_ITEM_S(), GetOwner());
            delThis();
        }
    }
    else
        Structure::AttackBy(item);
}
开发者ID:Disasm,项目名称:karya-valya,代码行数:21,代码来源:Grille.cpp


示例15: Input

  void UncoupledAggregationFactory<LocalOrdinal, GlobalOrdinal, Node, LocalMatOps>::DeclareInput(Level& currentLevel) const {
    Input(currentLevel, "Graph");
    Input(currentLevel, "DofsPerNode");

    const ParameterList& pL = GetParameterList();

    std::string mapOnePtName = pL.get<std::string>("OnePt aggregate map name");
    if (mapOnePtName.length() > 0) {
      RCP<const FactoryBase> mapOnePtFact = GetFactory("OnePt aggregate map factory");
      currentLevel.DeclareInput(mapOnePtName, mapOnePtFact.get());
    }
  }
开发者ID:rorypeck,项目名称:trilinos,代码行数:12,代码来源:MueLu_UncoupledAggregationFactory_def.hpp


示例16: SpewOutputFunc

//-----------------------------------------------------------------------------
// Create all singleton systems
//-----------------------------------------------------------------------------
bool CHLModelViewerApp::Create()
{
	SpewOutputFunc( HLMVSpewFunc );

	g_dxlevel = CommandLine()->ParmValue( "-dx", 0 );
	g_bOldFileDialogs = ( CommandLine()->FindParm( "-olddialogs" ) != 0 );

	AppSystemInfo_t appSystems[] = 
	{
		{ "materialsystem.dll",		MATERIAL_SYSTEM_INTERFACE_VERSION },
		{ "studiorender.dll",		STUDIO_RENDER_INTERFACE_VERSION },
		{ "vphysics.dll",			VPHYSICS_INTERFACE_VERSION },
		{ "datacache.dll",			DATACACHE_INTERFACE_VERSION },
		{ "datacache.dll",			MDLCACHE_INTERFACE_VERSION },
		{ "datacache.dll",			STUDIO_DATA_CACHE_INTERFACE_VERSION },
		{ "soundemittersystem.dll",	SOUNDEMITTERSYSTEM_INTERFACE_VERSION },
		{ "soundsystem.dll",		SOUNDSYSTEM_INTERFACE_VERSION },

		{ "", "" }	// Required to terminate the list
	};

	if ( !AddSystems( appSystems ) ) 
		return false;

	g_pFileSystem = (IFileSystem*)FindSystem( FILESYSTEM_INTERFACE_VERSION );
	g_pMaterialSystem = (IMaterialSystem*)FindSystem( MATERIAL_SYSTEM_INTERFACE_VERSION );
	g_pMaterialSystemHardwareConfig = (IMaterialSystemHardwareConfig*)FindSystem( MATERIALSYSTEM_HARDWARECONFIG_INTERFACE_VERSION );
	g_pStudioRender = (IStudioRender*)FindSystem( STUDIO_RENDER_INTERFACE_VERSION );
	g_pDataCache = (IDataCache*)FindSystem( DATACACHE_INTERFACE_VERSION );
	g_pMDLCache = (IMDLCache*)FindSystem( MDLCACHE_INTERFACE_VERSION );
	g_pStudioDataCache = (IStudioDataCache*)FindSystem( STUDIO_DATA_CACHE_INTERFACE_VERSION ); 
	physcollision = (IPhysicsCollision *)FindSystem( VPHYSICS_COLLISION_INTERFACE_VERSION );
	physprop = (IPhysicsSurfaceProps *)FindSystem( VPHYSICS_SURFACEPROPS_INTERFACE_VERSION );
	g_pSoundEmitterBase = (ISoundEmitterSystemBase *)FindSystem( SOUNDEMITTERSYSTEM_INTERFACE_VERSION );
	g_pSoundSystem = (ISoundSystem *)FindSystem( SOUNDSYSTEM_INTERFACE_VERSION );

	if ( !g_pFileSystem || !physprop || !physcollision || !g_pMaterialSystem || !g_pStudioRender || !g_pMDLCache || !g_pDataCache )
	{
		Error("Unable to load required library interface!\n");
	}

	const char *pShaderDLL = CommandLine()->ParmValue("-shaderdll");
	if(!pShaderDLL)
	{
		pShaderDLL = "shaderapidx9.dll";
	}
	g_pMaterialSystem->SetShaderAPI( pShaderDLL );

	g_Factory = GetFactory();

	return true;
}
开发者ID:newroob,项目名称:bg2-2007,代码行数:55,代码来源:mdlviewer.cpp


示例17: GetFactory

bool CDmxConvertApp::PreInit( )
{
	CreateInterfaceFn factory = GetFactory();
	ConnectTier1Libraries( &factory, 1 );
	ConnectTier2Libraries( &factory, 1 );

	if ( !g_pFullFileSystem || !g_pDataModel )
	{
		Warning( "DMXConvert is missing a required interface!\n" );
		return false;
	}
	return true;
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:13,代码来源:dmxconvert.cpp


示例18: Init

void CText::Init(CViewport* pcViewport)
{
	CDrawable::Init(pcViewport);

	mcTextData.Init(GetFactory()->mpcDefaultFont);
	mfAlpha = 1.0f;
	mbCaretVisible = FALSE;
	msCaretPos.Init(0, 0);

	mpcCaret = gcUnknowns.Add<CCaret>();
	mpcCaret->Init(mpcViewport);
	AddComponent(mpcCaret);

}
开发者ID:andrewpaterson,项目名称:Codaphela.Library,代码行数:14,代码来源:Text.cpp


示例19: FGFUTIL_SKIP_INT32S

FdoIDirectPosition* FdoFgfCurveString::GetStartPosition() const
{
	m_streamPtr = m_data;

	// Skip over geometrytype
	FGFUTIL_SKIP_INT32S(&m_streamPtr, m_streamEnd, 1);

	// read FdoDimensionality
	FdoInt32 dimensionality = FgfUtil::ReadInt32(&m_streamPtr, m_streamEnd);
	
    FdoPtr<FdoFgfGeometryFactory> gf = GetFactory();

    // Read startPos
	return FgfUtil::ReadDirectPosition(gf, dimensionality, &m_streamPtr, m_streamEnd);
}
开发者ID:johanvdw,项目名称:fdo-git-mirror,代码行数:15,代码来源:CurveString.cpp


示例20: IVistaDeviceDriver

/*============================================================================*/
VistaSpaceNavigator::VistaSpaceNavigator(IVistaDriverCreationMethod *crm)
	: IVistaDeviceDriver(crm)
{
	VistaDeviceSensor *pSensor = new VistaDeviceSensor;
	AddDeviceSensor( pSensor );
	pSensor->SetMeasureTranscode( GetFactory()->GetTranscoderFactoryForSensor("")->CreateTranscoder() );

	// using the USB connection we have to poll explicitly,
	// since there is no activity on the file handle, but we
	// use ioctls to make the read/write requests.
	SetUpdateType(IVistaDeviceDriver::UPDATE_EXPLICIT_POLL);
	m_pConAsp = new VistaDriverConnectionAspect;
	RegisterAspect( m_pConAsp );

	m_pConAsp->SetConnection( 0, NULL, "MAIN", true );
}
开发者ID:HBPVIS,项目名称:Vista,代码行数:17,代码来源:VistaSpaceNavigatorDriver.cpp



注:本文中的GetFactory函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetFd函数代码示例发布时间:2022-05-30
下一篇:
C++ GetExtraStyle函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap