#pragma once #include "DataBoardAPI.h" #include "SimanticsDataParser.h" #include "SimanticsDataLexer.h" #include #include namespace Databoard { namespace Type { class DataType; class DataBoardRepository; struct strTypeDefinition; } namespace Value { class Value; struct DATABOARD_API strDataValueDefinition { std::string name; std::string type; Value* value; std::string writeOut() const; }; class DATABOARD_API DataValueRepository { public: DataValueRepository(); virtual ~DataValueRepository(); int count(); const strDataValueDefinition* getDataValue(int i); const strDataValueDefinition* getDataValue(std::string value); bool open(std::string fileName, Databoard::Type::DataBoardRepository* dataBoardRepository); Value* open(std::string fileName, Databoard::Type::DataType* dataType); protected: std::vector values; private: Databoard::Type::DataBoardRepository* dataBoardRepository; Value* parse(pANTLR3_BASE_TREE tree, Value* parent = NULL, int indent = 0); void print(pANTLR3_BASE_TREE tree, int indent = 0); const Databoard::Type::strTypeDefinition* parseTypeReference(pANTLR3_BASE_TREE tree); Value* parseValues(pANTLR3_BASE_TREE tree, Databoard::Type::DataType* dataBoard, int indent); void addDataValue(std::string name, std::string type, Value* dataValue); }; } }