Enhancement - Record::composeF4

- Implemented Record::composeF4.
This commit is contained in:
Paul Beckingham 2009-05-26 23:17:49 -04:00
parent 4cbc67b30b
commit 2dc566a726
3 changed files with 19 additions and 2 deletions

View file

@ -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 // start --> [ --> name --> : --> " --> value --> " --> ] --> end

View file

@ -39,8 +39,9 @@ public:
Record& operator= (const Record&); // Assignment operator Record& operator= (const Record&); // Assignment operator
virtual ~Record (); // Destructor virtual ~Record (); // Destructor
virtual std::string composeF4 () = 0;
virtual std::string composeCSV () = 0; virtual std::string composeCSV () = 0;
std::string composeF4 ();
void parse (const std::string&); void parse (const std::string&);
std::vector <Att> all (); std::vector <Att> all ();

View file

@ -36,7 +36,7 @@ T::T ()
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
T::T (const std::string& input) T::T (const std::string& input)
{ {
throw std::string ("unimplemented T::T"); parse (input);
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////