示例#1
0
void _DisplayUrl(const char * caller, pUrlChainType pThisUrlChainPar)
{    
pUrlChainType pThisUrlChain = pThisUrlChainPar;

    /* process each  entry of chain */
    while (NULL != pThisUrlChain)
    {

	if (NULL != pThisUrlChain->pCompound)
	{
		DXMLAUX("\t[%s]: pCompund is not NULL, its contents are:\n", caller);

		DisplayCompound(pThisUrlChain->pCompound);
	}

	if (NULL != pThisUrlChain->pCompound)
	{

		DXMLAUX("\t[%s]: Cumulative resulting URL is :\n", caller);

		DisplayString(pThisUrlChain->pcSumm);

	}
	
	/* Go to next record of Chainwork */
	pThisUrlChain =  pThisUrlChain->pNextChain;
    };	    
}
示例#2
0
文件: NBT.cpp 项目: zearen-wover/mmm
   void NBT::displayToScreen(void)
   {

        if(!_rootNode->isParsed())
        {
            cout << "NBT is not parsed / ready. Cannot display to screen." << endl;
        }
        else
        {
            DisplayCompound(_rootNode);
        }
    }
示例#3
0
void _DisplayXmlAux(const char * caller, pXmlAuxType pXmlAuxPar)
{    
pXmlAuxType pThisXmlAux = pXmlAuxPar;

    /* process each  entry of chain */
    if (NULL != pThisXmlAux)
    {
	if (NULL != pThisXmlAux->pVocabulary)
	{
		DXMLAUX("\t[%s]: pCompund is not NULL, its contents are:\n", caller);

		DisplayCompound(pThisXmlAux->pVocabulary);
	}	
    }
}
示例#4
0
文件: NBT.cpp 项目: zearen-wover/mmm
   void NBT::DisplayTag(NBT_Tag * src, string childStr)
   {

        // display tag to screen
        TagType t = src->getType();

        // use own handler, ignore it
        if(t == TAGTYPE_COMPOUND)
        {
            // Recursively parse compound tag
            DisplayCompound((TAG_Compound*)src, childStr);
            return;
        }

        cout << childStr;

        string tagName = "";

        if(src->getNameHolder().length > 0)
        {
            tagName = "(\"";
            tagName += src->getName();
            tagName += "\")";
        }
        switch(t)
        {
            case TAGTYPE_BYTE:
                cout << "TAG_Byte" << tagName.c_str() << ": ";
                cout << (unsigned short)(0 << 8 | ((TAG_Byte*)src)->getPayload());
                cout << endl;
                break;


            case TAGTYPE_BYTE_ARRAY:
                cout << "TAG_Byte_Array" << tagName.c_str() << ": [";
                cout << ((TAG_Byte_Array*)src)->size();
                cout << " bytes]" << endl;
                break;

            case TAGTYPE_DOUBLE:
                cout << "TAG_Double" << tagName.c_str() << ": ";
                cout << ((TAG_Double*)src)->getPayload();
                cout << endl;
                break;


            case TAGTYPE_FLOAT:
                cout << "TAG_Float" << tagName.c_str() << ": ";
                cout << ((TAG_Float*)src)->getPayload();
                cout << endl;
                break;


            case TAGTYPE_INT:
                cout << "TAG_Int" << tagName.c_str() << ": ";
                cout << ((TAG_Int*)src)->getPayload();
                cout << endl;
                break;

            case TAGTYPE_LONG:
                cout << "TAG_Long" << tagName.c_str() << ": ";
                cout << ((TAG_Long*)src)->getPayload();
                cout << endl;
                break;


            case TAGTYPE_SHORT:
                cout << "TAG_Short" << tagName.c_str() << ": ";
                cout << ((TAG_Short*)src)->getPayload();
                cout << endl;
                break;

            case TAGTYPE_STRING:
                cout << "TAG_String" << tagName.c_str() << ": ";
                cout << ((TAG_String*)src)->getPayload().value;
                cout << endl;
                break;



            case TAGTYPE_LIST:
                cout << "TAG_List" << tagName.c_str() << ": ";
                DisplayList((TAG_List*)src, childStr);
                cout << endl;

                break;


        }

    }