Logo Search packages:      
Sourcecode: xchm version File versions

wxString CHMFile::GetPageByCID ( const int  contextID  ) 

Looks up the page referred to by the context-ID.

Parameters:
contextID The context-ID to look up
Returns:
the page referred to by the context-ID, or file root"/" if ID is invalid.

Definition at line 276 of file chmfile.cpp.

Referenced by CHMFrame::LoadContextID().

{
      if(_cidMap.empty())
            return wxT("/");

      CHMIDMap::iterator itr = _cidMap.find( contextID );
      // make sure the key/value pair is valid
      if(itr == _cidMap.end() ) 
            return wxT("/");
      
      return wxString(wxT("/")) + itr->second;
}


Generated by  Doxygen 1.6.0   Back to index