Skip to content

Commit

Permalink
Improve generated cpp classes: add rdfid to BaseClass
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Günther <[email protected]>
  • Loading branch information
tom-hg57 committed Oct 27, 2024
1 parent 661425b commit 396277f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions cimgen/languages/cpp/src/CIMContentHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void CIMContentHandler::startElement(const std::string &namespaceURI, const std:
{
(*idOb).mRID = rdf_id;
}
BaseClass_ptr->setRdfid(rdf_id);
RDFMap->emplace(rdf_id, BaseClass_ptr);
objectStack.push(BaseClass_ptr);
Objects->push_back(BaseClass_ptr);
Expand Down
4 changes: 4 additions & 0 deletions cimgen/languages/cpp/static/BaseClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@

class BaseClass
{
std::string rdfid;
public:
enum cgmesProfile {EQ = 0, SSH = 1, TP = 2, SV = 3, DY = 4, GL = 5, DI = 6};
virtual ~BaseClass();

void setRdfid(const std::string& id) { rdfid = id; }
std::string getRdfid() const { return rdfid; }

static const char debugName[];
virtual const char* debugString() const;

Expand Down

0 comments on commit 396277f

Please sign in to comment.