コード例 #1
0
void ClientHelperGenerator::registerCallbacks(Poco::CodeGeneration::GeneratorEngine& e)
{
	//we don't want any code for constructor and destructor
	e.registerCallback(_pStruct->name(), &ClientHelperGenerator::constructorCodeGen);
	e.registerCallback("~"+_pStruct->name(), &Poco::CodeGeneration::GeneratorEngine::emptyCodeGen);
	e.registerCallback("instance", &ClientHelperGenerator::instanceCodeGen);
	e.registerCallback("findImpl", &ClientHelperGenerator::findImplCodeGen);
	e.registerCallback("find", &ClientHelperGenerator::findCodeGen);
	e.registerPreClassCallback(&ClientHelperGenerator::singletonHolder);
}
コード例 #2
0
void RemoteObjectGenerator::registerCallbacks(Poco::CodeGeneration::GeneratorEngine& e)
{
	// for all other methods we want the simple fwd implementation
	e.registerDefaultCallback(&RemoteObjectGenerator::fwdCodeGen);
	e.registerCallback(_pStruct->name(), &RemoteObjectGenerator::constructorCodeGen);
	e.registerCallback("~"+_pStruct->name(), &RemoteObjectGenerator::destructorCodeGen);
	e.registerCallback("remoting__typeId", &AbstractGenerator::typeIdCodeGen);
	if (eventsFound())
	{
		e.registerCallback("remoting__enableEvents", &RemoteObjectGenerator::enableEventsCodeGen);
		e.registerCallback("remoting__hasEvents", &RemoteObjectGenerator::hasEventsCodeGen);
		e.registerCallback("remoting__enableRemoteEvents", &RemoteObjectGenerator::enableRemoteEventsCodeGen);
	}

	std::vector<std::string>::const_iterator itE = _events.begin();
	for (; itE != _events.end(); ++itE)
	{
		e.registerCallback(RemoteObjectGenerator::generateEventFunctionName(*itE), &RemoteObjectGenerator::eventCodeGen);
	}

	// now register others
	std::map<std::string, Poco::CodeGeneration::GeneratorEngine::MethodGenerator>::const_iterator it = _codeInjectors.begin();
	std::map<std::string, Poco::CodeGeneration::GeneratorEngine::MethodGenerator>::const_iterator itEnd = _codeInjectors.end();

	for (; it != itEnd; ++it)
	{
		e.registerCallback(it->first, it->second);
	}
	_codeInjectors.clear();
}
コード例 #3
0
void BundleActivatorGenerator::registerCallbacks(Poco::CodeGeneration::GeneratorEngine& e)
{
	e.registerCallback(_pStruct->name(), &BundleActivatorGenerator::constructorCodeGen);
	e.registerCallback("~"+_pStruct->name(), &Poco::CodeGeneration::GeneratorEngine::emptyCodeGen);
	e.registerCallback("start", &BundleActivatorGenerator::startCodeGen);
	e.registerCallback("stop", &BundleActivatorGenerator::stopCodeGen);
	e.registerCallback("registerRemoteService", &BundleActivatorGenerator::registerRemoteServiceCodeGen);
	e.registerCallback("registerRemoteObject", &BundleActivatorGenerator::registerRemoteObjectCodeGen);
	e.registerCallback("registerService", &BundleActivatorGenerator::registerServiceCodeGen);
	e.registerCallback("registerListener", &BundleActivatorGenerator::registerListenerCodeGen);
	e.registerCallback("unregisterRemoteService", &BundleActivatorGenerator::unregisterRemoteServiceCodeGen);
	e.registerCallback("unregisterRemoteObject", &BundleActivatorGenerator::unregisterRemoteObjectCodeGen);
	e.registerCallback("unregisterService", &BundleActivatorGenerator::unregisterServiceCodeGen);
	e.registerCallback("unregisterListener", &BundleActivatorGenerator::unregisterListenerCodeGen);
	e.registerCallback("unregisterAll", &BundleActivatorGenerator::unregisterAllCodeGen);
	e.registerCallback("setupRemotingOSP", &BundleActivatorGenerator::setupRemotingOSPCodeGen);
	e.registerCallback("shutdownRemotingOSP", &BundleActivatorGenerator::shutdownRemotingOSPCodeGen);
	e.registerCallback("orb", &BundleActivatorGenerator::orbCodeGen);
}