MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / readCmd

Function readCmd

src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.C:33–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
32
33bool Foam::fileFormats::AC3DsurfaceFormatCore::readCmd
34(
35 IFstream& is,
36 string& cmd,
37 string& args
38)
39{
40 if (is.good())
41 {
42 string line;
43 is.getLine(line);
44
45 string::size_type space = line.find(' ');
46
47 if (space != string::npos)
48 {
49 cmd = line.substr(0, space);
50 args = line.substr(space+1);
51
52 return true;
53 }
54 }
55 return false;
56}
57
58
59// Read up to line starting with cmd. Sets args to rest of line.

Callers 1

Calls 1

goodMethod · 0.45

Tested by

no test coverage detected