Kaydet (Commit) 3e668516 authored tarafından Caolán McNamara's avatar Caolán McNamara

set Dump methods to ultra-verbose debug-mode

üst 0206aafd
...@@ -48,13 +48,13 @@ private: ...@@ -48,13 +48,13 @@ private:
/// @PRECOND 0 < langIdx_in < MAX_IDX /// @PRECOND 0 < langIdx_in < MAX_IDX
static void FillInFallbacks( LangHashMap& rElem_out, ByteString sLangIdx_in ); static void FillInFallbacks( LangHashMap& rElem_out, ByteString sLangIdx_in );
/// Debugmethod, prints the content of the map to stdout #if OSL_DEBUG_LEVEL > 2
static void Dump( LangHashMap* rElem_in , const ByteString sKey_in ); /// Debugmethod, prints the content of the map to stdout
static void Dump(LangHashMap* rElem_in , const ByteString sKey_in);
/// Debugmethod, prints the content of the map to stdout
static void Dump( XMLHashMap* rElem_in ) ;
/// Debugmethod, prints the content of the map to stdout
static void Dump(XMLHashMap* rElem_in);
#endif
public: public:
HelpParser( const ByteString &rHelpFile, bool bUTF8 , bool bHasInputList ); HelpParser( const ByteString &rHelpFile, bool bUTF8 , bool bHasInputList );
......
...@@ -88,26 +88,29 @@ void HelpParser::FillInFallbacks( LangHashMap& rElem_out, ByteString sLangIdx_in ...@@ -88,26 +88,29 @@ void HelpParser::FillInFallbacks( LangHashMap& rElem_out, ByteString sLangIdx_in
} }
} }
/*****************************************************************************/ #if OSL_DEBUG_LEVEL > 2
void HelpParser::Dump(XMLHashMap* rElem_in) { void HelpParser::Dump(XMLHashMap* rElem_in)
/*****************************************************************************/ {
for(XMLHashMap::iterator pos = rElem_in->begin();pos != rElem_in->end(); ++pos){ for(XMLHashMap::iterator pos = rElem_in->begin();pos != rElem_in->end(); ++pos)
{
Dump(pos->second,pos->first); Dump(pos->second,pos->first);
} }
} }
/*****************************************************************************/
void HelpParser::Dump(LangHashMap* rElem_in,const ByteString sKey_in) { void HelpParser::Dump(LangHashMap* rElem_in,const ByteString sKey_in)
/*****************************************************************************/ {
ByteString x; ByteString x;
OString y; OString y;
fprintf(stdout,"+------------%s-----------+\n",sKey_in.GetBuffer() ); fprintf(stdout,"+------------%s-----------+\n",sKey_in.GetBuffer() );
for(LangHashMap::iterator posn=rElem_in->begin();posn!=rElem_in->end();++posn){ for(LangHashMap::iterator posn=rElem_in->begin();posn!=rElem_in->end();++posn)
{
x=posn->first; x=posn->first;
y=posn->second->ToOString(); y=posn->second->ToOString();
fprintf(stdout,"key=%s value=%s\n",x.GetBuffer(),y.getStr()); fprintf(stdout,"key=%s value=%s\n",x.GetBuffer(),y.getStr());
} }
fprintf(stdout,"+--------------------------+\n"); fprintf(stdout,"+--------------------------+\n");
} }
#endif
HelpParser::HelpParser( const ByteString &rHelpFile, bool rUTF8 , bool rHasInputList ) HelpParser::HelpParser( const ByteString &rHelpFile, bool rUTF8 , bool rHasInputList )
: sHelpFile( rHelpFile ), : sHelpFile( rHelpFile ),
...@@ -436,9 +439,11 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile ...@@ -436,9 +439,11 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile
{ {
aLangHM = pos->second; aLangHM = pos->second;
//printf("*********************DUMPING HASHMAP***************************************"); #if OSL_DEBUG_LEVEL > 2
//Dump( aXMLStrHM ); printf("*********************DUMPING HASHMAP***************************************");
//printf("DBG: sHelpFile = %s\n",sHelpFile.GetBuffer() ); Dump(aXMLStrHM);
printf("DBG: sHelpFile = %s\n",sHelpFile.GetBuffer() );
#endif
pResData.sGId = pos->first; pResData.sGId = pos->first;
pResData.sFilename = sHelpFile; pResData.sFilename = sHelpFile;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment