| 31 | // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // |
| 32 | |
| 33 | bool 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. |