当前位置: 首页>>代码示例>>C++>>正文


C++ GetModule函数代码示例

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


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

示例1: GetModule

bool ModuleContainer::RemoveModule(uint32 itemID)
{
    GenericModule * mod = GetModule(itemID);

	if( mod == NULL )
		return false;	// NO module pointer found at this slot flag, DO NOT attempt to dereference

    _removeModule(mod->flag(), mod);

    //delete the module
    delete mod;
    mod = NULL;

	return true;
}
开发者ID:comet0,项目名称:evemu_server,代码行数:15,代码来源:ModuleManager.cpp

示例2: PELOTON_ASSERT

llvm::Value *CodeGen::CallMulWithOverflow(llvm::Value *left, llvm::Value *right,
                                          llvm::Value *&overflow_bit) {
  PELOTON_ASSERT(left->getType() == right->getType());
  llvm::Function *mul_func = llvm::Intrinsic::getDeclaration(
      &GetModule(), llvm::Intrinsic::smul_with_overflow, left->getType());

  // Perform the multiplication
  llvm::Value *mul_result = CallFunc(mul_func, {left, right});

  // Pull out the overflow bit from the resulting aggregate/struct
  overflow_bit = GetBuilder().CreateExtractValue(mul_result, 1);

  // Pull out the actual result of the subtraction
  return GetBuilder().CreateExtractValue(mul_result, 0);
}
开发者ID:camellyx,项目名称:peloton,代码行数:15,代码来源:codegen.cpp

示例3: assert

bool CFlowGraphModuleManager::DeleteModuleXML( const char* moduleName )
{
	if(m_ModulesPathInfo.empty())
		return false;

	TModulesPathInfo::iterator modulePathEntry = m_ModulesPathInfo.find(moduleName);
	if (m_ModulesPathInfo.end() != modulePathEntry)
	{
		if(remove(modulePathEntry->second) == 0)
		{
			m_ModulesPathInfo.erase(moduleName);

			// also remove module itself
			TModuleIdMap::iterator idIt = m_ModuleIds.find(moduleName);
			assert(idIt != m_ModuleIds.end());
			TModuleId id = idIt->second;
			TModuleMap::iterator modIt = m_Modules.find(id);
			assert(modIt != m_Modules.end());

			if(modIt != m_Modules.end() && idIt != m_ModuleIds.end())
			{
				for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
				{
					notifier->OnModuleDestroyed(GetModule(id));
				}

				m_Modules[id]->Destroy();
				delete m_Modules[id];
				m_Modules[id] = NULL;

				m_ModuleIds.erase(idIt);
				m_Modules.erase(modIt);

				if (m_Modules.empty())
					m_moduleIdMaker = 0;

				for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
				{
						notifier->OnPostModuleDestroyed();
				}
			}

			return true;
		}
	}
	
	return false;
}
开发者ID:aronarts,项目名称:FireNET,代码行数:48,代码来源:ModuleManager.cpp

示例4: LoadDll

LibraryLoader* LoaderContainer::FindModule(const char* sName, const char* sCurrentDir, bool bLoadSymbols)
{
	if (CURL::IsFullPath(sName)) 
	{ //  Has a path, just try to load
		return LoadDll(sName, bLoadSymbols);
	}

	if (sCurrentDir) 
	{ // in the path of the parent dll?
		std::string strPath = sCurrentDir;
		strPath += sName;

		LibraryLoader* pLoader = LoadDll(strPath.c_str(), bLoadSymbols);
		if (pLoader)
			return pLoader;
	}

	//  in environment variable?
	StringArray vecEnv;

	StringUtils::SplitString(ENV_PATH, ";", vecEnv);
	LibraryLoader* pDll = NULL;

	for (int i = 0; i < (int)vecEnv.size(); ++i) 
	{
		std::string strPath = vecEnv[i];
		strPath += '/';

#ifdef LOGALL
		LOGDEBUG("Searching for the dll %s in directory %s", sName, strPath.c_str());
#endif
		strPath += sName;

		// Have we already loaded this dll
		if ((pDll = GetModule(strPath.c_str())) != NULL)
			return pDll;

		if ((pDll = LoadDll(strPath.c_str(), bLoadSymbols)) != NULL)
			return pDll;
	}

	// can't find it in any of our paths - could be a system dll
	if ((pDll = LoadDll(sName, bLoadSymbols)) != NULL)
		return pDll;

	LOGDEBUG("Dll %s was not found in path", sName);
	return NULL;
}
开发者ID:mrxordi,项目名称:XRFramework,代码行数:48,代码来源:LoaderContainer.cpp

