56 static void getKey(
string& s,
string& key,
size_t& pt1);
57 static void getText(
string& s,
size_t& pt1,
string& text);
58 static void storePair(
const string& key,
const string& text);
87 if ( ! lang.empty() ) {
119 while ( getline(*file, s) ) {
127 if (pt1==string::npos)
continue;
145 static void getKey(
string& s,
string& key,
size_t& pt1)
149 string separators =
" \t";
151 size_t pk2 = s.find_first_of(separators);
154 if (pk2==string::npos) pk2 = s.size();
157 key = s.substr(pk1, pk2-1);
160 pt1 = s.find_first_of(
"\"", pk2);
164 static void getText(
string& s,
size_t& pt1,
string& text)
168 pt2 = s.find_last_not_of(
"\"");
169 if (pt2!=string::npos) {
170 if (text.size() > 0) text +=
"\n";
171 text += s.substr(pt1+1, pt2-pt1);
176 static void storePair(
const string& key,
const string& text)
179 if(!key.empty() && !text.empty()) {
194 cerr <<
"Documentator : importDocStings : " <<
"warning : unknown key \"" << key <<
"\"" << endl;
207 cout << name <<
".size() = " << m.size() << endl;
208 map<string,string>::iterator it;
210 for(it = m.begin(); it!=m.end(); ++it)
211 cout << i++ <<
".\t" << name <<
"[" << it->first <<
"] \t= '" << it->second <<
"'" << endl;
231 cerr <<
"ERROR : can't open architecture file " << filename << endl;
static int cholddir()
Switch back to the previously stored current directory.
set< string > gDocNoticeKeySet
map< string, string > gDocMetadatasStringMap
static void storePair(const string &key, const string &text)
static string gCurrentDir
Room to save current directory name.
static const string gDocTextsDefaultFile
ifstream * open_arch_stream(const char *filename)
Try to open an architecture file searching in various directories.
static void getText(string &s, size_t &pt1, string &text)
static void importDocStrings(const string &filename)
Feed the content of doc texts maps from a file.
map< string, string > gDocNoticeStringMap
static istream * openArchFile(const string &filename)
Open architecture file.
map< string, string > gDocMathStringMap
static void getCurrentDir()
Get current directory and store it in gCurrentDir.
set< string > gDocMathKeySet
map< string, string > gDocAutodocStringMap
const char * name(Symbol *sym)
Returns the name of a symbol.
void loadTranslationFile(const string &lang)
void initDocNotice()
Dispatch initialization of notice containers, after default notice file loading.
static void printStringMapContent(map< string, string > &map, const string &name)
Simple trace function.
set< string > gDocMetadatasKeySet
static void getKey(string &s, string &key, size_t &pt1)
set< string > gDocAutodocKeySet
void initDocMath()
Dispatch initialization of autodoc container.
void initDocAutodoc()
Dispatch initialization of autodoc container.