-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generation of string classes for cpp (#42)
- Add generation of string classes (including Date, DateTime, MonthDay) - Fix create_class_assign functions to prevent duplicate entries in attributes with attribute_type list - Simplify and unify templates - Add BaseClass and fixed implementation for primitive classes (copied from libcimpp) - Unify BaseClass, Integer, Boolean with generated classes
- Loading branch information
Showing
18 changed files
with
723 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "BaseClass.hpp" | ||
|
||
using namespace CIMPP; | ||
|
||
BaseClass::~BaseClass() {} | ||
|
||
const char BaseClass::debugName[] = "BaseClass"; | ||
const char* BaseClass::debugString() const | ||
{ | ||
return BaseClass::debugName; | ||
} | ||
|
||
void BaseClass::addConstructToMap(std::unordered_map<std::string, BaseClass* (*)()>& factory_map) {} | ||
void BaseClass::addPrimitiveAssignFnsToMap(std::unordered_map<std::string, assign_function>& assign_map) {} | ||
void BaseClass::addClassAssignFnsToMap(std::unordered_map<std::string, class_assign_function>& assign_map) {} | ||
|
||
const BaseClassDefiner BaseClass::declare() | ||
{ | ||
return BaseClassDefiner(BaseClass::addConstructToMap, BaseClass::addPrimitiveAssignFnsToMap, BaseClass::addClassAssignFnsToMap, BaseClass::debugName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "BaseClass.hpp" |
Oops, something went wrong.