#include <sstream>#include <iostream>#include "colvarmodule.h"#include "colvarvalue.h"#include "colvarparse.h"Go to the source code of this file.
Defines | |
| #define | _get_keyval_scalar_string_(TYPE) |
| #define | _get_keyval_scalar_(TYPE) |
| #define | _get_keyval_vector_(TYPE) |
Functions | |
| _get_keyval_scalar_ (int) | |
| _get_keyval_scalar_ (size_t) | |
| _get_keyval_scalar_string_ (std::string) | |
| _get_keyval_scalar_ (cvm::real) | |
| _get_keyval_scalar_ (cvm::rvector) | |
| _get_keyval_scalar_ (cvm::quaternion) | |
| _get_keyval_scalar_ (colvarvalue) | |
| _get_keyval_vector_ (int) | |
| _get_keyval_vector_ (size_t) | |
| _get_keyval_vector_ (std::string) | |
| _get_keyval_vector_ (cvm::real) | |
| _get_keyval_vector_ (cvm::rvector) | |
| _get_keyval_vector_ (cvm::quaternion) | |
| _get_keyval_vector_ (colvarvalue) | |
| std::istream & | operator>> (std::istream &is, colvarparse::read_block const &rb) |
|
|
Definition at line 76 of file colvarparse.C. |
|
|
Definition at line 21 of file colvarparse.C. |
|
|
Definition at line 133 of file colvarparse.C. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 573 of file colvarparse.C. References colvarparse::read_block::data, colvarparse::getline_nocomments(), and colvarparse::read_block::key. 00574 {
00575 size_t start_pos = is.tellg();
00576 std::string read_key, next;
00577
00578 if ( !(is >> read_key) || !(read_key == rb.key) ||
00579 !(is >> next) ) {
00580 // the requested keyword has not been found, or it is not possible
00581 // to read data after it
00582 is.clear();
00583 is.seekg (start_pos, std::ios::beg);
00584 is.setstate (std::ios::failbit);
00585 return is;
00586 }
00587
00588 if (next != "{") {
00589 (*rb.data) = next;
00590 return is;
00591 }
00592
00593 size_t brace_count = 1;
00594 std::string line;
00595 while (colvarparse::getline_nocomments (is, line)) {
00596 size_t br = 0, br_old;
00597 while ( (br = line.find_first_of ("{}", br)) != std::string::npos) {
00598 if (line[br] == '{') brace_count++;
00599 if (line[br] == '}') brace_count--;
00600 br_old = br;
00601 br++;
00602 }
00603 if (brace_count) (*rb.data).append (line + "\n");
00604 else {
00605 (*rb.data).append (line, 0, br_old);
00606 break;
00607 }
00608 }
00609 if (brace_count) {
00610 // end-of-file reached
00611 // restore initial position
00612 is.clear();
00613 is.seekg (start_pos, std::ios::beg);
00614 is.setstate (std::ios::failbit);
00615 }
00616 return is;
00617 }
|
1.3.9.1