diff --git a/src/Record.cpp b/src/Record.cpp index 0f00fdb68..bfda04fcd 100644 --- a/src/Record.cpp +++ b/src/Record.cpp @@ -59,6 +59,22 @@ Record::~Record () { } +//////////////////////////////////////////////////////////////////////////////// +std::string Record::composeF4 () +{ + std::string ff4 = "["; + + bool first = true; + foreach (r, (*this)) + { + ff4 += (first ? "" : " "); + ff4 += r->second.composeF4 (); + } + + ff4 += "]"; + return ff4; +} + //////////////////////////////////////////////////////////////////////////////// // // start --> [ --> name --> : --> " --> value --> " --> ] --> end diff --git a/src/Record.h b/src/Record.h index 3ba98bb5d..e28ecc380 100644 --- a/src/Record.h +++ b/src/Record.h @@ -39,8 +39,9 @@ public: Record& operator= (const Record&); // Assignment operator virtual ~Record (); // Destructor - virtual std::string composeF4 () = 0; virtual std::string composeCSV () = 0; + + std::string composeF4 (); void parse (const std::string&); std::vector all (); diff --git a/src/sandbox/T.cpp b/src/sandbox/T.cpp index d3b761766..50c31b1e9 100644 --- a/src/sandbox/T.cpp +++ b/src/sandbox/T.cpp @@ -36,7 +36,7 @@ T::T () //////////////////////////////////////////////////////////////////////////////// T::T (const std::string& input) { - throw std::string ("unimplemented T::T"); + parse (input); } ////////////////////////////////////////////////////////////////////////////////