#include #include #include "Jeep/JProperties.hh" /** * Data structure for start_event tag. */ struct JEvent { int number; int type; static int count; // global event counter }; int JEvent::count = 0; // initialisation of global event counter inline std::istream& operator>>(std::istream& in, JEvent& event) { JEvent::count += 1; return in >> event.number >> event.type; } inline std::ostream& operator<<(std::ostream& out, const JEvent& event) { return out << event.number << ' ' << event.type; } /** * Program to test JProperties class, */ int main(int argc, char **argv) { using namespace std; using namespace JEEP; JEvent event; JProperties zap(JEquationParameters(":", "\n", "", ""), 1); zap["start_event"] = event; zap.read(cin); cout << "Number of events " << JEvent::count << endl; }