]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/parsermode.h
Implement proper copy semantics
[libs/datafile.git] / source / parsermode.h
index 78257ced8427e8e9b6cf5929121c30b517a2f894..5c9deceb7d2c289b224c7b5a20ed8dc9cf69131d 100644 (file)
@@ -1,24 +1,20 @@
-/* $Id$
-
-This file is part of libmspdatafile
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_DATAFILE_PARSERMODE_H_
 #define MSP_DATAFILE_PARSERMODE_H_
 
+#include <msp/core/noncopyable.h>
 #include "statement.h"
 
 namespace Msp {
 namespace DataFile {
 
 class Input;
+class Loader;
+class LoaderAction;
 
 /**
 Base class for parse modes.
 */
-class ParserMode
+class ParserMode: private NonCopyable
 {
 protected:
        Input &in;
@@ -28,7 +24,11 @@ protected:
 public:
        virtual ~ParserMode() { }
 
-       virtual Statement parse() =0;
+       virtual Statement parse() = 0;
+       virtual void process_control_statement(const Statement &) { }
+
+       virtual const StatementKey *peek(unsigned) { return 0; }
+       virtual bool parse_and_load(unsigned, Loader &, const LoaderAction &) { return false; }
 };
 
 } // namespace DataFile