Skip to content

Commit

Permalink
Prevent cutting of string values (#35)
Browse files Browse the repository at this point in the history
Prevent cutting of string values at first space in assign methods
(update generated sources from
https://github.com/tom-hg57/cimgen/tree/fix-generation-of-string-classes-for-cpp).

This PR applies the fix to CGMES 2.4.13 and 3.
  • Loading branch information
m-mirz authored Dec 27, 2024
2 parents 7f6afb9 + 54eaaa1 commit 7db5861
Show file tree
Hide file tree
Showing 38 changed files with 175 additions and 175 deletions.
2 changes: 1 addition & 1 deletion CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bool assign_BasicIntervalSchedule_startTime(std::stringstream &buffer, BaseClass
{
if (BasicIntervalSchedule* element = dynamic_cast<BasicIntervalSchedule*>(BaseClass_ptr1))
{
buffer >> element->startTime;
element->startTime = buffer.str();
if (buffer.fail())
return false;
else
Expand Down
12 changes: 6 additions & 6 deletions CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream &buffer, BaseClass
{
if (ConnectivityNode* element = dynamic_cast<ConnectivityNode*>(BaseClass_ptr1))
{
buffer >> element->fromEndIsoCode;
element->fromEndIsoCode = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -56,7 +56,7 @@ bool assign_ConnectivityNode_fromEndName(std::stringstream &buffer, BaseClass* B
{
if (ConnectivityNode* element = dynamic_cast<ConnectivityNode*>(BaseClass_ptr1))
{
buffer >> element->fromEndName;
element->fromEndName = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -69,7 +69,7 @@ bool assign_ConnectivityNode_fromEndNameTso(std::stringstream &buffer, BaseClass
{
if (ConnectivityNode* element = dynamic_cast<ConnectivityNode*>(BaseClass_ptr1))
{
buffer >> element->fromEndNameTso;
element->fromEndNameTso = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -82,7 +82,7 @@ bool assign_ConnectivityNode_toEndIsoCode(std::stringstream &buffer, BaseClass*
{
if (ConnectivityNode* element = dynamic_cast<ConnectivityNode*>(BaseClass_ptr1))
{
buffer >> element->toEndIsoCode;
element->toEndIsoCode = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -95,7 +95,7 @@ bool assign_ConnectivityNode_toEndName(std::stringstream &buffer, BaseClass* Bas
{
if (ConnectivityNode* element = dynamic_cast<ConnectivityNode*>(BaseClass_ptr1))
{
buffer >> element->toEndName;
element->toEndName = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -108,7 +108,7 @@ bool assign_ConnectivityNode_toEndNameTso(std::stringstream &buffer, BaseClass*
{
if (ConnectivityNode* element = dynamic_cast<ConnectivityNode*>(BaseClass_ptr1))
{
buffer >> element->toEndNameTso;
element->toEndNameTso = buffer.str();
if (buffer.fail())
return false;
else
Expand Down
4 changes: 2 additions & 2 deletions CGMES_2.4.13_18DEC2013/Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bool assign_Control_controlType(std::stringstream &buffer, BaseClass* BaseClass_
{
if (Control* element = dynamic_cast<Control*>(BaseClass_ptr1))
{
buffer >> element->controlType;
element->controlType = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -50,7 +50,7 @@ bool assign_Control_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_pt
{
if (Control* element = dynamic_cast<Control*>(BaseClass_ptr1))
{
buffer >> element->timeStamp;
element->timeStamp = buffer.str();
if (buffer.fail())
return false;
else
Expand Down
2 changes: 1 addition & 1 deletion CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bool assign_CoordinateSystem_crsUrn(std::stringstream &buffer, BaseClass* BaseCl
{
if (CoordinateSystem* element = dynamic_cast<CoordinateSystem*>(BaseClass_ptr1))
{
buffer >> element->crsUrn;
element->crsUrn = buffer.str();
if (buffer.fail())
return false;
else
Expand Down
20 changes: 10 additions & 10 deletions CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool assign_DiagramLayoutVersion_baseUML(std::stringstream &buffer, BaseClass* B
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->baseUML;
element->baseUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -40,7 +40,7 @@ bool assign_DiagramLayoutVersion_baseURI(std::stringstream &buffer, BaseClass* B
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->baseURI;
element->baseURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -53,7 +53,7 @@ bool assign_DiagramLayoutVersion_date(std::stringstream &buffer, BaseClass* Base
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->date;
element->date = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -66,7 +66,7 @@ bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream &buffer, B
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->differenceModelURI;
element->differenceModelURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -79,7 +79,7 @@ bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream &buffer, BaseClass*
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->entsoeUML;
element->entsoeUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -92,7 +92,7 @@ bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream &buffer, BaseClass*
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->entsoeURI;
element->entsoeURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -105,7 +105,7 @@ bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream &buffer,
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->modelDescriptionURI;
element->modelDescriptionURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -118,7 +118,7 @@ bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream &buffer, BaseCla
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->namespaceRDF;
element->namespaceRDF = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -131,7 +131,7 @@ bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream &buffer, BaseCla
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->namespaceUML;
element->namespaceUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -144,7 +144,7 @@ bool assign_DiagramLayoutVersion_shortName(std::stringstream &buffer, BaseClass*
{
if (DiagramLayoutVersion* element = dynamic_cast<DiagramLayoutVersion*>(BaseClass_ptr1))
{
buffer >> element->shortName;
element->shortName = buffer.str();
if (buffer.fail())
return false;
else
Expand Down
20 changes: 10 additions & 10 deletions CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool assign_DynamicsVersion_baseUML(std::stringstream &buffer, BaseClass* BaseCl
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->baseUML;
element->baseUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -40,7 +40,7 @@ bool assign_DynamicsVersion_baseURI(std::stringstream &buffer, BaseClass* BaseCl
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->baseURI;
element->baseURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -53,7 +53,7 @@ bool assign_DynamicsVersion_date(std::stringstream &buffer, BaseClass* BaseClass
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->date;
element->date = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -66,7 +66,7 @@ bool assign_DynamicsVersion_differenceModelURI(std::stringstream &buffer, BaseCl
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->differenceModelURI;
element->differenceModelURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -79,7 +79,7 @@ bool assign_DynamicsVersion_entsoeUML(std::stringstream &buffer, BaseClass* Base
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->entsoeUML;
element->entsoeUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -92,7 +92,7 @@ bool assign_DynamicsVersion_entsoeURI(std::stringstream &buffer, BaseClass* Base
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->entsoeURI;
element->entsoeURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -105,7 +105,7 @@ bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream &buffer, BaseC
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->modelDescriptionURI;
element->modelDescriptionURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -118,7 +118,7 @@ bool assign_DynamicsVersion_namespaceRDF(std::stringstream &buffer, BaseClass* B
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->namespaceRDF;
element->namespaceRDF = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -131,7 +131,7 @@ bool assign_DynamicsVersion_namespaceUML(std::stringstream &buffer, BaseClass* B
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->namespaceUML;
element->namespaceUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -144,7 +144,7 @@ bool assign_DynamicsVersion_shortName(std::stringstream &buffer, BaseClass* Base
{
if (DynamicsVersion* element = dynamic_cast<DynamicsVersion*>(BaseClass_ptr1))
{
buffer >> element->shortName;
element->shortName = buffer.str();
if (buffer.fail())
return false;
else
Expand Down
22 changes: 11 additions & 11 deletions CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream &buffer, BaseClas
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->baseUML;
element->baseUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -41,7 +41,7 @@ bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream &buffer, BaseClas
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->baseURI;
element->baseURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -54,7 +54,7 @@ bool assign_EquipmentBoundaryVersion_date(std::stringstream &buffer, BaseClass*
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->date;
element->date = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -67,7 +67,7 @@ bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream &buffe
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->differenceModelURI;
element->differenceModelURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -80,7 +80,7 @@ bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseCl
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->entsoeUML;
element->entsoeUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -93,7 +93,7 @@ bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream &buffer, Ba
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->entsoeURIcore;
element->entsoeURIcore = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -106,7 +106,7 @@ bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream &buffe
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->entsoeURIoperation;
element->entsoeURIoperation = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -119,7 +119,7 @@ bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream &buff
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->modelDescriptionURI;
element->modelDescriptionURI = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -132,7 +132,7 @@ bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream &buffer, Bas
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->namespaceRDF;
element->namespaceRDF = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -145,7 +145,7 @@ bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream &buffer, Bas
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->namespaceUML;
element->namespaceUML = buffer.str();
if (buffer.fail())
return false;
else
Expand All @@ -158,7 +158,7 @@ bool assign_EquipmentBoundaryVersion_shortName(std::stringstream &buffer, BaseCl
{
if (EquipmentBoundaryVersion* element = dynamic_cast<EquipmentBoundaryVersion*>(BaseClass_ptr1))
{
buffer >> element->shortName;
element->shortName = buffer.str();
if (buffer.fail())
return false;
else
Expand Down
Loading

0 comments on commit 7db5861

Please sign in to comment.