示例5: OnModuleFinished

void CFlowGraphModuleManager::OnModuleFinished(TModuleId const& moduleId, TModuleInstanceId instanceId, bool bSuccess, TModuleParams const& params)
{
	TModuleMap::iterator moduleEntry = m_Modules.find(moduleId);
	if (m_Modules.end() != moduleEntry)
	{
		CFlowGraphModule *pModule = moduleEntry->second;
		if (pModule)
		{
			for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
			{
				notifier->OnModuleInstanceDestroyed(GetModule(pModule->GetId()), instanceId);
			}
			pModule->DestroyInstance(instanceId, bSuccess, params);
		}
	}
}
开发者ID:aronarts,项目名称:FireNET,代码行数:16,代码来源:ModuleManager.cpp

示例6: clsLogAutoPtr

JEventBody* JModuleThread::MakeEventBody(JEVT_TYPE eType, JCHAR* pModName)
{
	JEventBody* pEventBody = JNULL;
	JModule* pModule = JNULL;

    JLogAutoPtr clsLogAutoPtr(JSingleton<JLog>::instance(), 
        JLOG_MOD_THREAD, "JModuleThread::MakeEventBody");

	pModule = GetModule(pModName);
	if (pModule)
	{
		pEventBody = pModule->MakeEventBody(static_cast<JUINT32>(eType));
	}

	return pEventBody;
}
开发者ID:gothame,项目名称:jphone,代码行数:16,代码来源:JThread.cpp

示例7: GetModule

    void FunctionInstance::Read(ModuleReader &reader, const MemberHeader &header)
    {
        // Read the function id.
        uint32_t functionId;
        reader >> functionId;

        // Get the function.
        Module *module = GetModule();
        function = module->GetFunction(functionId);

        // Read the generic instance
        instance.Read(reader);

        // Use the function generic prototype.
        instance.SetPrototype(function->GetGenericPrototype());
    }
开发者ID:ronsaldo,项目名称:chela,代码行数:16,代码来源:FunctionInstance.cpp

示例8: GetModule

CExeModuleInstance* CRunningProcesses::GetProcessById(DWORD dwProcessId)
{
	CExeModuleInstance* pResult = NULL;
	CExeModuleInstance* pProcess;

	for (DWORD i = 0; i < GetCount(); i++)
	{
		pProcess = static_cast<CExeModuleInstance*>( GetModule(i) );
		if (pProcess->Get_ProcessId() == dwProcessId)
		{
			pResult = pProcess;
			break;
		} // if
	} // for
	return pResult;
}
开发者ID:anshulgoel27,项目名称:WinValgrind,代码行数:16,代码来源:ModuleInstance.cpp

示例9: TRACE_BEGIN

ErrorCode ComponentManager::LoadLibrary( const char *name )
{
	TRACE_BEGIN( LOG_LVL_INFO );
	IModule *mod = NULL;
	ErrorCode result = kNoError;
	
	LOG_NOTICE( "Opening Library: %s", name );
	
	ErrorCode (*LoadLibrary)( IComponentManager *mgr );
	IModule *(*GetModule)();
	void *handle = dlopen( name, RTLD_LAZY );
	
	if ( handle == NULL )
	{
		result = kLoadFailed;
		LOG_WARN( "Failed to open shared lib \"%s\": %s", name, dlerror() );
	}
	else
	{
		LoadLibrary = (ErrorCode (*)(IComponentManager *mgr))dlsym( handle, "JHCOM_LibraryEntry" );
		GetModule = (IModule *(*)())dlsym( handle, "JHCOM_GetModule" );

		if ( GetModule == NULL || LoadLibrary == NULL )
		{
			result = kLoadFailed;
			LOG_WARN( "Failed to get symbol" );
		}
		else
		{
			LOG( "LoadLibrary is %p", LoadLibrary );
			LOG( "RegisterServices is %p", GetModule );
			result = LoadLibrary( this );
			
			if ( result == kNoError )
			{
				mod = GetModule();
				mod->AddRef();
				mod->loadComponents();
				ModuleInfo *info = jh_new ModuleInfo( name, mod, handle );
				mModules.push_back( info );
			}
		}
	}
	
	return result;
}
开发者ID:benpayne,项目名称:jhcommon,代码行数:46,代码来源:ComponentManager.cpp

