Commits

rubenvb committed aed5655

Next step in processing added.

Comments (0)

Files changed (4)

Ambrosia/Ambrosia.pro

     Source/help_and_version_output.cpp \
     Source/output.cpp \
     Source/reader.cpp \
-    Source/builder.cpp
+    Source/builder.cpp \
+    Source/target_verifier.cpp
 
 HEADERS += \
     Include/state.h \
     Include/end_state.h \
     Include/help_and_version_output.h \
     Include/reader.h \
-    Include/builder.h
+    Include/builder.h \
+    Include/target_verifier.h
 
 OTHER_FILES += Ambrosia.nectar.txt
+
+

Ambrosia/Include/target_verifier.h

+/**
+  * Ambrosia/target_verifier.h
+  * State to verify all targets and the information contained within.
+  *
+  * Author: Ruben Van Boxem
+  *
+  **/
+
+#ifndef TARGET_VERIFIER_H
+#define TARGET_VERIFIER_H
+
+// Global include
+#include "Ambrosia/global.h"
+
+// libAmbrosia includes
+#include "Ambrosia/typedefs.h"
+
+// Ambrosia includes
+#include "state.h"
+
+ambrosia_namespace_begin
+
+class target_verifier : public state
+{
+public:
+    target_verifier( lib::target_list &targets, state* parent = 0 );
+
+    state* event();
+
+private:
+    lib::target_list &m_targets;
+};
+
+ambrosia_namespace_end
+
+#endif // TARGET_VERIFIER_H

Ambrosia/Source/reader.cpp

 
 // Ambrosia includes
 #include "end_state.h"
+#include "target_verifier.h"
 
 // C++ includes
 /* <fstream> */
     if( lib::error_status() )
         return new end_state( this );
 
-    return new end_state( "reader::reader does little for now.", this );
+    return new target_verifier( m_targets, this );
 }
 
 ambrosia_namespace_end

Ambrosia/Source/target_verifier.cpp

+/**
+  * Ambrosia/target_verifier.cpp
+  * Class implementation.
+  *
+  * Author: Ruben Van Boxem
+  *
+  **/
+
+// Class include
+#include "target_verifier.h"
+
+// Ambrosia includes
+#include "end_state.h"
+
+ambrosia_namespace_begin
+
+target_verifier::target_verifier( lib::target_list &targets, state* parent )
+:   state( parent ),
+    m_targets( targets )
+{   }
+
+state* target_verifier::event()
+{
+    return new end_state( "target_verifier does nothing for now." );
+}
+
+ambrosia_namespace_end