diff --git a/src/core/control/AFieldFactory.cpp b/src/core/control/AFieldFactory.cpp index 7871873..d967a80 100644 --- a/src/core/control/AFieldFactory.cpp +++ b/src/core/control/AFieldFactory.cpp @@ -1,12 +1,12 @@ #include "AFieldFactory.h" namespace NPC_core { namespace Control { -AFieldFactory::AFieldFactory() +FieldFactory::FieldFactory() { } -std::shared_ptr AFieldFactory::createField(std::string name, std::shared_ptr parentStructure) +std::shared_ptr FieldFactory::createField(std::string name, std::shared_ptr parentStructure) { auto f = std::make_shared(); f->setName(name); @@ -14,7 +14,7 @@ std::shared_ptr AFieldFactory::createField(std::string name, std:: return f; } -std::shared_ptr AFieldFactory::createFieldFull(std::string name, std::map syntaxes, std::shared_ptr parentStructure) +std::shared_ptr FieldFactory::createFieldFull(std::string name, std::map syntaxes, std::shared_ptr parentStructure) { auto f = std::make_shared(); f->setName(name); diff --git a/src/core/control/AFieldFactory.h b/src/core/control/AFieldFactory.h index 2ffe97c..e72c9f2 100644 --- a/src/core/control/AFieldFactory.h +++ b/src/core/control/AFieldFactory.h @@ -6,11 +6,11 @@ namespace NPC_core { namespace Control { -class AFieldFactory +class FieldFactory { public: - AFieldFactory(); - virtual ~AFieldFactory(); + FieldFactory(); + virtual ~FieldFactory(); virtual std::shared_ptr createField(std::string name, std::shared_ptr parentStructure = nullptr); virtual std::shared_ptr createFieldFull(std::string name, std::map syntaxes, std::shared_ptr parentStructure = nullptr); diff --git a/src/core/control/AModelFactory.cpp b/src/core/control/AModelFactory.cpp index b1d2f02..3827248 100644 --- a/src/core/control/AModelFactory.cpp +++ b/src/core/control/AModelFactory.cpp @@ -1,7 +1,7 @@ #include "AModelFactory.h" namespace NPC_core { namespace Control { -AModelFactory::AModelFactory() +ModelFactory::ModelFactory() { } diff --git a/src/core/control/AModelFactory.h b/src/core/control/AModelFactory.h index 5860060..4ab9b26 100644 --- a/src/core/control/AModelFactory.h +++ b/src/core/control/AModelFactory.h @@ -3,10 +3,10 @@ namespace NPC_core { namespace Control { -class AModelFactory +class ModelFactory { public: - AModelFactory(); + ModelFactory(); }; }} #endif // AMODELFACTORY_H diff --git a/src/core/control/ARepositoryFactory.cpp b/src/core/control/ARepositoryFactory.cpp index 976e435..e2f9cfd 100644 --- a/src/core/control/ARepositoryFactory.cpp +++ b/src/core/control/ARepositoryFactory.cpp @@ -1,7 +1,7 @@ #include "ARepositoryFactory.h" namespace NPC_core { namespace Control { -ARepositoryFactory::ARepositoryFactory() +RepositoryFactory::RepositoryFactory() { } diff --git a/src/core/control/ARepositoryFactory.h b/src/core/control/ARepositoryFactory.h index 4a49c30..3d57bf9 100644 --- a/src/core/control/ARepositoryFactory.h +++ b/src/core/control/ARepositoryFactory.h @@ -3,10 +3,10 @@ namespace NPC_core { namespace Control { -class ARepositoryFactory +class RepositoryFactory { public: - ARepositoryFactory(); + RepositoryFactory(); }; }} #endif // AREPOSITORYFACTORY_H diff --git a/src/core/control/AStructureFactory.cpp b/src/core/control/AStructureFactory.cpp index 87bd6d7..bbe37ec 100644 --- a/src/core/control/AStructureFactory.cpp +++ b/src/core/control/AStructureFactory.cpp @@ -1,7 +1,7 @@ #include "AStructureFactory.h" namespace NPC_core { namespace Control { -AStructureFactory::AStructureFactory() +StructureFactory::StructureFactory() { } diff --git a/src/core/control/AStructureFactory.h b/src/core/control/AStructureFactory.h index c97b645..8d71c69 100644 --- a/src/core/control/AStructureFactory.h +++ b/src/core/control/AStructureFactory.h @@ -3,10 +3,10 @@ namespace NPC_core { namespace Control { -class AStructureFactory +class StructureFactory { public: - AStructureFactory(); + StructureFactory(); }; }} #endif // ASTRUCTUREFACTORY_H diff --git a/src/core/model/Field.cpp b/src/core/model/Field.cpp index 526a3fc..18ba7a2 100644 --- a/src/core/model/Field.cpp +++ b/src/core/model/Field.cpp @@ -17,12 +17,12 @@ void Field::setName(const std::string &value) name = value; } -std::map Field::getSyntaxes() const +std::shared_ptr > Field::getSyntaxes() const { return syntaxes; } -void Field::setSyntaxes(const std::map &value) +void Field::setSyntaxes(const std::shared_ptr> &value) { syntaxes = value; } @@ -47,5 +47,15 @@ void Field::setParentStructure(const std::shared_ptr &value) parentStructure = value; } +std::shared_ptr > Field::getChooseableValues() const +{ + return chooseableValues; +} + +void Field::setChooseableValues(const std::shared_ptr > &value) +{ + chooseableValues = value; +} + } } diff --git a/src/core/model/Field.h b/src/core/model/Field.h index 20dcfbf..dc68faa 100644 --- a/src/core/model/Field.h +++ b/src/core/model/Field.h @@ -20,8 +20,8 @@ public: std::string getName() const; void setName(const std::string &value); - std::map getSyntaxes() const; - void setSyntaxes(const std::map &value); + std::shared_ptr> getSyntaxes() const; + void setSyntaxes(const std::shared_ptr> &value); std::string getValue() const; void setValue(const std::string &value); @@ -29,11 +29,15 @@ public: std::shared_ptr getParentStructure() const; void setParentStructure(const std::shared_ptr &value); + std::shared_ptr > getChooseableValues() const; + void setChooseableValues(const std::shared_ptr > &value); + protected: std::shared_ptr parentStructure; std::string name; - std::map syntaxes; // example : regex; for validation + std::shared_ptr> syntaxes; // example : regex; for validation std::string value; + std::shared_ptr> chooseableValues; }; }} diff --git a/src/core/model/Structure.cpp b/src/core/model/Structure.cpp index a061eff..5e13dc4 100644 --- a/src/core/model/Structure.cpp +++ b/src/core/model/Structure.cpp @@ -15,4 +15,14 @@ void Structure::setName(const std::string &value) { name = value; } + +uint Structure::getLayer() const +{ + return layer; +} + +void Structure::setLayer(const uint &value) +{ + layer = value; +} }} diff --git a/src/core/model/Structure.h b/src/core/model/Structure.h index bb2e0bf..a66ad41 100644 --- a/src/core/model/Structure.h +++ b/src/core/model/Structure.h @@ -20,9 +20,13 @@ public: std::string getName() const; void setName(const std::string &value); + uint getLayer() const; + void setLayer(const uint &value); + private: Tree elements; std::string name; + uint layer; }; }}