Exemple #1
0
	void HTTPNodeTestObject::test<3>()
	{
		// traversal of mutli-branched tree
		
		LLHTTPNode* greekNode = new LLHTTPNode;
		LLHTTPNode* alphaNode = new LLHTTPNode;
		LLHTTPNode* betaNode = new LLHTTPNode;
		LLHTTPNode* gammaNode = new LLHTTPNode;
		
		greekNode->addNode("alpha", alphaNode);
		greekNode->addNode("beta", betaNode);
		greekNode->addNode("gamma", gammaNode);
		mRoot.addNode("greek", greekNode);
		
		LLHTTPNode* hebrewNode = new LLHTTPNode;
		LLHTTPNode* alephNode = new LLHTTPNode;
		
		hebrewNode->addNode("aleph", alephNode);
		mRoot.addNode("hebrew", hebrewNode);

		ensureRootTraversal("greek/alpha", alphaNode, "");
		ensureRootTraversal("greek/beta", betaNode, "");
		ensureRootTraversal("greek/delta", NULL, "delta");
		ensureRootTraversal("greek/gamma", gammaNode, "");
		ensureRootTraversal("hebrew/aleph", alephNode, "");

		ensure_equals("root of greek", greekNode->rootNode(), &mRoot);
		ensure_equals("root of alpha", alphaNode->rootNode(), &mRoot);
		ensure_equals("root of beta", betaNode->rootNode(), &mRoot);
		ensure_equals("root of gamma", gammaNode->rootNode(), &mRoot);
		ensure_equals("root of hebrew", hebrewNode->rootNode(), &mRoot);
		ensure_equals("root of aleph", alephNode->rootNode(), &mRoot);
	}
Exemple #2
0
void LLHTTPRegistrar::buildAllServices(LLHTTPNode& root)
{
    const FactoryMap& map = factoryMap();
    
    FactoryMap::const_iterator i = map.begin();
    FactoryMap::const_iterator end = map.end();
    for (; i != end; ++i)
    {
		LL_DEBUGS("AppInit") << "LLHTTPRegistrar::buildAllServices adding node for path "
			<< i->first << LL_ENDL;
		
        root.addNode(i->first, i->second->build());
    }
}
Exemple #3
0
void LLHTTPRegistrar::buildAllServices(LLHTTPNode& root)
{
    const FactoryMap& map = factoryMap();
    
    FactoryMap::const_iterator i = map.begin();
    FactoryMap::const_iterator end = map.end();
    for (; i != end; ++i)
    {
		std::cout << "LLHTTPRegistrar::buildAllServices adding node for path "
			<< i->first.c_str() << std::endl;
		
        root.addNode(i->first, i->second->build());
    }
}