34 theInstances.push_back(instance);
44 std::ifstream*
fin =
new std::ifstream(filename);
54 if( !fin->is_open()) {
55 std::cerr <<
"!!!! Input file does not exist: " << filename << std::endl;
70 std::cerr <<
"Error: file not opened yet " << filename << std::endl;
90 ALIint wsiz = wordlist.size();
92 for (ii = 0; ii < wsiz; ii++) {
97 const ALIint NMAXLIN = 1000;
101 for( ii = 0; ii < NMAXLIN; ii++) ltemp[ii] =
' ';
105 for ( ii=0; ii < NMAXLIN; ii++) {
106 if ( ltemp[ii] ==
'\0' )
break;
108 if ( ii == NMAXLIN-1 ) {
110 std::cerr <<
"!!!! line longer than " << NMAXLIN <<
" characters" <<
111 std::endl <<
" please split it putting a '\\' at the end of line" << std::endl;
123 std::istrstream istr_line(ltemp);
130 if( *tt !=
' ' && *(tt) !=
'\0' ) {
134 }
else if( *(tt-1) ==
' ' || *(tt-1) ==
'\015' || *(tt-1) ==
'\t') {
140 }
while(*tt !=
'\0' && stemp.length()!=0);
142 if(stempt.length() == 0) NoWords = 0;
146 for( ii=0; ii < NoWords; ii++) {
149 if ( stemp.length() == 0 )
break;
152 if ( comment == 0 ) {
154 }
else if ( comment > 0 ) {
155 stemp = stemp.substr( 0, comment );
156 wordlist.push_back(stemp);
160 wordlist.push_back(stemp);
170 if ( wordlist.size() != 0 ) {
171 if( (*(wordlist.end()-1)) ==
"\\" ) {
185 if( wordlist[0] ==
"#include" ) {
186 if( wordlist.size() != 2 ) {
188 std::cerr <<
"'#include' should have as second argument the filename " << std::endl;
std::vector< ALIstring > theNames
static ALIFileIn & getInstance(const ALIstring &name)
static std::vector< ALIFileIn * > theInstances
static PFTauRenderPlugin instance
static ALIFileIn & getInstanceOpened(const ALIstring &name)
std::vector< ALIint > theLineNo
ALIint getWordsInLine(std::vector< ALIstring > &wl)
void openNewFile(const char *filename)
std::vector< std::ifstream * > theFiles