示例10: qDebug

void GadWorkspace::newObject(int index, int x, int y)
{
  qDebug("GadWorksapce::newObject(%d, (%d,%d))\n", index, x, y);
  if (!classNameMenu_)
    return;
  if (index < 0)
    return;
  qDebug("  className=%s\n   name=%s\n",
         (const char *) classNameMenu_[index].className,
         (const char *) classNameMenu_[index].name);
  GadModule *module = GetModule(*classDict_,
                                classNameMenu_[index].className,
                                classNameMenu_[index].name);
  GadObject *obj = new GadObject(module, this);
  obj->move(x, y);
  obj->show();
  resize();
}
开发者ID:BackupTheBerlios,项目名称:geoaida-svn,代码行数:18,代码来源:GadWorkspace.cpp

示例11: text

void CException::ReportStd(ostream& out, TDiagPostFlags flags) const
{
    string text(GetMsg());
    string err_type(GetType());
    err_type += "::";
    err_type += GetErrCodeString();
    SDiagMessage diagmsg(
        GetSeverity(),
        text.c_str(),
        text.size(),
        GetFile().c_str(),
        GetLine(),
        flags, NULL, 0, 0, err_type.c_str(),
        GetModule().c_str(),
        GetClass().c_str(),
        GetFunction().c_str());
    diagmsg.Write(out, SDiagMessage::fNoEndl | SDiagMessage::fNoPrefix);
}
开发者ID:swuecho,项目名称:igblast,代码行数:18,代码来源:ncbiexpt.cpp

示例12: LoadModuleGraph

void CFlowGraphModuleManager::LoadModuleGraph(const char* moduleName, const char* fileName)
{
	// first check for existing module - must exist by this point
	CFlowGraphModule *pModule = static_cast<CFlowGraphModule*>(GetModule(moduleName));

	assert(pModule);

	if(pModule)
	{
		if (pModule->LoadModuleGraph(moduleName, fileName))
		{
			for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
			{
				notifier->OnRootGraphChanged(pModule);
			}
		}		
	}
}
开发者ID:aronarts,项目名称:FireNET,代码行数:18,代码来源:ModuleManager.cpp

示例13: UpdateVersionsCombo

void CreateProjectDlg::UpdateVersionsCombo()
{
	wxArrayString versions;

	if ( Lua::Get().call( "getModuleVersions", GetModule().ToStdString() ) )
	{
		Helpers::PullTableOfStrings( versions );
	}

	mVersionsCombo->Clear();

	if (versions.size() > 0)
	{
		mVersionsCombo->Append( versions );
		mVersionsCombo->SetSelection(0);
	}

	mVersionsCombo->Enable(versions.size() > 0);
}
开发者ID:mauzerX,项目名称:universal-translators-tool,代码行数:19,代码来源:createdlgimpl.cpp

示例14: GetModule

    llvm::GlobalVariable *Property::GetMemberInfo()
    {
        if(!propertyInfo)
        {
            // Only create the property info variable when reflection is enabled.
            Module *module = GetModule();
            if(!module->HasReflection())
                return NULL;

            // Get the property info class.
            VirtualMachine *vm = module->GetVirtualMachine();
            Class *propInfoClass = vm->GetPropertyInfoClass();
            llvm::Module *targetModule = module->GetTargetModule();
            propertyInfo = new llvm::GlobalVariable(*targetModule, propInfoClass->GetTargetType(),
                                    false, ComputeMetadataLinkage(), NULL, GetMangledName() + "_propinfo_");
        }

        return propertyInfo;
    }
开发者ID:ronsaldo,项目名称:chela,代码行数:19,代码来源:Property.cpp

示例15: LookupBuiltin

// Register the given function symbol and the LLVM function type it represents
llvm::Function *CodeGen::RegisterBuiltin(const std::string &fn_name,
                                         llvm::FunctionType *fn_type,
                                         void *func_impl) {
  // Check if this is already registered as a built in, quit if to
  auto *builtin = LookupBuiltin(fn_name);
  if (builtin != nullptr) {
    return builtin;
  }

  // TODO: Function attributes here
  // Construct the function
  auto *function = llvm::Function::Create(
      fn_type, llvm::Function::ExternalLinkage, fn_name, &GetModule());

  // Register the function in the context
  code_context_.RegisterBuiltin(function, func_impl);

  // That's it
  return function;
}
开发者ID:camellyx,项目名称:peloton,代码行数:21,代码来源:codegen.cpp


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