47 if (space != string::npos)
49 cmd = line.substr(0, space);
50 args = line.substr(space+1);
75 if (space != string::npos)
77 if (line.substr(0, space) == cmd)
79 args = line.substr(space+1);
94 const string& errorMsg
98 if (!cueTo(is, cmd, args))
102 "fileFormats::AC3DsurfaceFormat::read(const fileName&)" 104 <<
"Cannot find command " << cmd
124 static scalar colourMap[] =
141 label colourI = zoneI % 8;
142 label colourCompI = 3 * colourI;
144 os <<
"MATERIAL \"" << zoneLst[zoneI].name() <<
"Mat\" rgb " 145 << colourMap[colourCompI] <<
' ' << colourMap[colourCompI+1]
146 <<
' ' << colourMap[colourCompI+2]
147 <<
" amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10" 152 os <<
"OBJECT world" << nl
153 <<
"kids " << zoneLst.
size() <<
endl;
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling character strings derived from std::string.
static string cueToOrDie(IFstream &, const string &cmd, const string &errorMsg=string::null)
Cue up to cmd, reading args or exit with a FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void writeHeader(Ostream &, const UList< surfZone > &)
Write header with materials.
graph_traits< Graph >::vertices_size_type size_type
static bool readCmd(IFstream &, string &cmd, string &args)
Read cmd, args from IFstream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool good() const
Return true if next operation might succeed.
label size() const
Return the number of elements in the UList.
ISstream & getLine(string &)
Raw, low-level getline into a string function.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Foam::argList args(argc, argv)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static bool cueTo(IFstream &, const string &cmd, string &args)
Cue up to cmd, reading args.