X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FValueParser.cpp;h=2ea218df06a680eb9541e485a723ff6d54efd8aa;hp=cc639e65d2b8daef197282749bb34842a7724c93;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/ValueParser.cpp b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/ValueParser.cpp index cc639e65d..2ea218df0 100644 --- a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/ValueParser.cpp +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/ValueParser.cpp @@ -1,48 +1,48 @@ -#include "ValueParser.h" - -#include "DataBoardRepository.h" -#include "DataValueRepository.h" - -namespace Databoard { - namespace Value { - - void parse(std::string fileName, Databoard::Value::DataValueRepository* &dataValueRepository, Databoard::Type::DataBoardRepository* dataBoardRepository) - { - if(dataValueRepository == NULL) - { - dataValueRepository = new DataValueRepository(); - } - - if(dataBoardRepository != NULL) - { - dataValueRepository->open(fileName, dataBoardRepository); - } - } - - DATABOARD_API Databoard::Value::Value* parse(std::string fileName, Databoard::Type::DataType* dataType) - { - if(dataType != NULL) - { - Databoard::Value::DataValueRepository* dataValueRepository = new DataValueRepository(); - - Databoard::Value::Value* value = dataValueRepository->open(fileName, dataType); - - delete dataValueRepository; - dataValueRepository = 0; - - return value; - } - - return NULL; - } - - - void free(DataValueRepository* dataValueRepository) - { - if(dataValueRepository != NULL) - { - delete dataValueRepository; - } - } - } -} +#include "ValueParser.h" + +#include "DataBoardRepository.h" +#include "DataValueRepository.h" + +namespace Databoard { + namespace Value { + + void parse(std::string fileName, Databoard::Value::DataValueRepository* &dataValueRepository, Databoard::Type::DataBoardRepository* dataBoardRepository) + { + if(dataValueRepository == NULL) + { + dataValueRepository = new DataValueRepository(); + } + + if(dataBoardRepository != NULL) + { + dataValueRepository->open(fileName, dataBoardRepository); + } + } + + DATABOARD_API Databoard::Value::Value* parse(std::string fileName, Databoard::Type::DataType* dataType) + { + if(dataType != NULL) + { + Databoard::Value::DataValueRepository* dataValueRepository = new DataValueRepository(); + + Databoard::Value::Value* value = dataValueRepository->open(fileName, dataType); + + delete dataValueRepository; + dataValueRepository = 0; + + return value; + } + + return NULL; + } + + + void free(DataValueRepository* dataValueRepository) + { + if(dataValueRepository != NULL) + { + delete dataValueRepository; + } + } + } +}