#include <ExCFile.h>
Graphe d'héritage de la classe ExCFileReader

Membres publics | |
| ExCFileReader () | |
| ExCFileReader (string) | |
| ExCFileData | getContent (void) |
Attributs Privés | |
| ExCFileData * | file_data |
|
|
Définition à la ligne 110 du fichier ExCFile.h.
00110 : ExCFile () { file_data = new ExCFileData; }; |
|
|
Définition à la ligne 99 du fichier ExCFile.cpp.
00099 : ExCFile (s, RO) { 00100 file_data = new ExCFileData; 00101 } |
|
|
Redéfinie à partir de ExCFile. Définition à la ligne 103 du fichier ExCFile.cpp. Références ExCFileData::addElement(), data, FILE_BATCH, FILE_COMMAND, FILE_CONSOLE, file_data, FILE_EMPTY, FILE_INTERFACE, FILE_PARTICULE, FILE_SET, ExCFile::filename, FILEUNKNOWN, getContent(), ExCFile::getOpenMode(), ExCFileData::getType(), Guard, RO, ExCFileDataAction::setAction(), ExCFileDataAction::setCommand(), ExCFileDataAction::setParam(), et ExCFileData::setType(). Référencé par getContent(), et ExManagerCommand::LoadCommandFile().
00103 {
00104 Guard(ExCFileData ExCFileReader::getContent (void))
00105 fstream file;
00106 if (file_data->getType() == FILE_EMPTY) {
00107 file.open (filename.data(), getOpenMode (RO));
00108 if (file.is_open ()) {
00109 string d;
00110 ExCFileDataAction ds;
00111 bool first = true;
00112 string action;
00113 while (! getline (file, d).eof ()) {
00114 if (first == false && (file_data->getType() != FILE_EMPTY || file_data->getType() != FILEUNKNOWN)) {
00115 action = d.substr (0, d.find ("#"));
00116 #ifdef DEBUG_HIGH
00117 cout << "end of -> " << action.find ("end of") << endl;
00118 #endif
00119 if (action.find ("end of") != 0) {
00120 ds.setAction (action);
00121 #ifdef DEBUG_HIGH
00122 cout << "action -> " << d.substr (0, d.find ("#")) << endl;
00123 #endif
00124 if (file_data->getType() == FILE_COMMAND) {
00125 string dds = d.substr (d.find ("#") + 1, d.length());
00126 string dds1 = dds.substr (0, d.find ("#"));
00127 ds.setCommand (atoi ((dds1).data()));
00128 #ifdef DEBUG_HIGH
00129 cout << "command -> " << atoi (dds1.data()) << endl;
00130 #endif
00131 ds.setParam (dds.substr (dds.find ("#") + 1, d.length()));
00132 #ifdef DEBUG_HIGH
00133 cout << "param -> " << dds.substr (dds.find ("#") + 1, d.length()) << endl;
00134 #endif
00135 } else {
00136 string dds = d.substr (d.find ("#") + 1, d.length());
00137 ds.setCommand (atoi ((dds).data()));
00138 #ifdef DEBUG_HIGH
00139 cout << "command -> " << atoi (d.substr (d.find ("#") + 1, d.length()).data()) << endl;
00140 #endif
00141 }
00142 file_data->addElement (ds);
00143 }
00144 } else {
00145 // erk
00146 int t = FILEUNKNOWN;
00147 if (d == "#exec#") t = FILE_BATCH;
00148 else if (d == "#command#") t = FILE_COMMAND;
00149 else if (d == "#console#") t = FILE_CONSOLE;
00150 else if (d == "#set#") t = FILE_SET;
00151 else if (d == "#particulesystem#") t = FILE_PARTICULE;
00152 else if (d == "#interface#") t = FILE_INTERFACE;
00153 file_data->setType (t);
00154 #ifdef DEBUG_HIGH
00155 cout << "type -> " << d << " " << t << endl;
00156 #endif
00157 first = false;
00158 }
00159 }
00160 file.close ();
00161 } else { cout << "pika plop !" << endl; }
00162 } else { cout << "plok ? plop !" << endl; }
00163 return *file_data;
00164 UnGuard
00165 }
|
|
|
Définition à la ligne 108 du fichier ExCFile.h. Référencé par ExCFileReader(), et getContent(). |
1.3-rc1