您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetFactory函数代码示例

51自学网 2021-06-01 21:07:39
  C++
这篇教程C++ GetFactory函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例11: Request

//---------------------------------------------------------------------------// SAORI/1.0 Requeststring 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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例21: MathLib_Init

//-----------------------------------------------------------------------------// Init, shutdown//-----------------------------------------------------------------------------bool CSceneViewerApp::PreInit( ){	if ( !BaseClass::PreInit() )		return false;	MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f, false, false, false, false );	if ( !g_pFullFileSystem || !g_pMaterialSystem || !g_pDataModel || !g_pDmElementFramework || !g_pStudioRender || !g_pDataCache || !g_pMDLCache || !g_pVGuiSurface || !g_pVGui )	{		Warning( "CSceneViewerApp::PreInit: Unable to connect to necessary interface!/n" );		return false;	}	// initialize interfaces	CreateInterfaceFn appFactory = GetFactory(); 	return vgui::VGui_InitDmeInterfacesList( "SceneViewer", &appFactory, 1 );}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:20,


示例22: Input

  void UncoupledAggregationFactory_kokkos<LocalOrdinal, GlobalOrdinal, Node>::DeclareInput(Level& currentLevel) const {    Input(currentLevel, "Graph");    Input(currentLevel, "DofsPerNode");    const ParameterList& pL = GetParameterList();    // request special data necessary for OnePtAggregationAlgorithm    std::string mapOnePtName = pL.get<std::string>("OnePt aggregate map name");    if (mapOnePtName.length() > 0) {      std::string mapOnePtFactName = pL.get<std::string>("OnePt aggregate map factory");      if (mapOnePtFactName == "" || mapOnePtFactName == "NoFactory") {        currentLevel.DeclareInput(mapOnePtName, NoFactory::get());      } else {        RCP<const FactoryBase> mapOnePtFact = GetFactory(mapOnePtFactName);        currentLevel.DeclareInput(mapOnePtName, mapOnePtFact.get());      }    }  }
开发者ID:KineticTheory,项目名称:Trilinos,代码行数:18,


示例23: Set

    void Set(const std::string& ename, const T& entry, const FactoryBase* factory = NoFactory::get()) {      const FactoryBase* fac = GetFactory(ename, factory);      if (fac == NoFactory::get()) {        // Any data set with a NoFactory gets UserData keep flag by default        AddKeepFlag(ename, NoFactory::get(), MueLu::UserData);      }      // Store entry only if data have been requested (or any keep flag)      if (IsRequested(ename, factory) || GetKeepFlag(ename, factory) != 0) {        TEUCHOS_TEST_FOR_EXCEPTION(!IsKey(factory, ename), Exceptions::RuntimeError, "" + ename + " not found in");        map_[factory][ename]->SetData(entry);      } else {        GetOStream(Warnings0) << "Level::Set: unable to store /"" << ename << "/" generated by factory " << factory            << " on level " << toString(GetLevelID()) << ", as it has not been requested and no keep flags were set for it" << std::endl;      }    } // Set
开发者ID:Russell-Jones-OxPhys,项目名称:Trilinos,代码行数:18,


示例24: GetFactory

XLineManager::~XLineManager(){    const char gekqz[] = "GEKQZ";    for(unsigned int i=0; i < sizeof(gekqz); i++)    {        XLineFactory* xlf = GetFactory(std::string(1, gekqz[i]));        delete xlf;    }    // Delete all existing XLines    for (XLineContainer::iterator i = lookup_lines.begin(); i != lookup_lines.end(); i++)    {        for (XLineLookup::iterator j = i->second.begin(); j != i->second.end(); j++)        {            delete j->second;        }    }}
开发者ID:H7-25,项目名称:inspircd,代码行数:18,


示例25: m

  void GenericRFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Build(Level & fineLevel, Level & coarseLevel) const {    FactoryMonitor m(*this, "Call prolongator factory for calculating restrictor", coarseLevel);    RCP<const FactoryBase> PFact1 = GetFactory("P");    if (PFact1 == Teuchos::null) { PFact1 = coarseLevel.GetFactoryManager()->GetFactory("P"); }    RCP<PFactory> PFact = Teuchos::rcp_const_cast<PFactory>(rcp_dynamic_cast<const PFactory>(PFact1));;    MueLu::DisableMultipleCallCheck check(PFact);    // BuildR    bool rmode = PFact->isRestrictionModeSet();    PFact->setRestrictionMode(true);     // switch prolongator factory to restriction mode    //PFact->Build(fineLevel, coarseLevel);  // call PFactory::Build explicitely    RCP<Matrix> R = coarseLevel.Get<RCP<Matrix> >("R",PFact.get());    PFact->setRestrictionMode(rmode);    // reset restriction mode flag    Set(coarseLevel, "R", R);  } //BuildR
开发者ID:Russell-Jones-OxPhys,项目名称:Trilinos,代码行数:20,



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


C++ GetFd函数代码示例
C++ GetExtraStyle函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。