X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstatement.cpp;h=29961a963fcfa97ce6d8461c0a384a64ce465bcd;hb=8955db30f9cd1c1566b349da29e669f065f84e36;hp=d485a20a80f27f1f082c1cc3e400fdb03c46023a;hpb=cbd0ddd6ee033e46646bfb85d19232c816ea1eda;p=libs%2Fdatafile.git diff --git a/source/statement.cpp b/source/statement.cpp index d485a20..29961a9 100644 --- a/source/statement.cpp +++ b/source/statement.cpp @@ -1,23 +1,37 @@ -/* $Id: statement.h 19 2007-08-21 14:11:23Z tdb $ - -This file is part of libmspdatafile -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include +#include #include "statement.h" +using namespace std; + namespace Msp { namespace DataFile { -std::string Statement::get_location() const +Statement::Statement(): + valid(false), + line(0) +{ } + +Statement::Statement(const string &kw): + keyword(kw), + valid(true), + line(0) +{ } + +string Statement::get_location() const { - std::string result = source; + string result = source; if(line) result += format(":%d", line); return result; } +string Statement::get_signature() const +{ + string result; + for(Arguments::const_iterator i = args.begin(); i!=args.end(); ++i) + result += i->get_signature(); + return result; +} + } // namespace DataFile } // namespace Msp