X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fstatement.h;h=efc097bd7e11b4c100627fbd9dcf8a5776433cc0;hp=f2fa6e629bf7a1d50676bbe25b4f3096e87310dc;hb=752cb121db958e14f473fe2eda4c6522d095e19b;hpb=6dd94a7fe90c6467024685fbac769067ddb74688 diff --git a/source/statement.h b/source/statement.h index f2fa6e6..efc097b 100644 --- a/source/statement.h +++ b/source/statement.h @@ -24,7 +24,19 @@ public: std::list sub; Statement(): valid(false), line(0) { } + Statement(const std::string &kw): keyword(kw), valid(true), line(0) { } std::string get_location() const; + + template + Statement &append(const T &v) + { + args.push_back(Value(v)); + return *this; + } + + template + Statement &operator,(const T &v) + { return append(v); } }; } // namespace DataFile