diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2018-01-08 20:09:35 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-08 20:09:35 -0200 |
commit | 29af4e28898f44df444fef5534134c6b6000418d (patch) | |
tree | 13fd8f4449f2cfeed8a6185e96a6889f9529285d /Project | |
parent | 0c0280cfcf540f943fd2dbfdf7ac0304ea96a465 (diff) | |
parent | c11a42ee83fcf535557d4f2cc259efae2da1b7ff (diff) | |
download | PSP.git-29af4e28898f44df444fef5534134c6b6000418d.tar.gz PSP.git-29af4e28898f44df444fef5534134c6b6000418d.tar.xz PSP.git-29af4e28898f44df444fef5534134c6b6000418d.zip |
Merge pull request #44 from Thales1330/org/file-handling-and-ctrl-init
Org file handling and ctrl init
Diffstat (limited to 'Project')
56 files changed, 2727 insertions, 3070 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp index ee84ec2..eecc06a 100644 --- a/Project/Bus.cpp +++ b/Project/Bus.cpp @@ -258,3 +258,89 @@ bool Bus::GetPlotData(ElementPlotData& plotData) plotData.AddData(argVoltage, _("Angle")); return true; } + +rapidxml::xml_node<>* Bus::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + m_electricalData.number = m_elementID; + + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Bus"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + Element::SaveCADProperties(doc, elementNode); + + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto nominalVoltage = XMLParser::AppendNode(doc, electricalProp, "NominalVoltage"); + XMLParser::SetNodeValue(doc, nominalVoltage, m_electricalData.nominalVoltage); + XMLParser::SetNodeAttribute(doc, nominalVoltage, "UnitID", m_electricalData.nominalVoltageUnit); + auto isVoltageControlled = XMLParser::AppendNode(doc, electricalProp, "IsVoltageControlled"); + XMLParser::SetNodeValue(doc, isVoltageControlled, m_electricalData.isVoltageControlled); + auto controlledVoltage = XMLParser::AppendNode(doc, electricalProp, "ControlledVoltage"); + XMLParser::SetNodeValue(doc, controlledVoltage, m_electricalData.controlledVoltage); + XMLParser::SetNodeAttribute(doc, controlledVoltage, "Choice", m_electricalData.controlledVoltageUnitChoice); + auto slackBus = XMLParser::AppendNode(doc, electricalProp, "SlackBus"); + XMLParser::SetNodeValue(doc, slackBus, m_electricalData.slackBus); + + auto fault = XMLParser::AppendNode(doc, electricalProp, "Fault"); + auto hasFault = XMLParser::AppendNode(doc, fault, "HasFault"); + XMLParser::SetNodeValue(doc, hasFault, m_electricalData.hasFault); + auto faultType = XMLParser::AppendNode(doc, fault, "Type"); + XMLParser::SetNodeValue(doc, faultType, m_electricalData.faultType); + auto faultLocation = XMLParser::AppendNode(doc, fault, "Location"); + XMLParser::SetNodeValue(doc, faultLocation, m_electricalData.faultLocation); + auto faultResistance = XMLParser::AppendNode(doc, fault, "Resistance"); + XMLParser::SetNodeValue(doc, faultResistance, m_electricalData.faultResistance); + auto faultReactance = XMLParser::AppendNode(doc, fault, "Reactance"); + XMLParser::SetNodeValue(doc, faultReactance, m_electricalData.faultReactance); + + auto stability = XMLParser::AppendNode(doc, electricalProp, "Stability"); + auto plotBus = XMLParser::AppendNode(doc, stability, "Plot"); + XMLParser::SetNodeValue(doc, plotBus, m_electricalData.plotBus); + auto stabHasFault = XMLParser::AppendNode(doc, stability, "HasFault"); + XMLParser::SetNodeValue(doc, stabHasFault, m_electricalData.stabHasFault); + auto stabFaultTime = XMLParser::AppendNode(doc, stability, "FaultTime"); + XMLParser::SetNodeValue(doc, stabFaultTime, m_electricalData.stabFaultTime); + auto stabFaultLength = XMLParser::AppendNode(doc, stability, "FaultLength"); + XMLParser::SetNodeValue(doc, stabFaultLength, m_electricalData.stabFaultLength); + auto stabFaultResistance = XMLParser::AppendNode(doc, stability, "FaultResistance"); + XMLParser::SetNodeValue(doc, stabFaultResistance, m_electricalData.stabFaultResistance); + auto stabFaultReactance = XMLParser::AppendNode(doc, stability, "FaultReactance"); + XMLParser::SetNodeValue(doc, stabFaultReactance, m_electricalData.stabFaultReactance); + + return elementNode; +} + +bool Bus::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!Element::OpenCADProperties(elementNode)) return false; + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.nominalVoltage = XMLParser::GetNodeValueDouble(electricalProp, "NominalVoltage"); + m_electricalData.nominalVoltageUnit = + (ElectricalUnit)XMLParser::GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID"); + m_electricalData.isVoltageControlled = XMLParser::GetNodeValueInt(electricalProp, "IsVoltageControlled"); + m_electricalData.controlledVoltage = XMLParser::GetNodeValueDouble(electricalProp, "ControlledVoltage"); + m_electricalData.controlledVoltageUnitChoice = + XMLParser::GetAttributeValueInt(electricalProp, "ControlledVoltage", "Choice"); + m_electricalData.slackBus = XMLParser::GetNodeValueInt(electricalProp, "SlackBus"); + auto fault = electricalProp->first_node("Fault"); + m_electricalData.hasFault = XMLParser::GetNodeValueInt(fault, "HasFault"); + m_electricalData.faultType = (FaultData)XMLParser::GetNodeValueInt(fault, "Type"); + m_electricalData.faultLocation = (FaultData)XMLParser::GetNodeValueInt(fault, "Location"); + m_electricalData.faultResistance = XMLParser::GetNodeValueDouble(fault, "Resistance"); + m_electricalData.faultReactance = XMLParser::GetNodeValueDouble(fault, "Reactance"); + auto stability = electricalProp->first_node("Stability"); + m_electricalData.plotBus = XMLParser::GetNodeValueInt(stability, "Plot"); + m_electricalData.stabHasFault = XMLParser::GetNodeValueInt(stability, "HasFault"); + m_electricalData.stabFaultTime = XMLParser::GetNodeValueDouble(stability, "FaultTime"); + m_electricalData.stabFaultLength = XMLParser::GetNodeValueDouble(stability, "FaultLength"); + m_electricalData.stabFaultResistance = XMLParser::GetNodeValueDouble(stability, "FaultResistance"); + m_electricalData.stabFaultReactance = XMLParser::GetNodeValueDouble(stability, "FaultReactance"); + + if(m_electricalData.stabHasFault) SetDynamicEvent(true); + return true; +} diff --git a/Project/Bus.h b/Project/Bus.h index f4bdb04..503299e 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -88,6 +88,9 @@ class Bus : public PowerElement virtual void SetElectricalData(BusElectricalData electricalData) { m_electricalData = electricalData; } virtual bool ShowForm(wxWindow* parent, Element* element); virtual bool GetPlotData(ElementPlotData& plotData); + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); protected: BusElectricalData m_electricalData; diff --git a/Project/Capacitor.cpp b/Project/Capacitor.cpp index 4f7491f..76dc3fd 100644 --- a/Project/Capacitor.cpp +++ b/Project/Capacitor.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "ReactiveShuntElementForm.h" #include "Capacitor.h" +#include "ReactiveShuntElementForm.h" Capacitor::Capacitor() : Shunt() {} Capacitor::Capacitor(wxString name) : Shunt() { m_electricalData.name = name; } @@ -217,3 +217,44 @@ wxString Capacitor::GetTipText() const return tipText; } + +rapidxml::xml_node<>* Capacitor::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Capacitor"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto reactivePower = XMLParser::AppendNode(doc, electricalProp, "ReactivePower"); + XMLParser::SetNodeValue(doc, reactivePower, m_electricalData.reactivePower); + XMLParser::SetNodeAttribute(doc, reactivePower, "UnitID", m_electricalData.reactivePowerUnit); + + SaveSwitchingData(doc, electricalProp); + + return elementNode; +} + +bool Capacitor::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + if(!OpenCADProperties(elementNode, parentList)) return false; + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.reactivePower = XMLParser::GetNodeValueDouble(electricalProp, "ReactivePower"); + m_electricalData.reactivePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID")); + + if(!OpenSwitchingData(electricalProp)) return false; + if(m_swData.swTime.size() != 0) SetDynamicEvent(true); + + m_inserted = true; + return true; +} diff --git a/Project/Capacitor.h b/Project/Capacitor.h index 1a6ed57..8cf1c64 100644 --- a/Project/Capacitor.h +++ b/Project/Capacitor.h @@ -54,6 +54,10 @@ class Capacitor : public Shunt virtual CapacitorElectricalData GetElectricalData() { return m_electricalData; } virtual CapacitorElectricalData GetPUElectricalData(double systemPowerBase); virtual void SetElectricalData(CapacitorElectricalData electricalData) { m_electricalData = electricalData; } + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + protected: CapacitorElectricalData m_electricalData; }; diff --git a/Project/Constant.cpp b/Project/Constant.cpp index f99eab6..c81a0cf 100644 --- a/Project/Constant.cpp +++ b/Project/Constant.cpp @@ -32,6 +32,7 @@ Constant::~Constant() { if(m_glText) delete m_glText; } + void Constant::Draw(wxPoint2DDouble translation, double scale) const { glLineWidth(1.0); @@ -127,3 +128,31 @@ bool Constant::UpdateText() if(!m_glText->IsTextureOK()) return false; return true; } + +rapidxml::xml_node<>* Constant::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Constant"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto value = XMLParser::AppendNode(doc, elementNode, "Value"); + XMLParser::SetNodeValue(doc, value, m_value); + + return elementNode; +} + +bool Constant::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + double value = XMLParser::GetNodeValueDouble(elementNode, "Value"); + + SetPosition(m_position); + SetValue(value); + return true; +} diff --git a/Project/Constant.h b/Project/Constant.h index b9e9f93..dd4dbfa 100644 --- a/Project/Constant.h +++ b/Project/Constant.h @@ -48,6 +48,9 @@ class Constant : public ControlElement virtual double GetValue() const { return m_value; } virtual void UpdatePoints(); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/ControlElement.cpp b/Project/ControlElement.cpp index 51f3a2a..5e8a80d 100644 --- a/Project/ControlElement.cpp +++ b/Project/ControlElement.cpp @@ -108,9 +108,7 @@ void ControlElement::DrawNodes() const for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) { Node* node = *it; DrawCircle(node->GetPosition(), node->GetRadius(), 10, GL_POLYGON); - if(node->GetNodeType() == Node::NODE_IN) { - DrawTriangle(node->GetInTrianglePts()); - } + if(node->GetNodeType() == Node::NODE_IN) { DrawTriangle(node->GetInTrianglePts()); } } } @@ -118,17 +116,13 @@ void ControlElement::StartMove(wxPoint2DDouble position) { m_moveStartPt = position; m_movePos = m_position; - for(int i = 0; i < (int)m_nodeList.size(); ++i) { - m_nodeList[i]->StartMove(position); - } + for(int i = 0; i < (int)m_nodeList.size(); ++i) { m_nodeList[i]->StartMove(position); } } void ControlElement::Move(wxPoint2DDouble position) { SetPosition(m_movePos + position - m_moveStartPt); - for(int i = 0; i < (int)m_nodeList.size(); ++i) { - m_nodeList[i]->Move(position); - } + for(int i = 0; i < (int)m_nodeList.size(); ++i) { m_nodeList[i]->Move(position); } } bool ControlElement::Solve(double* input, double timeStep) @@ -146,3 +140,64 @@ void ControlElement::ReplaceNode(Node* oldNode, Node* newNode) if(m_nodeList[i] == oldNode) m_nodeList[i] = newNode; } } + +ControlElement* ControlElement::GetControlElementFromID(std::vector<ControlElement*> elementList, int id) +{ + for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) { + ControlElement* element = *it; + if(element->GetID() == id) return element; + } + return NULL; +} + +void ControlElement::SaveControlNodes(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode) +{ + auto nodeList = XMLParser::AppendNode(doc, elementNode, "NodeList"); + int id = 0; + for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) { + Node* node = *it; + node->SetID(id); + auto nodeN = XMLParser::AppendNode(doc, nodeList, "Node"); + XMLParser::SetNodeAttribute(doc, nodeN, "ID", id); + auto nodePosition = XMLParser::AppendNode(doc, nodeN, "Position"); + auto posNodeX = XMLParser::AppendNode(doc, nodePosition, "X"); + XMLParser::SetNodeValue(doc, posNodeX, node->GetPosition().m_x); + auto posNodeY = XMLParser::AppendNode(doc, nodePosition, "Y"); + XMLParser::SetNodeValue(doc, posNodeY, node->GetPosition().m_y); + auto angle = XMLParser::AppendNode(doc, nodeN, "Angle"); + XMLParser::SetNodeValue(doc, angle, node->GetAngle()); + auto nodeType = XMLParser::AppendNode(doc, nodeN, "Type"); + XMLParser::SetNodeValue(doc, nodeType, node->GetNodeType()); + id++; + } +} + +bool ControlElement::OpenControlNodes(rapidxml::xml_node<>* elementNode) +{ + // Clear old nodes + for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) delete *it; + m_nodeList.clear(); + + auto nodeList = elementNode->first_node("NodeList"); + if(!nodeList) return false; + auto nodeN = nodeList->first_node("Node"); + while(nodeN) { + auto nodePosition = nodeN->first_node("Position"); + double nodePosX = XMLParser::GetNodeValueDouble(nodePosition, "X"); + double nodePosY = XMLParser::GetNodeValueDouble(nodePosition, "Y"); + double nodeAngle = XMLParser::GetNodeValueDouble(nodeN, "Angle"); + Node::NodeType nodeType = static_cast<Node::NodeType>(XMLParser::GetNodeValueInt(nodeN, "Type")); + Node* node = new Node(wxPoint2DDouble(nodePosX, nodePosY), nodeType, 2.0); + node->SetAngle(nodeAngle); + m_nodeList.push_back(node); + nodeN = nodeN->next_sibling("Node"); + } + return true; +} + +bool ControlElement::Initialize() +{ + m_solved = false; + m_output = 0.0; + return true; +} diff --git a/Project/ControlElement.h b/Project/ControlElement.h index dbff95e..51f8df3 100644 --- a/Project/ControlElement.h +++ b/Project/ControlElement.h @@ -58,6 +58,7 @@ class Node void SetConnected(bool connected = true) { m_connected = connected; } int GetID() const { return m_id; } void SetID(int id) { m_id = id; } + protected: int m_id = -1; @@ -94,7 +95,7 @@ class ControlElement : public Element std::vector<Node*> GetNodeList() const { return m_nodeList; } virtual void DrawNodes() const; virtual void ReplaceNode(Node* oldNode, Node* newNode); - + /** * @brief Update the OpenGL text in the element (if present). * @return true if OpenGLText is ok, false otherwise. @@ -103,13 +104,19 @@ class ControlElement : public Element virtual bool IsSolved() const { return m_solved; } virtual void SetSolved(bool solved = true) { m_solved = solved; } virtual bool Solve(double* input, double timeStep); - virtual bool Initialize() { return true; } + virtual bool Initialize(); virtual double GetOutput() const { return m_output; } virtual void SetOutput(double output) { m_output = output; } + + static ControlElement* GetControlElementFromID(std::vector<ControlElement*> elementList, int id); + protected: std::vector<Node*> m_nodeList; bool m_solved = false; double m_output = 0.0; + + void SaveControlNodes(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode); + bool OpenControlNodes(rapidxml::xml_node<>* elementNode); }; #endif // CONTROLELEMENT_H diff --git a/Project/ControlElementSolver.cpp b/Project/ControlElementSolver.cpp index 84de9d7..7849313 100644 --- a/Project/ControlElementSolver.cpp +++ b/Project/ControlElementSolver.cpp @@ -50,7 +50,7 @@ void ControlElementSolver::Initialize(wxWindow* parent, double timeStep, double { // Init the input array size if(m_inputToSolve) delete[] m_inputToSolve; - m_inputToSolve = new double[3]; + m_inputToSolve = new double[3]; // Check if the sistem have one input and one output bool fail = false; auto ioList = m_ctrlContainer->GetIOControlList(); @@ -107,25 +107,15 @@ bool ControlElementSolver::InitializeValues(bool startAllZero) // Reset Elements values auto elementList = m_ctrlContainer->GetControlElementsList(); for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) { - ControlElement* element = *it; - element->SetSolved(false); - element->SetOutput(0.0); - } - auto tfList = m_ctrlContainer->GetTFList(); - for(auto it = tfList.begin(), itEnd = tfList.end(); it != itEnd; ++it) { - TransferFunction* tf = *it; - tf->CalculateSpaceState(100, m_integrationError); + if(!(*it)->Initialize()) return false; } auto connectionLineList = m_ctrlContainer->GetConnectionLineList(); for(auto it = connectionLineList.begin(), itEnd = connectionLineList.end(); it != itEnd; ++it) { - ConnectionLine* cLine = *it; - cLine->SetSolved(false); - cLine->SetValue(0.0); + if(!(*it)->Initialize()) return false; } - auto mathExprList = m_ctrlContainer->GetMathExprList(); - for(auto it = mathExprList.begin(), itEnd = mathExprList.end(); it != itEnd; ++it) { - MathExpression* mathExpr = *it; - if(!mathExpr->Initialize()) return false; + auto tfList = m_ctrlContainer->GetTFList(); + for(auto it = tfList.begin(), itEnd = tfList.end(); it != itEnd; ++it) { + (*it)->CalculateSpaceState(100, m_integrationError); } if(!startAllZero) { @@ -195,6 +185,23 @@ void ControlElementSolver::SolveNextStep() } } + // Solve math expression without inputs (but connected) + auto mathExprList = m_ctrlContainer->GetMathExprList(); + for(auto it = mathExprList.begin(), itEnd = mathExprList.end(); it != itEnd; ++it) { + MathExpression* mathExpr = *it; + if(mathExpr->GetVariables().size() == 0) { // No variables, no inputs. + m_inputToSolve[0] = 0.0; + m_inputToSolve[1] = m_currentTime; + m_inputToSolve[2] = m_switchStatus; + mathExpr->Solve(m_inputToSolve, m_timeStep); + mathExpr->SetSolved(); + ConnectionLine* child = static_cast<ConnectionLine*>(mathExpr->GetChildList()[0]); + child->SetValue(mathExpr->GetOutput()); + child->SetSolved(); + FillAllConnectedChildren(child); + } + } + // Set value to the connected lines in inputs auto ioList = m_ctrlContainer->GetIOControlList(); for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) { diff --git a/Project/Divider.cpp b/Project/Divider.cpp index 3f7027d..e723de3 100644 --- a/Project/Divider.cpp +++ b/Project/Divider.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "Divider.h" #include "ConnectionLine.h" +#include "Divider.h" Divider::Divider(int id) : MathOperation(id) {} Divider::~Divider() {} @@ -75,3 +75,25 @@ Element* Divider::GetCopy() *copy = *this; return copy; } + +rapidxml::xml_node<>* Divider::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Divider"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + return elementNode; +} + +bool Divider::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + StartMove(m_position); + UpdatePoints(); + + return true; +} diff --git a/Project/Divider.h b/Project/Divider.h index d31828d..5b74f9c 100644 --- a/Project/Divider.h +++ b/Project/Divider.h @@ -37,6 +37,10 @@ class Divider : public MathOperation virtual void DrawSymbol() const; virtual bool Solve(double* input, double timeStep); + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); }; diff --git a/Project/Element.cpp b/Project/Element.cpp index 6c2cbe9..46aaa7d 100644 --- a/Project/Element.cpp +++ b/Project/Element.cpp @@ -60,9 +60,7 @@ void Element::DrawArc(wxPoint2DDouble position, void Element::DrawTriangle(std::vector<wxPoint2DDouble> points, GLenum mode) const { glBegin(mode); - for(int i = 0; i < 3; i++) { - glVertex2d(points[i].m_x, points[i].m_y); - } + for(int i = 0; i < 3; i++) { glVertex2d(points[i].m_x, points[i].m_y); } glEnd(); } @@ -89,9 +87,7 @@ void Element::DrawRectangle(wxPoint2DDouble* points, GLenum mode) const void Element::DrawLine(std::vector<wxPoint2DDouble> points, GLenum mode) const { glBegin(mode); - for(auto it = points.begin(); it != points.end(); ++it) { - glVertex2d((*it).m_x, (*it).m_y); - } + for(auto it = points.begin(); it != points.end(); ++it) { glVertex2d((*it).m_x, (*it).m_y); } glEnd(); } @@ -248,15 +244,18 @@ void Element::GeneralMenuItens(wxMenu& menu) wxString exePath = exeFileName.GetPath(); wxMenuItem* clockItem = new wxMenuItem(&menu, ID_ROTATE_CLOCK, _("Rotate clockwise")); - clockItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\rotateClock16.png", wxPATH_WIN).GetPath())); + clockItem->SetBitmap( + wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\rotateClock16.png", wxPATH_WIN).GetPath())); menu.Append(clockItem); wxMenuItem* counterClockItem = new wxMenuItem(&menu, ID_ROTATE_COUNTERCLOCK, _("Rotate counter-clockwise")); - counterClockItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\rotateCounterClock16.png", wxPATH_WIN).GetPath())); + counterClockItem->SetBitmap(wxImage( + exePath + wxFileName::DirName("\\..\\data\\images\\menu\\rotateCounterClock16.png", wxPATH_WIN).GetPath())); menu.Append(counterClockItem); wxMenuItem* deleteItem = new wxMenuItem(&menu, ID_DELETE, _("Delete")); - deleteItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\delete16.png", wxPATH_WIN).GetPath())); + deleteItem->SetBitmap( + wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\delete16.png", wxPATH_WIN).GetPath())); menu.Append(deleteItem); } @@ -268,9 +267,7 @@ void Element::CalculateBoundaries(wxPoint2DDouble& leftUp, wxPoint2DDouble& righ wxPoint2DDouble rectCorner[4] = {m_rect.GetLeftTop(), m_rect.GetLeftBottom(), m_rect.GetRightBottom(), m_rect.GetRightTop()}; // Rotate corners. - for(int i = 0; i < 4; ++i) { - rectCorner[i] = RotateAtPosition(rectCorner[i], m_angle); - } + for(int i = 0; i < 4; ++i) { rectCorner[i] = RotateAtPosition(rectCorner[i], m_angle); } leftUp = rectCorner[0]; rightBottom = rectCorner[0]; for(int i = 1; i < 4; ++i) { @@ -414,3 +411,36 @@ double Element::PointToLineDistance(wxPoint2DDouble point, int* segmentNumber) c return distance; } + +void Element::SaveCADProperties(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode) +{ + auto cadProp = XMLParser::AppendNode(doc, elementNode, "CADProperties"); + auto position = XMLParser::AppendNode(doc, cadProp, "Position"); + auto posX = XMLParser::AppendNode(doc, position, "X"); + XMLParser::SetNodeValue(doc, posX, m_position.m_x); + auto posY = XMLParser::AppendNode(doc, position, "Y"); + XMLParser::SetNodeValue(doc, posY, m_position.m_y); + auto size = XMLParser::AppendNode(doc, cadProp, "Size"); + auto width = XMLParser::AppendNode(doc, size, "Width"); + XMLParser::SetNodeValue(doc, width, m_width); + auto height = XMLParser::AppendNode(doc, size, "Height"); + XMLParser::SetNodeValue(doc, height, m_height); + auto angle = XMLParser::AppendNode(doc, cadProp, "Angle"); + XMLParser::SetNodeValue(doc, angle, m_angle); +} + +bool Element::OpenCADProperties(rapidxml::xml_node<>* elementNode) +{ + auto cadPropNode = elementNode->first_node("CADProperties"); + if(!cadPropNode) return false; + + auto position = cadPropNode->first_node("Position"); + double posX = XMLParser::GetNodeValueDouble(position, "X"); + double posY = XMLParser::GetNodeValueDouble(position, "Y"); + auto size = cadPropNode->first_node("Size"); + m_width = XMLParser::GetNodeValueDouble(size, "Width"); + m_height = XMLParser::GetNodeValueDouble(size, "Height"); + m_angle = XMLParser::GetNodeValueDouble(cadPropNode, "Angle"); + SetPosition(wxPoint2DDouble(posX, posY)); + return true; +} diff --git a/Project/Element.h b/Project/Element.h index 21f8def..b31a81a 100644 --- a/Project/Element.h +++ b/Project/Element.h @@ -28,6 +28,8 @@ #include <complex> +#include "XMLParser.h" + //#include <wx/log.h> /** @@ -564,6 +566,11 @@ class Element * @return The distance between the point and the line. */ virtual double PointToLineDistance(wxPoint2DDouble point, int* segmentNumber = NULL) const; + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) { return NULL; } + virtual bool OpenElement(rapidxml::xml_node<>* elementNode) { return true; } + void SaveCADProperties(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode); + bool OpenCADProperties(rapidxml::xml_node<>* elementNode); protected: int m_elementID = 0; diff --git a/Project/Exponential.cpp b/Project/Exponential.cpp index a021854..136a2fa 100644 --- a/Project/Exponential.cpp +++ b/Project/Exponential.cpp @@ -131,7 +131,7 @@ void Exponential::SetValues(double aValue, double bValue) bool Exponential::Solve(double* input, double timeStep) { - if(!input){ + if(!input) { m_output = 0.0; return true; } @@ -145,3 +145,35 @@ Element* Exponential::GetCopy() *copy = *this; return copy; } + +rapidxml::xml_node<>* Exponential::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Exponential"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + auto value = XMLParser::AppendNode(doc, elementNode, "Value"); + auto aValue = XMLParser::AppendNode(doc, value, "A"); + XMLParser::SetNodeValue(doc, aValue, m_aValue); + auto bValue = XMLParser::AppendNode(doc, value, "B"); + XMLParser::SetNodeValue(doc, bValue, m_bValue); + + return elementNode; +} + +bool Exponential::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + auto value = elementNode->first_node("Value"); + m_aValue = XMLParser::GetNodeValueDouble(value, "A"); + m_bValue = XMLParser::GetNodeValueDouble(value, "B"); + + StartMove(m_position); + UpdatePoints(); + return true; +} diff --git a/Project/Exponential.h b/Project/Exponential.h index f9a65ec..7d7f44e 100644 --- a/Project/Exponential.h +++ b/Project/Exponential.h @@ -45,10 +45,10 @@ class Exponential : public ControlElement virtual void GetValues(double& aValue, double& bValue); virtual void SetValues(double aValue, double bValue); - + /** * @brief Calculates the exponential. - * + * * <center>\f$ output = A\cdot e^{B\cdot input} \f$</center> * @param input Input value. * @param timeStep Time step. @@ -56,6 +56,9 @@ class Exponential : public ControlElement */ virtual bool Solve(double* input, double timeStep); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/FileHanding.cpp b/Project/FileHanding.cpp index 7ef66c7..7262c57 100644 --- a/Project/FileHanding.cpp +++ b/Project/FileHanding.cpp @@ -41,849 +41,204 @@ void FileHanding::SaveProject(wxFileName path) rapidxml::xml_node<>* rootNode = doc.allocate_node(rapidxml::node_element, "Project"); doc.append_node(rootNode); - rapidxml::xml_node<>* projectNameNode = AppendNode(doc, rootNode, "Name"); - SetNodeValue(doc, projectNameNode, path.GetName()); + rapidxml::xml_node<>* projectNameNode = XMLParser::AppendNode(doc, rootNode, "Name"); + XMLParser::SetNodeValue(doc, projectNameNode, path.GetName()); //{ Simulation properties PropertiesData* properties = m_workspace->GetProperties(); - auto propertiesNode = AppendNode(doc, rootNode, "Properties"); + auto propertiesNode = XMLParser::AppendNode(doc, rootNode, "Properties"); SimulationData simulationData = properties->GetSimulationPropertiesData(); - auto simulationPropNode = AppendNode(doc, propertiesNode, "SimulationProperties"); - - auto generalPropNode = AppendNode(doc, simulationPropNode, "General"); - auto basePower = AppendNode(doc, generalPropNode, "BasePower"); - SetNodeValue(doc, basePower, simulationData.basePower); - SetNodeAttribute(doc, basePower, "UnitID", simulationData.basePowerUnit); - auto contCalc = AppendNode(doc, generalPropNode, "ContinuousCalculation"); - auto contCalcFault = AppendNode(doc, contCalc, "Fault"); - SetNodeValue(doc, contCalcFault, simulationData.faultAfterPowerFlow); - auto contCalcSCPower = AppendNode(doc, contCalc, "SCPower"); - SetNodeValue(doc, contCalcSCPower, simulationData.scPowerAfterPowerFlow); - - auto powerFlowPropNode = AppendNode(doc, simulationPropNode, "PowerFlow"); - auto solutionMethod = AppendNode(doc, powerFlowPropNode, "SolutionMethod"); - SetNodeValue(doc, solutionMethod, simulationData.powerFlowMethod); - auto accFactor = AppendNode(doc, powerFlowPropNode, "AccFactor"); - SetNodeValue(doc, accFactor, simulationData.accFator); - auto pfTolerance = AppendNode(doc, powerFlowPropNode, "Tolerance"); - SetNodeValue(doc, pfTolerance, simulationData.powerFlowTolerance); - auto pfMaxIter = AppendNode(doc, powerFlowPropNode, "MaxIterations"); - SetNodeValue(doc, pfMaxIter, simulationData.powerFlowMaxIterations); - - auto stabilityPropNode = AppendNode(doc, simulationPropNode, "Stability"); - auto timeStep = AppendNode(doc, stabilityPropNode, "TimeStep"); - SetNodeValue(doc, timeStep, simulationData.timeStep); - auto simTime = AppendNode(doc, stabilityPropNode, "SimulationTime"); - SetNodeValue(doc, simTime, simulationData.stabilitySimulationTime); - auto freq = AppendNode(doc, stabilityPropNode, "Frequency"); - SetNodeValue(doc, freq, simulationData.stabilityFrequency); - auto stabTolerance = AppendNode(doc, stabilityPropNode, "Tolerance"); - SetNodeValue(doc, stabTolerance, simulationData.stabilityTolerance); - auto stabTMaxIter = AppendNode(doc, stabilityPropNode, "MaxIterations"); - SetNodeValue(doc, stabTMaxIter, simulationData.stabilityMaxIterations); - auto controlRatio = AppendNode(doc, stabilityPropNode, "ControlStepRatio"); - SetNodeValue(doc, controlRatio, simulationData.controlTimeStepRatio); - auto plotStep = AppendNode(doc, stabilityPropNode, "PlotStep"); - SetNodeValue(doc, plotStep, simulationData.plotTime); - auto useCOI = AppendNode(doc, stabilityPropNode, "UseCOI"); - SetNodeValue(doc, useCOI, simulationData.useCOI); - - auto zipPropNode = AppendNode(doc, simulationPropNode, "ZIPLoad"); - auto useCompLoads = AppendNode(doc, zipPropNode, "UseCompositeLoad"); - SetNodeValue(doc, useCompLoads, simulationData.useCompLoads); - auto activePowerComp = AppendNode(doc, zipPropNode, "ActivePowerComposition"); - auto pz = AppendNode(doc, activePowerComp, "ConstantImpedance"); - SetNodeValue(doc, pz, simulationData.constImpedanceActive); - auto pi = AppendNode(doc, activePowerComp, "ConstantCurrent"); - SetNodeValue(doc, pi, simulationData.constCurrentActive); - auto pp = AppendNode(doc, activePowerComp, "ConstantPower"); - SetNodeValue(doc, pp, simulationData.constPowerActive); - auto reactivePowerComp = AppendNode(doc, zipPropNode, "ReactivePowerComposition"); - auto qz = AppendNode(doc, reactivePowerComp, "ConstantImpedance"); - SetNodeValue(doc, qz, simulationData.constImpedanceReactive); - auto qi = AppendNode(doc, reactivePowerComp, "ConstantCurrent"); - SetNodeValue(doc, qi, simulationData.constCurrentReactive); - auto qp = AppendNode(doc, reactivePowerComp, "ConstantPower"); - SetNodeValue(doc, qp, simulationData.constPowerReactive); - auto undervoltageLim = AppendNode(doc, zipPropNode, "UndervoltageLimit"); - auto uvi = AppendNode(doc, undervoltageLim, "ConstantCurrent"); - SetNodeValue(doc, uvi, simulationData.underVoltageConstCurrent); - auto uvp = AppendNode(doc, undervoltageLim, "ConstantPower"); - SetNodeValue(doc, uvp, simulationData.underVoltageConstPower); + auto simulationPropNode = XMLParser::XMLParser::AppendNode(doc, propertiesNode, "SimulationProperties"); + + auto generalPropNode = XMLParser::AppendNode(doc, simulationPropNode, "General"); + auto basePower = XMLParser::AppendNode(doc, generalPropNode, "BasePower"); + XMLParser::SetNodeValue(doc, basePower, simulationData.basePower); + XMLParser::SetNodeAttribute(doc, basePower, "UnitID", simulationData.basePowerUnit); + auto contCalc = XMLParser::AppendNode(doc, generalPropNode, "ContinuousCalculation"); + auto contCalcFault = XMLParser::AppendNode(doc, contCalc, "Fault"); + XMLParser::SetNodeValue(doc, contCalcFault, simulationData.faultAfterPowerFlow); + auto contCalcSCPower = XMLParser::AppendNode(doc, contCalc, "SCPower"); + XMLParser::SetNodeValue(doc, contCalcSCPower, simulationData.scPowerAfterPowerFlow); + + auto powerFlowPropNode = XMLParser::AppendNode(doc, simulationPropNode, "PowerFlow"); + auto solutionMethod = XMLParser::AppendNode(doc, powerFlowPropNode, "SolutionMethod"); + XMLParser::SetNodeValue(doc, solutionMethod, simulationData.powerFlowMethod); + auto accFactor = XMLParser::AppendNode(doc, powerFlowPropNode, "AccFactor"); + XMLParser::SetNodeValue(doc, accFactor, simulationData.accFator); + auto pfTolerance = XMLParser::AppendNode(doc, powerFlowPropNode, "Tolerance"); + XMLParser::SetNodeValue(doc, pfTolerance, simulationData.powerFlowTolerance); + auto pfMaxIter = XMLParser::AppendNode(doc, powerFlowPropNode, "MaxIterations"); + XMLParser::SetNodeValue(doc, pfMaxIter, simulationData.powerFlowMaxIterations); + + auto stabilityPropNode = XMLParser::AppendNode(doc, simulationPropNode, "Stability"); + auto timeStep = XMLParser::AppendNode(doc, stabilityPropNode, "TimeStep"); + XMLParser::SetNodeValue(doc, timeStep, simulationData.timeStep); + auto simTime = XMLParser::AppendNode(doc, stabilityPropNode, "SimulationTime"); + XMLParser::SetNodeValue(doc, simTime, simulationData.stabilitySimulationTime); + auto freq = XMLParser::AppendNode(doc, stabilityPropNode, "Frequency"); + XMLParser::SetNodeValue(doc, freq, simulationData.stabilityFrequency); + auto stabTolerance = XMLParser::AppendNode(doc, stabilityPropNode, "Tolerance"); + XMLParser::SetNodeValue(doc, stabTolerance, simulationData.stabilityTolerance); + auto stabTMaxIter = XMLParser::AppendNode(doc, stabilityPropNode, "MaxIterations"); + XMLParser::SetNodeValue(doc, stabTMaxIter, simulationData.stabilityMaxIterations); + auto controlRatio = XMLParser::AppendNode(doc, stabilityPropNode, "ControlStepRatio"); + XMLParser::SetNodeValue(doc, controlRatio, simulationData.controlTimeStepRatio); + auto plotStep = XMLParser::AppendNode(doc, stabilityPropNode, "PlotStep"); + XMLParser::SetNodeValue(doc, plotStep, simulationData.plotTime); + auto useCOI = XMLParser::AppendNode(doc, stabilityPropNode, "UseCOI"); + XMLParser::SetNodeValue(doc, useCOI, simulationData.useCOI); + + auto zipPropNode = XMLParser::AppendNode(doc, simulationPropNode, "ZIPLoad"); + auto useCompLoads = XMLParser::AppendNode(doc, zipPropNode, "UseCompositeLoad"); + XMLParser::SetNodeValue(doc, useCompLoads, simulationData.useCompLoads); + auto activePowerComp = XMLParser::AppendNode(doc, zipPropNode, "ActivePowerComposition"); + auto pz = XMLParser::AppendNode(doc, activePowerComp, "ConstantImpedance"); + XMLParser::SetNodeValue(doc, pz, simulationData.constImpedanceActive); + auto pi = XMLParser::AppendNode(doc, activePowerComp, "ConstantCurrent"); + XMLParser::SetNodeValue(doc, pi, simulationData.constCurrentActive); + auto pp = XMLParser::AppendNode(doc, activePowerComp, "ConstantPower"); + XMLParser::SetNodeValue(doc, pp, simulationData.constPowerActive); + auto reactivePowerComp = XMLParser::AppendNode(doc, zipPropNode, "ReactivePowerComposition"); + auto qz = XMLParser::AppendNode(doc, reactivePowerComp, "ConstantImpedance"); + XMLParser::SetNodeValue(doc, qz, simulationData.constImpedanceReactive); + auto qi = XMLParser::AppendNode(doc, reactivePowerComp, "ConstantCurrent"); + XMLParser::SetNodeValue(doc, qi, simulationData.constCurrentReactive); + auto qp = XMLParser::AppendNode(doc, reactivePowerComp, "ConstantPower"); + XMLParser::SetNodeValue(doc, qp, simulationData.constPowerReactive); + auto undervoltageLim = XMLParser::AppendNode(doc, zipPropNode, "UndervoltageLimit"); + auto uvi = XMLParser::AppendNode(doc, undervoltageLim, "ConstantCurrent"); + XMLParser::SetNodeValue(doc, uvi, simulationData.underVoltageConstCurrent); + auto uvp = XMLParser::AppendNode(doc, undervoltageLim, "ConstantPower"); + XMLParser::SetNodeValue(doc, uvp, simulationData.underVoltageConstPower); //} - auto elementsNode = AppendNode(doc, rootNode, "Elements"); + auto elementsNode = XMLParser::AppendNode(doc, rootNode, "Elements"); // Save all the data ElectricCalculation allElements; allElements.GetElementsFromList(m_workspace->GetElementList()); + int elementID = 0; //{ Buses - auto busesNode = AppendNode(doc, elementsNode, "BusList"); + auto busesNode = XMLParser::AppendNode(doc, elementsNode, "BusList"); auto busList = allElements.GetBusList(); - for(int i = 0; i < (int)busList.size(); i++) { - Bus* bus = busList[i]; - auto busNode = AppendNode(doc, busesNode, "Bus"); - SetNodeAttribute(doc, busNode, "ID", i); - auto cadProp = AppendNode(doc, busNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, bus->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, bus->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, bus->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, bus->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, bus->GetAngle()); - - BusElectricalData data = bus->GetElectricalData(); - auto electricalProp = AppendNode(doc, busNode, "ElectricalProperties"); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage"); - SetNodeValue(doc, nominalVoltage, data.nominalVoltage); - SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit); - auto isVoltageControlled = AppendNode(doc, electricalProp, "IsVoltageControlled"); - SetNodeValue(doc, isVoltageControlled, data.isVoltageControlled); - auto controlledVoltage = AppendNode(doc, electricalProp, "ControlledVoltage"); - SetNodeValue(doc, controlledVoltage, data.controlledVoltage); - SetNodeAttribute(doc, controlledVoltage, "Choice", data.controlledVoltageUnitChoice); - auto slackBus = AppendNode(doc, electricalProp, "SlackBus"); - SetNodeValue(doc, slackBus, data.slackBus); - - auto fault = AppendNode(doc, electricalProp, "Fault"); - auto hasFault = AppendNode(doc, fault, "HasFault"); - SetNodeValue(doc, hasFault, data.hasFault); - auto faultType = AppendNode(doc, fault, "Type"); - SetNodeValue(doc, faultType, data.faultType); - auto faultLocation = AppendNode(doc, fault, "Location"); - SetNodeValue(doc, faultLocation, data.faultLocation); - auto faultResistance = AppendNode(doc, fault, "Resistance"); - SetNodeValue(doc, faultResistance, data.faultResistance); - auto faultReactance = AppendNode(doc, fault, "Reactance"); - SetNodeValue(doc, faultReactance, data.faultReactance); - - auto stability = AppendNode(doc, electricalProp, "Stability"); - auto plotBus = AppendNode(doc, stability, "Plot"); - SetNodeValue(doc, plotBus, data.plotBus); - auto stabHasFault = AppendNode(doc, stability, "HasFault"); - SetNodeValue(doc, stabHasFault, data.stabHasFault); - auto stabFaultTime = AppendNode(doc, stability, "FaultTime"); - SetNodeValue(doc, stabFaultTime, data.stabFaultTime); - auto stabFaultLength = AppendNode(doc, stability, "FaultLength"); - SetNodeValue(doc, stabFaultLength, data.stabFaultLength); - auto stabFaultResistance = AppendNode(doc, stability, "FaultResistance"); - SetNodeValue(doc, stabFaultResistance, data.stabFaultResistance); - auto stabFaultReactance = AppendNode(doc, stability, "FaultReactance"); - SetNodeValue(doc, stabFaultReactance, data.stabFaultReactance); - - data.number = i; - bus->SetElectricalData(data); - } //} + for(auto it = busList.begin(), itEnd = busList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, busesNode); + elementID++; + } + //} //{ Capacitor - auto capacitorsNode = AppendNode(doc, elementsNode, "CapacitorList"); + auto capacitorsNode = XMLParser::AppendNode(doc, elementsNode, "CapacitorList"); auto capacitorList = allElements.GetCapacitorList(); - for(int i = 0; i < (int)capacitorList.size(); i++) { - Capacitor* capacitor = capacitorList[i]; - auto capacitorNode = AppendNode(doc, capacitorsNode, "Capacitor"); - SetNodeAttribute(doc, capacitorNode, "ID", i); - auto cadProp = AppendNode(doc, capacitorNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, capacitor->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, capacitor->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, capacitor->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, capacitor->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, capacitor->GetAngle()); - auto nodePos = AppendNode(doc, cadProp, "NodePosition"); - auto nodePosX = AppendNode(doc, nodePos, "X"); - SetNodeValue(doc, nodePosX, capacitor->GetPointList()[0].m_x); - auto nodePosY = AppendNode(doc, nodePos, "Y"); - SetNodeValue(doc, nodePosY, capacitor->GetPointList()[0].m_y); - auto parentID = AppendNode(doc, cadProp, "ParentID"); - Bus* parent = static_cast<Bus*>(capacitor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); - - CapacitorElectricalData data = capacitor->GetElectricalData(); - auto electricalProp = AppendNode(doc, capacitorNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, capacitor->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower"); - SetNodeValue(doc, reactivePower, data.reactivePower); - SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit); - - auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); - SwitchingData swData = capacitor->GetSwitchingData(); - for(int j = 0; j < (int)swData.swType.size(); j++) { - auto switching = AppendNode(doc, switchingList, "Switching"); - SetNodeAttribute(doc, switching, "ID", j); - auto swType = AppendNode(doc, switching, "Type"); - SetNodeValue(doc, swType, swData.swType[j]); - auto swTime = AppendNode(doc, switching, "Time"); - SetNodeValue(doc, swTime, swData.swTime[j]); - } - } //} + elementID = 0; + for(auto it = capacitorList.begin(), itEnd = capacitorList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, capacitorsNode); + elementID++; + } + //} //{ IndMotor - auto indMotorsNode = AppendNode(doc, elementsNode, "IndMotorList"); + auto indMotorsNode = XMLParser::AppendNode(doc, elementsNode, "IndMotorList"); auto indMotorList = allElements.GetIndMotorList(); - for(int i = 0; i < (int)indMotorList.size(); i++) { - IndMotor* indMotor = indMotorList[i]; - auto indMotorNode = AppendNode(doc, indMotorsNode, "IndMotor"); - SetNodeAttribute(doc, indMotorNode, "ID", i); - auto cadProp = AppendNode(doc, indMotorNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, indMotor->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, indMotor->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, indMotor->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, indMotor->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, indMotor->GetAngle()); - auto nodePos = AppendNode(doc, cadProp, "NodePosition"); - auto nodePosX = AppendNode(doc, nodePos, "X"); - SetNodeValue(doc, nodePosX, indMotor->GetPointList()[0].m_x); - auto nodePosY = AppendNode(doc, nodePos, "Y"); - SetNodeValue(doc, nodePosY, indMotor->GetPointList()[0].m_y); - auto parentID = AppendNode(doc, cadProp, "ParentID"); - Bus* parent = static_cast<Bus*>(indMotor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); - - IndMotorElectricalData data = indMotor->GetElectricalData(); - auto electricalProp = AppendNode(doc, indMotorNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, indMotor->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto activePower = AppendNode(doc, electricalProp, "ActivePower"); - SetNodeValue(doc, activePower, data.activePower); - SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit); - auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower"); - SetNodeValue(doc, reactivePower, data.reactivePower); - SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit); - } //} + elementID = 0; + for(auto it = indMotorList.begin(), itEnd = indMotorList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, indMotorsNode); + elementID++; + } + //} //{ Inductor - auto inductorsNode = AppendNode(doc, elementsNode, "InductorList"); + auto inductorsNode = XMLParser::AppendNode(doc, elementsNode, "InductorList"); auto inductorList = allElements.GetInductorList(); - for(int i = 0; i < (int)inductorList.size(); i++) { - Inductor* inductor = inductorList[i]; - auto inductorNode = AppendNode(doc, inductorsNode, "Inductor"); - SetNodeAttribute(doc, inductorNode, "ID", i); - auto cadProp = AppendNode(doc, inductorNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, inductor->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, inductor->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, inductor->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, inductor->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, inductor->GetAngle()); - auto nodePos = AppendNode(doc, cadProp, "NodePosition"); - auto nodePosX = AppendNode(doc, nodePos, "X"); - SetNodeValue(doc, nodePosX, inductor->GetPointList()[0].m_x); - auto nodePosY = AppendNode(doc, nodePos, "Y"); - SetNodeValue(doc, nodePosY, inductor->GetPointList()[0].m_y); - auto parentID = AppendNode(doc, cadProp, "ParentID"); - Bus* parent = static_cast<Bus*>(inductor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); - - InductorElectricalData data = inductor->GetElectricalData(); - auto electricalProp = AppendNode(doc, inductorNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, inductor->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower"); - SetNodeValue(doc, reactivePower, data.reactivePower); - SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit); - - auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); - SwitchingData swData = inductor->GetSwitchingData(); - for(int j = 0; j < (int)swData.swType.size(); j++) { - auto switching = AppendNode(doc, switchingList, "Switching"); - SetNodeAttribute(doc, switching, "ID", j); - auto swType = AppendNode(doc, switching, "Type"); - SetNodeValue(doc, swType, swData.swType[j]); - auto swTime = AppendNode(doc, switching, "Time"); - SetNodeValue(doc, swTime, swData.swTime[j]); - } - } //} + elementID = 0; + for(auto it = inductorList.begin(), itEnd = inductorList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, inductorsNode); + elementID++; + } + //} //{ Line - auto linesNode = AppendNode(doc, elementsNode, "LineList"); + auto linesNode = XMLParser::AppendNode(doc, elementsNode, "LineList"); auto lineList = allElements.GetLineList(); - for(int i = 0; i < (int)lineList.size(); i++) { - Line* line = lineList[i]; - auto lineNode = AppendNode(doc, linesNode, "Line"); - SetNodeAttribute(doc, lineNode, "ID", i); - auto cadProp = AppendNode(doc, lineNode, "CADProperties"); - auto nodeList = AppendNode(doc, cadProp, "NodeList"); - auto ptList = line->GetPointList(); - int nodeID = 0; - for(int j = 0; j < (int)ptList.size(); j++) { - if((j != 1) && (j != (int)ptList.size() - 2)) { - auto nodePos = AppendNode(doc, nodeList, "Node"); - SetNodeAttribute(doc, nodePos, "ID", nodeID); - auto nodePosX = AppendNode(doc, nodePos, "X"); - SetNodeValue(doc, nodePosX, ptList[j].m_x); - auto nodePosY = AppendNode(doc, nodePos, "Y"); - SetNodeValue(doc, nodePosY, ptList[j].m_y); - nodeID++; - } - } - - auto parentIDList = AppendNode(doc, cadProp, "ParentIDList"); - for(int j = 0; j < (int)line->GetParentList().size(); j++) { - Bus* parent = static_cast<Bus*>(line->GetParentList()[j]); - if(parent) { - auto parentID = AppendNode(doc, parentIDList, "ParentID"); - SetNodeAttribute(doc, parentID, "ID", j); - SetNodeValue(doc, parentID, parent->GetElectricalData().number); - } - } - - LineElectricalData data = line->GetElectricalData(); - auto electricalProp = AppendNode(doc, lineNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, line->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage"); - SetNodeValue(doc, nominalVoltage, data.nominalVoltage); - SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit); - auto nominalPower = AppendNode(doc, electricalProp, "NominalPower"); - SetNodeValue(doc, nominalPower, data.nominalPower); - SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit); - auto resistance = AppendNode(doc, electricalProp, "Resistance"); - SetNodeValue(doc, resistance, data.resistance); - SetNodeAttribute(doc, resistance, "UnitID", data.resistanceUnit); - auto indReactance = AppendNode(doc, electricalProp, "IndReactance"); - SetNodeValue(doc, indReactance, data.indReactance); - SetNodeAttribute(doc, indReactance, "UnitID", data.indReactanceUnit); - auto capSusceptance = AppendNode(doc, electricalProp, "CapSusceptance"); - SetNodeValue(doc, capSusceptance, data.capSusceptance); - SetNodeAttribute(doc, capSusceptance, "UnitID", data.capSusceptanceUnit); - auto lineSize = AppendNode(doc, electricalProp, "LineSize"); - SetNodeValue(doc, lineSize, data.lineSize); - auto useLinePower = AppendNode(doc, electricalProp, "UseLinePower"); - SetNodeValue(doc, useLinePower, data.useLinePower); - - auto fault = AppendNode(doc, electricalProp, "Fault"); - auto zeroResistance = AppendNode(doc, fault, "ZeroResistance"); - SetNodeValue(doc, zeroResistance, data.zeroResistance); - auto zeroIndReactance = AppendNode(doc, fault, "ZeroIndReactance"); - SetNodeValue(doc, zeroIndReactance, data.zeroIndReactance); - auto zeroCapSusceptance = AppendNode(doc, fault, "ZeroCapSusceptance"); - SetNodeValue(doc, zeroCapSusceptance, data.zeroCapSusceptance); - - auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); - SwitchingData swData = line->GetSwitchingData(); - for(int j = 0; j < (int)swData.swType.size(); j++) { - auto switching = AppendNode(doc, switchingList, "Switching"); - SetNodeAttribute(doc, switching, "ID", j); - auto swType = AppendNode(doc, switching, "Type"); - SetNodeValue(doc, swType, swData.swType[j]); - auto swTime = AppendNode(doc, switching, "Time"); - SetNodeValue(doc, swTime, swData.swTime[j]); - } - } //} + elementID = 0; + for(auto it = lineList.begin(), itEnd = lineList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, linesNode); + elementID++; + } + //} //{ Load - auto loadsNode = AppendNode(doc, elementsNode, "LoadList"); + auto loadsNode = XMLParser::AppendNode(doc, elementsNode, "LoadList"); auto loadList = allElements.GetLoadList(); - for(int i = 0; i < (int)loadList.size(); i++) { - Load* load = loadList[i]; - auto loadNode = AppendNode(doc, loadsNode, "Load"); - SetNodeAttribute(doc, loadNode, "ID", i); - auto cadProp = AppendNode(doc, loadNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, load->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, load->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, load->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, load->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, load->GetAngle()); - auto nodePos = AppendNode(doc, cadProp, "NodePosition"); - auto nodePosX = AppendNode(doc, nodePos, "X"); - SetNodeValue(doc, nodePosX, load->GetPointList()[0].m_x); - auto nodePosY = AppendNode(doc, nodePos, "Y"); - SetNodeValue(doc, nodePosY, load->GetPointList()[0].m_y); - auto parentID = AppendNode(doc, cadProp, "ParentID"); - Bus* parent = static_cast<Bus*>(load->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); - - LoadElectricalData data = load->GetElectricalData(); - auto electricalProp = AppendNode(doc, loadNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, load->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto activePower = AppendNode(doc, electricalProp, "ActivePower"); - SetNodeValue(doc, activePower, data.activePower); - SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit); - auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower"); - SetNodeValue(doc, reactivePower, data.reactivePower); - SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit); - auto loadType = AppendNode(doc, electricalProp, "LoadType"); - SetNodeValue(doc, loadType, data.loadType); - - auto stability = AppendNode(doc, electricalProp, "Stability"); - auto plotLoad = AppendNode(doc, stability, "PlotLoad"); - SetNodeValue(doc, plotLoad, data.plotLoad); - auto useCompLoad = AppendNode(doc, stability, "UseCompositeLoad"); - SetNodeValue(doc, useCompLoad, data.useCompLoad); - auto activePowerCompl = AppendNode(doc, stability, "ActivePowerComposition"); - auto pzl = AppendNode(doc, activePowerCompl, "ConstantImpedance"); - SetNodeValue(doc, pzl, data.constImpedanceActive); - auto pil = AppendNode(doc, activePowerCompl, "ConstantCurrent"); - SetNodeValue(doc, pil, data.constCurrentActive); - auto ppl = AppendNode(doc, activePowerCompl, "ConstantPower"); - SetNodeValue(doc, ppl, data.constPowerActive); - auto reactivePowerCompl = AppendNode(doc, stability, "ReactivePowerComposition"); - auto qzl = AppendNode(doc, reactivePowerCompl, "ConstantImpedance"); - SetNodeValue(doc, qzl, data.constImpedanceReactive); - auto qil = AppendNode(doc, reactivePowerCompl, "ConstantCurrent"); - SetNodeValue(doc, qil, data.constCurrentReactive); - auto qpl = AppendNode(doc, reactivePowerCompl, "ConstantPower"); - SetNodeValue(doc, qpl, data.constPowerReactive); - - auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); - SwitchingData swData = load->GetSwitchingData(); - for(int j = 0; j < (int)swData.swType.size(); j++) { - auto switching = AppendNode(doc, switchingList, "Switching"); - SetNodeAttribute(doc, switching, "ID", j); - auto swType = AppendNode(doc, switching, "Type"); - SetNodeValue(doc, swType, swData.swType[j]); - auto swTime = AppendNode(doc, switching, "Time"); - SetNodeValue(doc, swTime, swData.swTime[j]); - } - } //} + elementID = 0; + for(auto it = loadList.begin(), itEnd = loadList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, loadsNode); + elementID++; + } + //} //{ SyncGenerator - auto syncGeneratorsNode = AppendNode(doc, elementsNode, "SyncGeneratorList"); + auto syncGeneratorsNode = XMLParser::AppendNode(doc, elementsNode, "SyncGeneratorList"); auto syncGeneratorList = allElements.GetSyncGeneratorList(); - for(int i = 0; i < (int)syncGeneratorList.size(); i++) { - SyncGenerator* syncGenerator = syncGeneratorList[i]; - auto syncGeneratorNode = AppendNode(doc, syncGeneratorsNode, "SyncGenerator"); - SetNodeAttribute(doc, syncGeneratorNode, "ID", i); - auto cadProp = AppendNode(doc, syncGeneratorNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, syncGenerator->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, syncGenerator->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, syncGenerator->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, syncGenerator->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, syncGenerator->GetAngle()); - auto nodePos = AppendNode(doc, cadProp, "NodePosition"); - auto nodePosX = AppendNode(doc, nodePos, "X"); - SetNodeValue(doc, nodePosX, syncGenerator->GetPointList()[0].m_x); - auto nodePosY = AppendNode(doc, nodePos, "Y"); - SetNodeValue(doc, nodePosY, syncGenerator->GetPointList()[0].m_y); - auto parentID = AppendNode(doc, cadProp, "ParentID"); - Bus* parent = static_cast<Bus*>(syncGenerator->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); - - SyncGeneratorElectricalData data = syncGenerator->GetElectricalData(); - auto electricalProp = AppendNode(doc, syncGeneratorNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, syncGenerator->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto nominalPower = AppendNode(doc, electricalProp, "NominalPower"); - SetNodeValue(doc, nominalPower, data.nominalPower); - SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit); - auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage"); - SetNodeValue(doc, nominalVoltage, data.nominalVoltage); - SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit); - auto activePower = AppendNode(doc, electricalProp, "ActivePower"); - SetNodeValue(doc, activePower, data.activePower); - SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit); - auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower"); - SetNodeValue(doc, reactivePower, data.reactivePower); - SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit); - auto haveMaxReactive = AppendNode(doc, electricalProp, "HaveMaxReactive"); - SetNodeValue(doc, haveMaxReactive, data.haveMaxReactive); - auto maxReactive = AppendNode(doc, electricalProp, "MaxReactive"); - SetNodeValue(doc, maxReactive, data.maxReactive); - SetNodeAttribute(doc, maxReactive, "UnitID", data.maxReactiveUnit); - auto haveMinReactive = AppendNode(doc, electricalProp, "HaveMinReactive"); - SetNodeValue(doc, haveMinReactive, data.haveMinReactive); - auto minReactive = AppendNode(doc, electricalProp, "MinReactive"); - SetNodeValue(doc, minReactive, data.minReactive); - SetNodeAttribute(doc, minReactive, "UnitID", data.minReactiveUnit); - auto useMachineBase = AppendNode(doc, electricalProp, "UseMachineBase"); - SetNodeValue(doc, useMachineBase, data.useMachineBase); - - auto fault = AppendNode(doc, electricalProp, "Fault"); - auto positiveResistance = AppendNode(doc, fault, "PositiveResistance"); - SetNodeValue(doc, positiveResistance, data.positiveResistance); - auto positiveReactance = AppendNode(doc, fault, "PositiveReactance"); - SetNodeValue(doc, positiveReactance, data.positiveReactance); - auto negativeResistance = AppendNode(doc, fault, "NegativeResistance"); - SetNodeValue(doc, negativeResistance, data.negativeResistance); - auto negativeReactance = AppendNode(doc, fault, "NegativeReactance"); - SetNodeValue(doc, negativeReactance, data.negativeReactance); - auto zeroResistance = AppendNode(doc, fault, "ZeroResistance"); - SetNodeValue(doc, zeroResistance, data.zeroResistance); - auto zeroReactance = AppendNode(doc, fault, "ZeroReactance"); - SetNodeValue(doc, zeroReactance, data.zeroReactance); - auto groundResistance = AppendNode(doc, fault, "GroundResistance"); - SetNodeValue(doc, groundResistance, data.groundResistance); - auto groundReactance = AppendNode(doc, fault, "GroundReactance"); - SetNodeValue(doc, groundReactance, data.groundReactance); - auto groundNeutral = AppendNode(doc, fault, "GroundNeutral"); - SetNodeValue(doc, groundNeutral, data.groundNeutral); - - auto stability = AppendNode(doc, electricalProp, "Stability"); - auto plotSyncMachine = AppendNode(doc, stability, "PlotSyncMachine"); - SetNodeValue(doc, plotSyncMachine, data.plotSyncMachine); - auto inertia = AppendNode(doc, stability, "Inertia"); - SetNodeValue(doc, inertia, data.inertia); - auto damping = AppendNode(doc, stability, "Damping"); - SetNodeValue(doc, damping, data.damping); - auto useAVR = AppendNode(doc, stability, "UseAVR"); - SetNodeValue(doc, useAVR, data.useAVR); - auto useSpeedGovernor = AppendNode(doc, stability, "UseSpeedGovernor"); - SetNodeValue(doc, useSpeedGovernor, data.useSpeedGovernor); - auto armResistance = AppendNode(doc, stability, "ArmResistance"); - SetNodeValue(doc, armResistance, data.armResistance); - auto potierReactance = AppendNode(doc, stability, "PotierReactance"); - SetNodeValue(doc, potierReactance, data.potierReactance); - auto satFactor = AppendNode(doc, stability, "SatFactor"); - SetNodeValue(doc, satFactor, data.satFactor); - auto syncXd = AppendNode(doc, stability, "SyncXd"); - SetNodeValue(doc, syncXd, data.syncXd); - auto syncXq = AppendNode(doc, stability, "SyncXq"); - SetNodeValue(doc, syncXq, data.syncXq); - auto transXd = AppendNode(doc, stability, "TransXd"); - SetNodeValue(doc, transXd, data.transXd); - auto transXq = AppendNode(doc, stability, "TransXq"); - SetNodeValue(doc, transXq, data.transXq); - auto transTd0 = AppendNode(doc, stability, "TransTd0"); - SetNodeValue(doc, transTd0, data.transTd0); - auto transTq0 = AppendNode(doc, stability, "TransTq0"); - SetNodeValue(doc, transTq0, data.transTq0); - auto subXd = AppendNode(doc, stability, "SubXd"); - SetNodeValue(doc, subXd, data.subXd); - auto subXq = AppendNode(doc, stability, "SubXq"); - SetNodeValue(doc, subXq, data.subXq); - auto subTd0 = AppendNode(doc, stability, "SubTd0"); - SetNodeValue(doc, subTd0, data.subTd0); - auto subTq0 = AppendNode(doc, stability, "SubTq0"); - SetNodeValue(doc, subTq0, data.subTq0); - - auto avr = AppendNode(doc, stability, "AVR"); + elementID = 0; + for(auto it = syncGeneratorList.begin(), itEnd = syncGeneratorList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + auto elementNode = (*it)->SaveElement(doc, syncGeneratorsNode); + + // Save controls + auto data = (*it)->GetElectricalData(); + auto electricalProp = elementNode->first_node("ElectricalProperties"); + auto stability = electricalProp->first_node("Stability"); + + auto avr = XMLParser::AppendNode(doc, stability, "AVR"); if(data.avr) SaveControlElements(doc, avr, data.avr); - auto speedGov = AppendNode(doc, stability, "SpeedGovernor"); + auto speedGov = XMLParser::AppendNode(doc, stability, "SpeedGovernor"); if(data.speedGov) SaveControlElements(doc, speedGov, data.speedGov); - auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); - SwitchingData swData = syncGenerator->GetSwitchingData(); - for(int j = 0; j < (int)swData.swType.size(); j++) { - auto switching = AppendNode(doc, switchingList, "Switching"); - SetNodeAttribute(doc, switching, "ID", j); - auto swType = AppendNode(doc, switching, "Type"); - SetNodeValue(doc, swType, swData.swType[j]); - auto swTime = AppendNode(doc, switching, "Time"); - SetNodeValue(doc, swTime, swData.swTime[j]); - } - } //} + elementID++; + } + //} //{ SyncMotor - auto syncMotorsNode = AppendNode(doc, elementsNode, "SyncMotorList"); + auto syncMotorsNode = XMLParser::AppendNode(doc, elementsNode, "SyncMotorList"); auto syncMotorList = allElements.GetSyncMotorList(); - for(int i = 0; i < (int)syncMotorList.size(); i++) { - SyncMotor* syncMotor = syncMotorList[i]; - auto syncMotorNode = AppendNode(doc, syncMotorsNode, "SyncMotor"); - SetNodeAttribute(doc, syncMotorNode, "ID", i); - auto cadProp = AppendNode(doc, syncMotorNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, syncMotor->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, syncMotor->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, syncMotor->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, syncMotor->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, syncMotor->GetAngle()); - auto nodePos = AppendNode(doc, cadProp, "NodePosition"); - auto nodePosX = AppendNode(doc, nodePos, "X"); - SetNodeValue(doc, nodePosX, syncMotor->GetPointList()[0].m_x); - auto nodePosY = AppendNode(doc, nodePos, "Y"); - SetNodeValue(doc, nodePosY, syncMotor->GetPointList()[0].m_y); - auto parentID = AppendNode(doc, cadProp, "ParentID"); - Bus* parent = static_cast<Bus*>(syncMotor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); - - SyncMotorElectricalData data = syncMotor->GetElectricalData(); - auto electricalProp = AppendNode(doc, syncMotorNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, syncMotor->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto nominalPower = AppendNode(doc, electricalProp, "NominalPower"); - SetNodeValue(doc, nominalPower, data.nominalPower); - SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit); - // auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage"); - // SetNodeValue(doc, nominalVoltage, data.nominalVoltage); - // SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit); - auto activePower = AppendNode(doc, electricalProp, "ActivePower"); - SetNodeValue(doc, activePower, data.activePower); - SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit); - auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower"); - SetNodeValue(doc, reactivePower, data.reactivePower); - SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit); - auto haveMaxReactive = AppendNode(doc, electricalProp, "HaveMaxReactive"); - SetNodeValue(doc, haveMaxReactive, data.haveMaxReactive); - auto maxReactive = AppendNode(doc, electricalProp, "MaxReactive"); - SetNodeValue(doc, maxReactive, data.maxReactive); - SetNodeAttribute(doc, maxReactive, "UnitID", data.maxReactiveUnit); - auto haveMinReactive = AppendNode(doc, electricalProp, "HaveMinReactive"); - SetNodeValue(doc, haveMinReactive, data.haveMinReactive); - auto minReactive = AppendNode(doc, electricalProp, "MinReactive"); - SetNodeValue(doc, minReactive, data.minReactive); - SetNodeAttribute(doc, minReactive, "UnitID", data.minReactiveUnit); - auto useMachineBase = AppendNode(doc, electricalProp, "UseMachineBase"); - SetNodeValue(doc, useMachineBase, data.useMachineBase); - - auto fault = AppendNode(doc, electricalProp, "Fault"); - auto positiveResistance = AppendNode(doc, fault, "PositiveResistance"); - SetNodeValue(doc, positiveResistance, data.positiveResistance); - auto positiveReactance = AppendNode(doc, fault, "PositiveReactance"); - SetNodeValue(doc, positiveReactance, data.positiveReactance); - auto negativeResistance = AppendNode(doc, fault, "NegativeResistance"); - SetNodeValue(doc, negativeResistance, data.negativeResistance); - auto negativeReactance = AppendNode(doc, fault, "NegativeReactance"); - SetNodeValue(doc, negativeReactance, data.negativeReactance); - auto zeroResistance = AppendNode(doc, fault, "ZeroResistance"); - SetNodeValue(doc, zeroResistance, data.zeroResistance); - auto zeroReactance = AppendNode(doc, fault, "ZeroReactance"); - SetNodeValue(doc, zeroReactance, data.zeroReactance); - auto groundResistance = AppendNode(doc, fault, "GroundResistance"); - SetNodeValue(doc, groundResistance, data.groundResistance); - auto groundReactance = AppendNode(doc, fault, "GroundReactance"); - SetNodeValue(doc, groundReactance, data.groundReactance); - auto groundNeutral = AppendNode(doc, fault, "GroundNeutral"); - SetNodeValue(doc, groundNeutral, data.groundNeutral); - - // To future use... - /*auto stability = AppendNode(doc, electricalProp, "Stability"); - auto plotSyncMachine = AppendNode(doc, stability, "PlotSyncMotor"); - SetNodeValue(doc, plotSyncMachine, data.plotSyncMachine); - auto inertia = AppendNode(doc, stability, "Inertia"); - SetNodeValue(doc, inertia, data.inertia); - auto damping = AppendNode(doc, stability, "Damping"); - SetNodeValue(doc, damping, data.damping); - auto useAVR = AppendNode(doc, stability, "UseAVR"); - SetNodeValue(doc, useAVR, data.useAVR); - auto armResistance = AppendNode(doc, stability, "ArmResistance"); - SetNodeValue(doc, armResistance, data.armResistance); - auto potierReactance = AppendNode(doc, stability, "PotierReactance"); - SetNodeValue(doc, potierReactance, data.potierReactance); - auto satFactor = AppendNode(doc, stability, "SatFactor"); - SetNodeValue(doc, satFactor, data.satFactor); - auto syncXd = AppendNode(doc, stability, "SyncXd"); - SetNodeValue(doc, syncXd, data.syncXd); - auto syncXq = AppendNode(doc, stability, "SyncXq"); - SetNodeValue(doc, syncXq, data.syncXq); - auto transXd = AppendNode(doc, stability, "TransXd"); - SetNodeValue(doc, transXd, data.transXd); - auto transXq = AppendNode(doc, stability, "TransXq"); - SetNodeValue(doc, transXq, data.transXq); - auto transTd0 = AppendNode(doc, stability, "TransTd0"); - SetNodeValue(doc, transTd0, data.transTd0); - auto transTq0 = AppendNode(doc, stability, "TransTq0"); - SetNodeValue(doc, transTq0, data.transTq0); - auto subXd = AppendNode(doc, stability, "SubXd"); - SetNodeValue(doc, subXd, data.subXd); - auto subXq = AppendNode(doc, stability, "SubXq"); - SetNodeValue(doc, subXq, data.subXq); - auto subTd0 = AppendNode(doc, stability, "SubTd0"); - SetNodeValue(doc, subTd0, data.subTd0); - auto subTq0 = AppendNode(doc, stability, "SubTq0"); - SetNodeValue(doc, subTq0, data.subTq0); - - auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); - SwitchingData swData = syncGenerator->GetSwitchingData(); - for(int j = 0; j < (int)swData.swType.size(); j++) { - auto switching = AppendNode(doc, switchingList, "Switching"); - SetNodeAttribute(doc, switching, "ID", j); - auto swType = AppendNode(doc, switching, "Type"); - SetNodeValue(doc, swType, swData.swType[j]); - auto swTime = AppendNode(doc, switching, "Time"); - SetNodeValue(doc, swTime, swData.swTime[j]); - }*/ - } //} + elementID = 0; + for(auto it = syncMotorList.begin(), itEnd = syncMotorList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, syncMotorsNode); + elementID++; + } + //} //{ Transfomer - auto transformersNode = AppendNode(doc, elementsNode, "TransformerList"); + auto transformersNode = XMLParser::AppendNode(doc, elementsNode, "TransformerList"); auto transformerList = allElements.GetTransformerList(); - for(int i = 0; i < (int)transformerList.size(); i++) { - Transformer* transfomer = transformerList[i]; - auto transformerNode = AppendNode(doc, transformersNode, "Transfomer"); - SetNodeAttribute(doc, transformerNode, "ID", i); - auto cadProp = AppendNode(doc, transformerNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, transfomer->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, transfomer->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, transfomer->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, transfomer->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, transfomer->GetAngle()); - auto nodeList = AppendNode(doc, cadProp, "NodeList"); - auto nodePos1 = AppendNode(doc, nodeList, "Node"); - SetNodeAttribute(doc, nodePos1, "ID", 0); - auto nodePosX1 = AppendNode(doc, nodePos1, "X"); - SetNodeValue(doc, nodePosX1, transfomer->GetPointList()[0].m_x); - auto nodePosY1 = AppendNode(doc, nodePos1, "Y"); - SetNodeValue(doc, nodePosY1, transfomer->GetPointList()[0].m_y); - auto nodePos2 = AppendNode(doc, nodeList, "Node"); - SetNodeAttribute(doc, nodePos2, "ID", 1); - auto nodePosX2 = AppendNode(doc, nodePos2, "X"); - SetNodeValue(doc, nodePosX2, transfomer->GetPointList()[transfomer->GetPointList().size() - 1].m_x); - auto nodePosY2 = AppendNode(doc, nodePos2, "Y"); - SetNodeValue(doc, nodePosY2, transfomer->GetPointList()[transfomer->GetPointList().size() - 1].m_y); - - auto parentIDList = AppendNode(doc, cadProp, "ParentIDList"); - for(int j = 0; j < (int)transfomer->GetParentList().size(); j++) { - Bus* parent = static_cast<Bus*>(transfomer->GetParentList()[j]); - if(parent) { - auto parentID = AppendNode(doc, parentIDList, "ParentID"); - SetNodeAttribute(doc, parentID, "ID", j); - SetNodeValue(doc, parentID, parent->GetElectricalData().number); - } - } - - TransformerElectricalData data = transfomer->GetElectricalData(); - auto electricalProp = AppendNode(doc, transformerNode, "ElectricalProperties"); - auto isOnline = AppendNode(doc, electricalProp, "IsOnline"); - SetNodeValue(doc, isOnline, transfomer->IsOnline()); - auto name = AppendNode(doc, electricalProp, "Name"); - SetNodeValue(doc, name, data.name); - auto primaryNominalVoltage = AppendNode(doc, electricalProp, "PrimaryNominalVoltage"); - SetNodeValue(doc, primaryNominalVoltage, data.primaryNominalVoltage); - SetNodeAttribute(doc, primaryNominalVoltage, "UnitID", data.primaryNominalVoltageUnit); - auto secondaryNominalVoltage = AppendNode(doc, electricalProp, "SecondaryNominalVoltage"); - SetNodeValue(doc, secondaryNominalVoltage, data.secondaryNominalVoltage); - SetNodeAttribute(doc, secondaryNominalVoltage, "UnitID", data.secondaryNominalVoltageUnit); - auto nominalPower = AppendNode(doc, electricalProp, "NominalPower"); - SetNodeValue(doc, nominalPower, data.nominalPower); - SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit); - auto resistance = AppendNode(doc, electricalProp, "Resistance"); - SetNodeValue(doc, resistance, data.resistance); - SetNodeAttribute(doc, resistance, "UnitID", data.resistanceUnit); - auto indReactance = AppendNode(doc, electricalProp, "IndReactance"); - SetNodeValue(doc, indReactance, data.indReactance); - SetNodeAttribute(doc, indReactance, "UnitID", data.indReactanceUnit); - auto connection = AppendNode(doc, electricalProp, "Connection"); - SetNodeValue(doc, connection, data.connection); - auto turnsRatio = AppendNode(doc, electricalProp, "TurnsRatio"); - SetNodeValue(doc, turnsRatio, data.turnsRatio); - auto phaseShift = AppendNode(doc, electricalProp, "PhaseShift"); - SetNodeValue(doc, phaseShift, data.phaseShift); - auto useTransformerPower = AppendNode(doc, electricalProp, "UseTransfomerPower"); - SetNodeValue(doc, useTransformerPower, data.useTransformerPower); - - auto fault = AppendNode(doc, electricalProp, "Fault"); - auto zeroResistance = AppendNode(doc, fault, "ZeroResistance"); - SetNodeValue(doc, zeroResistance, data.zeroResistance); - auto zeroIndReactance = AppendNode(doc, fault, "ZeroIndReactance"); - SetNodeValue(doc, zeroIndReactance, data.zeroIndReactance); - auto primaryGrndResistance = AppendNode(doc, fault, "PrimaryGrndResistance"); - SetNodeValue(doc, primaryGrndResistance, data.primaryGrndResistance); - auto primaryGrndReactance = AppendNode(doc, fault, "PrimaryGrndReactance"); - SetNodeValue(doc, primaryGrndReactance, data.primaryGrndReactance); - auto secondaryGrndResistance = AppendNode(doc, fault, "SecondaryGrndResistance"); - SetNodeValue(doc, secondaryGrndResistance, data.secondaryGrndResistance); - auto secondaryGrndReactance = AppendNode(doc, fault, "SecondaryGrndReactance"); - SetNodeValue(doc, secondaryGrndReactance, data.secondaryGrndReactance); - - auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); - SwitchingData swData = transfomer->GetSwitchingData(); - for(int j = 0; j < (int)swData.swType.size(); j++) { - auto switching = AppendNode(doc, switchingList, "Switching"); - SetNodeAttribute(doc, switching, "ID", j); - auto swType = AppendNode(doc, switching, "Type"); - SetNodeValue(doc, swType, swData.swType[j]); - auto swTime = AppendNode(doc, switching, "Time"); - SetNodeValue(doc, swTime, swData.swTime[j]); - } - } //} + elementID = 0; + for(auto it = transformerList.begin(), itEnd = transformerList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, transformersNode); + elementID++; + } + //} //{ Text - auto textsNode = AppendNode(doc, elementsNode, "TextList"); + auto textsNode = XMLParser::AppendNode(doc, elementsNode, "TextList"); auto textList = m_workspace->GetTextList(); - for(int i = 0; i < (int)textList.size(); i++) { - Text* text = textList[i]; - auto textNode = AppendNode(doc, textsNode, "Text"); - SetNodeAttribute(doc, textNode, "ID", i); - auto cadProp = AppendNode(doc, textNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, text->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, text->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, text->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, text->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, text->GetAngle()); - auto textProperties = AppendNode(doc, textNode, "TextProperties"); - auto elementType = AppendNode(doc, textProperties, "ElementType"); - SetNodeValue(doc, elementType, text->GetElementType()); - auto elementNumber = AppendNode(doc, textProperties, "ElementNumber"); - SetNodeValue(doc, elementNumber, text->GetElementNumber()); - auto dataType = AppendNode(doc, textProperties, "DataType"); - SetNodeValue(doc, dataType, text->GetDataType()); - auto dataUnit = AppendNode(doc, textProperties, "DataUnit"); - SetNodeValue(doc, dataUnit, text->GetUnit()); - auto direction = AppendNode(doc, textProperties, "Direction"); - SetNodeValue(doc, direction, text->GetDirection()); - auto decimalPlaces = AppendNode(doc, textProperties, "DecimalPlaces"); - SetNodeValue(doc, decimalPlaces, text->GetDecimalPlaces()); + elementID = 0; + for(auto it = textList.begin(), itEnd = textList.end(); it != itEnd; ++it) { + (*it)->SetID(elementID); + (*it)->SaveElement(doc, textsNode); + elementID++; } //} @@ -908,54 +263,56 @@ bool FileHanding::OpenProject(wxFileName path) PropertiesData* propData = m_workspace->GetProperties(); SimulationData simData = propData->GetSimulationPropertiesData(); - // { Properties data + //{ Properties data auto propertiesNode = projectNode->first_node("Properties"); if(propertiesNode) { auto simPropertiesNode = propertiesNode->first_node("SimulationProperties"); if(simPropertiesNode) { // General auto general = simPropertiesNode->first_node("General"); - simData.basePower = GetNodeValueDouble(general, "BasePower"); - simData.basePowerUnit = static_cast<ElectricalUnit>(GetAttributeValueInt(general, "BasePower", "UnitID")); + simData.basePower = XMLParser::GetNodeValueDouble(general, "BasePower"); + simData.basePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(general, "BasePower", "UnitID")); auto contCalc = general->first_node("ContinuousCalculation"); - simData.faultAfterPowerFlow = GetNodeValueInt(contCalc, "Fault"); - simData.scPowerAfterPowerFlow = GetNodeValueInt(contCalc, "SCPower"); + simData.faultAfterPowerFlow = XMLParser::GetNodeValueInt(contCalc, "Fault"); + simData.scPowerAfterPowerFlow = XMLParser::GetNodeValueInt(contCalc, "SCPower"); // Power flow auto powerFlow = simPropertiesNode->first_node("PowerFlow"); - simData.powerFlowMethod = static_cast<PowerFlowMethod>(GetNodeValueInt(powerFlow, "SolutionMethod")); - simData.accFator = GetNodeValueDouble(powerFlow, "AccFactor"); - simData.powerFlowTolerance = GetNodeValueDouble(powerFlow, "Tolerance"); - simData.powerFlowMaxIterations = GetNodeValueInt(powerFlow, "MaxIterations"); + simData.powerFlowMethod = + static_cast<PowerFlowMethod>(XMLParser::GetNodeValueInt(powerFlow, "SolutionMethod")); + simData.accFator = XMLParser::GetNodeValueDouble(powerFlow, "AccFactor"); + simData.powerFlowTolerance = XMLParser::GetNodeValueDouble(powerFlow, "Tolerance"); + simData.powerFlowMaxIterations = XMLParser::GetNodeValueInt(powerFlow, "MaxIterations"); // Stability auto stability = simPropertiesNode->first_node("Stability"); - simData.timeStep = GetNodeValueDouble(stability, "TimeStep"); - simData.stabilitySimulationTime = GetNodeValueDouble(stability, "SimulationTime"); - simData.stabilityFrequency = GetNodeValueDouble(stability, "Frequency"); - simData.stabilityTolerance = GetNodeValueDouble(stability, "Tolerance"); - simData.stabilityMaxIterations = GetNodeValueDouble(stability, "MaxIterations"); - simData.controlTimeStepRatio = GetNodeValueInt(stability, "ControlStepRatio"); - simData.plotTime = GetNodeValueDouble(stability, "PlotStep"); - simData.useCOI = GetNodeValueInt(stability, "UseCOI"); + simData.timeStep = XMLParser::GetNodeValueDouble(stability, "TimeStep"); + simData.stabilitySimulationTime = XMLParser::GetNodeValueDouble(stability, "SimulationTime"); + simData.stabilityFrequency = XMLParser::GetNodeValueDouble(stability, "Frequency"); + simData.stabilityTolerance = XMLParser::GetNodeValueDouble(stability, "Tolerance"); + simData.stabilityMaxIterations = XMLParser::GetNodeValueDouble(stability, "MaxIterations"); + simData.controlTimeStepRatio = XMLParser::GetNodeValueInt(stability, "ControlStepRatio"); + simData.plotTime = XMLParser::GetNodeValueDouble(stability, "PlotStep"); + simData.useCOI = XMLParser::GetNodeValueInt(stability, "UseCOI"); // ZIP load auto compLoads = simPropertiesNode->first_node("ZIPLoad"); - simData.useCompLoads = GetNodeValueInt(compLoads, "UseCompositeLoad"); + simData.useCompLoads = XMLParser::GetNodeValueInt(compLoads, "UseCompositeLoad"); auto activePowerComp = compLoads->first_node("ActivePowerComposition"); - simData.constImpedanceActive = GetNodeValueDouble(activePowerComp, "ConstantImpedance"); - simData.constCurrentActive = GetNodeValueDouble(activePowerComp, "ConstantCurrent"); - simData.constPowerActive = GetNodeValueDouble(activePowerComp, "ConstantPower"); + simData.constImpedanceActive = XMLParser::GetNodeValueDouble(activePowerComp, "ConstantImpedance"); + simData.constCurrentActive = XMLParser::GetNodeValueDouble(activePowerComp, "ConstantCurrent"); + simData.constPowerActive = XMLParser::GetNodeValueDouble(activePowerComp, "ConstantPower"); auto reactivePowerComp = compLoads->first_node("ReactivePowerComposition"); - simData.constImpedanceReactive = GetNodeValueDouble(reactivePowerComp, "ConstantImpedance"); - simData.constCurrentReactive = GetNodeValueDouble(reactivePowerComp, "ConstantCurrent"); - simData.constPowerReactive = GetNodeValueDouble(reactivePowerComp, "ConstantPower"); + simData.constImpedanceReactive = XMLParser::GetNodeValueDouble(reactivePowerComp, "ConstantImpedance"); + simData.constCurrentReactive = XMLParser::GetNodeValueDouble(reactivePowerComp, "ConstantCurrent"); + simData.constPowerReactive = XMLParser::GetNodeValueDouble(reactivePowerComp, "ConstantPower"); auto uvLimit = compLoads->first_node("UndervoltageLimit"); - simData.underVoltageConstCurrent = GetNodeValueDouble(uvLimit, "ConstantCurrent"); - simData.underVoltageConstPower = GetNodeValueDouble(uvLimit, "ConstantPower"); + simData.underVoltageConstCurrent = XMLParser::GetNodeValueDouble(uvLimit, "ConstantCurrent"); + simData.underVoltageConstPower = XMLParser::GetNodeValueDouble(uvLimit, "ConstantPower"); } } - // } + //} propData->SetSimulationPropertiesData(simData); @@ -975,65 +332,21 @@ bool FileHanding::OpenProject(wxFileName path) std::vector<Transformer*> transformerList; std::vector<Text*> textList; + // List of parents + std::vector<Element*> parentList; + //{ Bus auto busListNode = elementsNode->first_node("BusList"); if(!busListNode) return false; auto busNode = busListNode->first_node("Bus"); while(busNode) { - auto cadPropNode = busNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - Bus* bus = new Bus(wxPoint2DDouble(posX, posY)); - - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - bus->SetWidth(width); - bus->SetHeight(height); - bus->SetPosition(bus->GetPosition()); // Update bus rectangle. - int numRot = angle / bus->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) bus->Rotate(clockwise); - - BusElectricalData data = bus->GetElectricalData(); - auto electricalProp = busNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - data.name = electricalProp->first_node("Name")->value(); - data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage"); - data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID"); - data.isVoltageControlled = GetNodeValueInt(electricalProp, "IsVoltageControlled"); - data.controlledVoltage = GetNodeValueDouble(electricalProp, "ControlledVoltage"); - data.controlledVoltageUnitChoice = GetAttributeValueInt(electricalProp, "ControlledVoltage", "Choice"); - data.slackBus = GetNodeValueInt(electricalProp, "SlackBus"); - auto fault = electricalProp->first_node("Fault"); - data.hasFault = GetNodeValueInt(fault, "HasFault"); - data.faultType = (FaultData)GetNodeValueInt(fault, "Type"); - data.faultLocation = (FaultData)GetNodeValueInt(fault, "Location"); - data.faultResistance = GetNodeValueDouble(fault, "Resistance"); - data.faultReactance = GetNodeValueDouble(fault, "Reactance"); - auto stability = electricalProp->first_node("Stability"); - data.plotBus = GetNodeValueInt(stability, "Plot"); - data.stabHasFault = GetNodeValueInt(stability, "HasFault"); - data.stabFaultTime = GetNodeValueDouble(stability, "FaultTime"); - data.stabFaultLength = GetNodeValueDouble(stability, "FaultLength"); - data.stabFaultResistance = GetNodeValueDouble(stability, "FaultResistance"); - data.stabFaultReactance = GetNodeValueDouble(stability, "FaultReactance"); - - bus->SetElectricalData(data); - - if(data.stabHasFault) bus->SetDynamicEvent(true); + Bus* bus = new Bus(); + if(!bus->OpenElement(busNode)) return false; elementList.push_back(bus); busList.push_back(bus); + parentList.push_back(bus); + busNode = busNode->next_sibling("Bus"); } //} @@ -1044,71 +357,10 @@ bool FileHanding::OpenProject(wxFileName path) while(capacitorNode) { Capacitor* capacitor = new Capacitor(); - auto cadPropNode = capacitorNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - auto nodePosition = cadPropNode->first_node("NodePosition"); - double nodePosX = GetNodeValueDouble(nodePosition, "X"); - double nodePosY = GetNodeValueDouble(nodePosition, "Y"); - int parentID = GetNodeValueInt(cadPropNode, "ParentID"); - if(parentID == -1) { - // If the element has no parent, create a temporary one, remove and delete. - Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY)); - capacitor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - capacitor->StartMove(capacitor->GetPosition()); - capacitor->Move(wxPoint2DDouble(posX, posY)); - capacitor->RemoveParent(parent); - delete parent; - } else { - Bus* parent = busList[parentID]; - capacitor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - capacitor->StartMove(capacitor->GetPosition()); - capacitor->Move(wxPoint2DDouble(posX, posY)); - } - capacitor->SetWidth(width); - capacitor->SetHeight(height); - - int numRot = angle / capacitor->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) capacitor->Rotate(clockwise); - - auto electricalProp = capacitorNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - capacitor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - CapacitorElectricalData data = capacitor->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower"); - data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID"); - - SwitchingData swData; - auto switchingList = electricalProp->first_node("SwitchingList"); - if(!switchingList) return false; - auto swNode = switchingList->first_node("Switching"); - while(swNode) { - swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type")); - swData.swTime.push_back(GetNodeValueDouble(swNode, "Time")); - swNode = swNode->next_sibling("Switching"); - } - capacitor->SetSwitchingData(swData); - - capacitor->SetElectricalData(data); - - if(swData.swTime.size() != 0) capacitor->SetDynamicEvent(true); - + if(!capacitor->OpenElement(capacitorNode, parentList)) return false; elementList.push_back(capacitor); capacitorList.push_back(capacitor); + capacitorNode = capacitorNode->next_sibling("Capacitor"); } //} @@ -1119,59 +371,10 @@ bool FileHanding::OpenProject(wxFileName path) while(indMotorNode) { IndMotor* indMotor = new IndMotor(); - auto cadPropNode = indMotorNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - auto nodePosition = cadPropNode->first_node("NodePosition"); - double nodePosX = GetNodeValueDouble(nodePosition, "X"); - double nodePosY = GetNodeValueDouble(nodePosition, "Y"); - int parentID = GetNodeValueInt(cadPropNode, "ParentID"); - if(parentID == -1) { - // If the element has no parent, create a temporary one, remove and delete. - Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY)); - indMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - indMotor->StartMove(indMotor->GetPosition()); - indMotor->Move(wxPoint2DDouble(posX, posY)); - indMotor->RemoveParent(parent); - delete parent; - } else { - Bus* parent = busList[parentID]; - indMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - indMotor->StartMove(indMotor->GetPosition()); - indMotor->Move(wxPoint2DDouble(posX, posY)); - } - indMotor->SetWidth(width); - indMotor->SetHeight(height); - - int numRot = angle / indMotor->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) indMotor->Rotate(clockwise); - - auto electricalProp = indMotorNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - indMotor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - IndMotorElectricalData data = indMotor->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.activePower = GetNodeValueDouble(electricalProp, "ActivePower"); - data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID"); - data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower"); - data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID"); - - indMotor->SetElectricalData(data); + if(!indMotor->OpenElement(indMotorNode, parentList)) return false; elementList.push_back(indMotor); indMotorList.push_back(indMotor); + indMotorNode = indMotorNode->next_sibling("IndMotor"); } //} @@ -1182,71 +385,10 @@ bool FileHanding::OpenProject(wxFileName path) while(inductorNode) { Inductor* inductor = new Inductor(); - auto cadPropNode = inductorNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - auto nodePosition = cadPropNode->first_node("NodePosition"); - double nodePosX = GetNodeValueDouble(nodePosition, "X"); - double nodePosY = GetNodeValueDouble(nodePosition, "Y"); - int parentID = GetNodeValueInt(cadPropNode, "ParentID"); - if(parentID == -1) { - // If the element has no parent, create a temporary one, remove and delete. - Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY)); - inductor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - inductor->StartMove(inductor->GetPosition()); - inductor->Move(wxPoint2DDouble(posX, posY)); - inductor->RemoveParent(parent); - delete parent; - } else { - Bus* parent = busList[parentID]; - inductor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - inductor->StartMove(inductor->GetPosition()); - inductor->Move(wxPoint2DDouble(posX, posY)); - } - inductor->SetWidth(width); - inductor->SetHeight(height); - - int numRot = angle / inductor->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) inductor->Rotate(clockwise); - - auto electricalProp = inductorNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - inductor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - InductorElectricalData data = inductor->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower"); - data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID"); - - SwitchingData swData; - auto switchingList = electricalProp->first_node("SwitchingList"); - if(!switchingList) return false; - auto swNode = switchingList->first_node("Switching"); - while(swNode) { - swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type")); - swData.swTime.push_back(GetNodeValueDouble(swNode, "Time")); - swNode = swNode->next_sibling("Switching"); - } - inductor->SetSwitchingData(swData); - - inductor->SetElectricalData(data); - - if(swData.swTime.size() != 0) inductor->SetDynamicEvent(true); - + if(!inductor->OpenElement(inductorNode, parentList)) return false; elementList.push_back(inductor); inductorList.push_back(inductor); + inductorNode = inductorNode->next_sibling("Inductor"); } //} @@ -1257,107 +399,10 @@ bool FileHanding::OpenProject(wxFileName path) while(lineNode) { Line* line = new Line(); - auto cadPropNode = lineNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - // Get nodes points - std::vector<wxPoint2DDouble> ptsList; - auto nodePosList = cadPropNode->first_node("NodeList"); - if(!nodePosList) return false; - auto nodePos = nodePosList->first_node("Node"); - while(nodePos) { - double nodePosX = GetNodeValueDouble(nodePos, "X"); - double nodePosY = GetNodeValueDouble(nodePos, "Y"); - ptsList.push_back(wxPoint2DDouble(nodePosX, nodePosY)); - nodePos = nodePos->next_sibling("Node"); - } - - // Get parents IDs - auto parentIDList = cadPropNode->first_node("ParentIDList"); - if(!parentIDList) return false; - auto parentNode = parentIDList->first_node("ParentID"); - long parentID[2] = {-1, -1}; - while(parentNode) { - long index = 0; - wxString(parentNode->first_attribute("ID")->value()).ToLong(&index); - wxString(parentNode->value()).ToCLong(&parentID[index]); - parentNode = parentNode->next_sibling("ParentID"); - } - - // Set parents (if have) - Bus *parent1, *parent2; - if(parentID[0] == -1) { - parent1 = new Bus(ptsList[0]); - line->AddParent(parent1, ptsList[0]); - } else { - parent1 = busList[parentID[0]]; - line->AddParent(parent1, ptsList[0]); - } - if(parentID[1] == -1) { - parent2 = new Bus(ptsList[ptsList.size() - 1]); - line->AddParent(parent2, ptsList[ptsList.size() - 1]); - } else { - parent2 = busList[parentID[1]]; - line->AddParent(parent2, ptsList[ptsList.size() - 1]); - } - - // Add the others nodes (if have) - std::vector<wxPoint2DDouble> midPts; - for(int i = 1; i < (int)ptsList.size() - 1; i++) midPts.push_back(ptsList[i]); - std::vector<wxPoint2DDouble> edgesPts = line->GetPointList(); - edgesPts.insert(edgesPts.begin() + 2, midPts.begin(), midPts.end()); - line->SetPointList(edgesPts); - - if(parentID[0] == -1) { - line->RemoveParent(parent1); - delete parent1; - } - if(parentID[1] == -1) { - line->RemoveParent(parent2); - delete parent2; - } - - auto electricalProp = lineNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - line->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - LineElectricalData data = line->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage"); - data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID"); - data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower"); - data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID"); - data.resistance = GetNodeValueDouble(electricalProp, "Resistance"); - data.resistanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "Resistance", "UnitID"); - data.indReactance = GetNodeValueDouble(electricalProp, "IndReactance"); - data.indReactanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "IndReactance", "UnitID"); - data.capSusceptance = GetNodeValueDouble(electricalProp, "CapSusceptance"); - data.capSusceptanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "CapSusceptance", "UnitID"); - data.lineSize = GetNodeValueDouble(electricalProp, "LineSize"); - data.useLinePower = GetNodeValueInt(electricalProp, "UseLinePower"); - - auto fault = electricalProp->first_node("Fault"); - data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance"); - data.zeroIndReactance = GetNodeValueDouble(fault, "ZeroIndReactance"); - data.zeroCapSusceptance = GetNodeValueDouble(fault, "ZeroCapSusceptance"); - - SwitchingData swData; - auto switchingList = electricalProp->first_node("SwitchingList"); - if(!switchingList) return false; - auto swNode = switchingList->first_node("Switching"); - while(swNode) { - swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type")); - swData.swTime.push_back(GetNodeValueDouble(swNode, "Time")); - swNode = swNode->next_sibling("Switching"); - } - line->SetSwitchingData(swData); - - line->SetElectricalData(data); - - if(swData.swTime.size() != 0) line->SetDynamicEvent(true); - + if(!line->OpenElement(lineNode, parentList)) return false; elementList.push_back(line); lineList.push_back(line); + lineNode = lineNode->next_sibling("Line"); } //} @@ -1368,88 +413,10 @@ bool FileHanding::OpenProject(wxFileName path) while(loadNode) { Load* load = new Load(); - auto cadPropNode = loadNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - auto nodePosition = cadPropNode->first_node("NodePosition"); - double nodePosX = GetNodeValueDouble(nodePosition, "X"); - double nodePosY = GetNodeValueDouble(nodePosition, "Y"); - int parentID = GetNodeValueInt(cadPropNode, "ParentID"); - if(parentID == -1) { - // If the element has no parent, create a temporary one, remove and delete. - Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY)); - load->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - load->StartMove(load->GetPosition()); - load->Move(wxPoint2DDouble(posX, posY)); - load->RemoveParent(parent); - delete parent; - } else { - Bus* parent = busList[parentID]; - load->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - load->StartMove(load->GetPosition()); - load->Move(wxPoint2DDouble(posX, posY)); - } - load->SetWidth(width); - load->SetHeight(height); - - int numRot = angle / load->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) load->Rotate(clockwise); - - auto electricalProp = loadNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - load->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - LoadElectricalData data = load->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.activePower = GetNodeValueDouble(electricalProp, "ActivePower"); - data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID"); - data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower"); - data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID"); - data.loadType = (LoadType)GetNodeValueInt(electricalProp, "LoadType"); - // Stability - auto stability = electricalProp->first_node("Stability"); - if(stability) { - data.plotLoad = GetNodeValueInt(stability, "PlotLoad"); - data.useCompLoad = GetNodeValueInt(stability, "UseCompositeLoad"); - auto activePowerComp = stability->first_node("ActivePowerComposition"); - data.constImpedanceActive = GetNodeValueDouble(activePowerComp, "ConstantImpedance"); - data.constCurrentActive = GetNodeValueDouble(activePowerComp, "ConstantCurrent"); - data.constPowerActive = GetNodeValueDouble(activePowerComp, "ConstantPower"); - auto reactivePowerComp = stability->first_node("ReactivePowerComposition"); - data.constImpedanceReactive = GetNodeValueDouble(reactivePowerComp, "ConstantImpedance"); - data.constCurrentReactive = GetNodeValueDouble(reactivePowerComp, "ConstantCurrent"); - data.constPowerReactive = GetNodeValueDouble(reactivePowerComp, "ConstantPower"); - } - - SwitchingData swData; - auto switchingList = electricalProp->first_node("SwitchingList"); - if(!switchingList) return false; - auto swNode = switchingList->first_node("Switching"); - while(swNode) { - swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type")); - swData.swTime.push_back(GetNodeValueDouble(swNode, "Time")); - swNode = swNode->next_sibling("Switching"); - } - load->SetSwitchingData(swData); - - load->SetElectricalData(data); - - if(swData.swTime.size() != 0) load->SetDynamicEvent(true); - + if(!load->OpenElement(loadNode, parentList)) return false; elementList.push_back(load); loadList.push_back(load); + loadNode = loadNode->next_sibling("Load"); } //} @@ -1457,102 +424,16 @@ bool FileHanding::OpenProject(wxFileName path) auto syncGeneratorListNode = elementsNode->first_node("SyncGeneratorList"); if(!syncGeneratorListNode) return false; auto syncGeneratorNode = syncGeneratorListNode->first_node("SyncGenerator"); + while(syncGeneratorNode) { SyncGenerator* syncGenerator = new SyncGenerator(); - auto cadPropNode = syncGeneratorNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - auto nodePosition = cadPropNode->first_node("NodePosition"); - double nodePosX = GetNodeValueDouble(nodePosition, "X"); - double nodePosY = GetNodeValueDouble(nodePosition, "Y"); - int parentID = GetNodeValueInt(cadPropNode, "ParentID"); - if(parentID == -1) { - // If the element has no parent, create a temporary one, remove and delete. - Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY)); - syncGenerator->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - syncGenerator->StartMove(syncGenerator->GetPosition()); - syncGenerator->Move(wxPoint2DDouble(posX, posY)); - syncGenerator->RemoveParent(parent); - delete parent; - } else { - Bus* parent = busList[parentID]; - syncGenerator->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - syncGenerator->StartMove(syncGenerator->GetPosition()); - syncGenerator->Move(wxPoint2DDouble(posX, posY)); - } - syncGenerator->SetWidth(width); - syncGenerator->SetHeight(height); - - int numRot = angle / syncGenerator->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) syncGenerator->Rotate(clockwise); + if(!syncGenerator->OpenElement(syncGeneratorNode, parentList)) return false; + // Open controls. + auto data = syncGenerator->GetElectricalData(); auto electricalProp = syncGeneratorNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - syncGenerator->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - SyncGeneratorElectricalData data = syncGenerator->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower"); - data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID"); - data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage"); - data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID"); - data.activePower = GetNodeValueDouble(electricalProp, "ActivePower"); - data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID"); - data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower"); - data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID"); - data.haveMaxReactive = GetNodeValueInt(electricalProp, "HaveMaxReactive"); - data.maxReactive = GetNodeValueDouble(electricalProp, "MaxReactive"); - data.maxReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MaxReactive", "UnitID"); - data.haveMinReactive = GetNodeValueInt(electricalProp, "HaveMinReactive"); - data.minReactive = GetNodeValueDouble(electricalProp, "MinReactive"); - data.minReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MinReactive", "UnitID"); - data.useMachineBase = GetNodeValueInt(electricalProp, "UseMachineBase"); - - auto fault = electricalProp->first_node("Fault"); - if(!fault) return false; - data.positiveResistance = GetNodeValueDouble(fault, "PositiveResistance"); - data.positiveReactance = GetNodeValueDouble(fault, "PositiveReactance"); - data.negativeResistance = GetNodeValueDouble(fault, "NegativeResistance"); - data.negativeReactance = GetNodeValueDouble(fault, "NegativeReactance"); - data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance"); - data.zeroReactance = GetNodeValueDouble(fault, "ZeroReactance"); - data.groundResistance = GetNodeValueDouble(fault, "GroundResistance"); - data.groundReactance = GetNodeValueDouble(fault, "GroundReactance"); - data.groundNeutral = GetNodeValueInt(fault, "GroundNeutral"); - auto stability = electricalProp->first_node("Stability"); - if(!stability) return false; - data.plotSyncMachine = GetNodeValueInt(stability, "PlotSyncMachine"); - data.inertia = GetNodeValueDouble(stability, "Inertia"); - data.damping = GetNodeValueDouble(stability, "Damping"); - data.useAVR = GetNodeValueInt(stability, "UseAVR"); - data.useSpeedGovernor = GetNodeValueInt(stability, "UseSpeedGovernor"); - data.armResistance = GetNodeValueDouble(stability, "ArmResistance"); - data.potierReactance = GetNodeValueDouble(stability, "PotierReactance"); - data.satFactor = GetNodeValueDouble(stability, "SatFactor"); - data.syncXd = GetNodeValueDouble(stability, "SyncXd"); - data.syncXq = GetNodeValueDouble(stability, "SyncXq"); - data.transXd = GetNodeValueDouble(stability, "TransXd"); - data.transXq = GetNodeValueDouble(stability, "TransXq"); - data.transTd0 = GetNodeValueDouble(stability, "TransTd0"); - data.transTq0 = GetNodeValueDouble(stability, "TransTq0"); - data.subXd = GetNodeValueDouble(stability, "SubXd"); - data.subXq = GetNodeValueDouble(stability, "SubXq"); - data.subTd0 = GetNodeValueDouble(stability, "SubTd0"); - data.subTq0 = GetNodeValueDouble(stability, "SubTq0"); auto avr = stability->first_node("AVR"); if(!avr) return false; @@ -1562,21 +443,8 @@ bool FileHanding::OpenProject(wxFileName path) if(!speedGov) return false; if(!OpenControlElements(doc, speedGov, data.speedGov)) return false; - SwitchingData swData; - auto switchingList = electricalProp->first_node("SwitchingList"); - if(!switchingList) return false; - auto swNode = switchingList->first_node("Switching"); - while(swNode) { - swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type")); - swData.swTime.push_back(GetNodeValueDouble(swNode, "Time")); - swNode = swNode->next_sibling("Switching"); - } - syncGenerator->SetSwitchingData(swData); - syncGenerator->SetElectricalData(data); - if(swData.swTime.size() != 0) syncGenerator->SetDynamicEvent(true); - elementList.push_back(syncGenerator); syncGeneratorList.push_back(syncGenerator); syncGeneratorNode = syncGeneratorNode->next_sibling("SyncGenerator"); @@ -1589,93 +457,10 @@ bool FileHanding::OpenProject(wxFileName path) while(syncMotorNode) { SyncMotor* syncMotor = new SyncMotor(); - auto cadPropNode = syncMotorNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - auto nodePosition = cadPropNode->first_node("NodePosition"); - double nodePosX = GetNodeValueDouble(nodePosition, "X"); - double nodePosY = GetNodeValueDouble(nodePosition, "Y"); - int parentID = GetNodeValueInt(cadPropNode, "ParentID"); - if(parentID == -1) { - // If the element has no parent, create a temporary one, remove and delete. - Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY)); - syncMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - syncMotor->StartMove(syncMotor->GetPosition()); - syncMotor->Move(wxPoint2DDouble(posX, posY)); - syncMotor->RemoveParent(parent); - delete parent; - } else { - Bus* parent = busList[parentID]; - syncMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY)); - syncMotor->StartMove(syncMotor->GetPosition()); - syncMotor->Move(wxPoint2DDouble(posX, posY)); - } - syncMotor->SetWidth(width); - syncMotor->SetHeight(height); - - int numRot = angle / syncMotor->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) syncMotor->Rotate(clockwise); - - auto electricalProp = syncMotorNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - syncMotor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - SyncMotorElectricalData data = syncMotor->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower"); - data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID"); - // data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage"); - // data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID"); - data.activePower = GetNodeValueDouble(electricalProp, "ActivePower"); - data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID"); - data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower"); - data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID"); - data.haveMaxReactive = GetNodeValueInt(electricalProp, "HaveMaxReactive"); - data.maxReactive = GetNodeValueDouble(electricalProp, "MaxReactive"); - data.maxReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MaxReactive", "UnitID"); - data.haveMinReactive = GetNodeValueInt(electricalProp, "HaveMinReactive"); - data.minReactive = GetNodeValueDouble(electricalProp, "MinReactive"); - data.minReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MinReactive", "UnitID"); - data.useMachineBase = GetNodeValueInt(electricalProp, "UseMachineBase"); - - auto fault = electricalProp->first_node("Fault"); - if(!fault) return false; - data.positiveResistance = GetNodeValueDouble(fault, "PositiveResistance"); - data.positiveReactance = GetNodeValueDouble(fault, "PositiveReactance"); - data.negativeResistance = GetNodeValueDouble(fault, "NegativeResistance"); - data.negativeReactance = GetNodeValueDouble(fault, "NegativeReactance"); - data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance"); - data.zeroReactance = GetNodeValueDouble(fault, "ZeroReactance"); - data.groundResistance = GetNodeValueDouble(fault, "GroundResistance"); - data.groundReactance = GetNodeValueDouble(fault, "GroundReactance"); - data.groundNeutral = GetNodeValueInt(fault, "GroundNeutral"); - - /*SwitchingData swData; - auto switchingList = electricalProp->first_node("SwitchingList"); - if(!switchingList) return false; - auto swNode = switchingList->first_node("Switching"); - while(swNode) { - swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type")); - swData.swTime.push_back(GetNodeValueDouble(swNode, "Time")); - swNode = swNode->next_sibling("Switching"); - } - syncMotor->SetSwitchingData(swData);*/ - - syncMotor->SetElectricalData(data); + if(!syncMotor->OpenElement(syncMotorNode, parentList)) return false; elementList.push_back(syncMotor); syncMotorList.push_back(syncMotor); + syncMotorNode = syncMotorNode->next_sibling("SyncMotor"); } //} @@ -1686,129 +471,10 @@ bool FileHanding::OpenProject(wxFileName path) while(transfomerNode) { Transformer* transformer = new Transformer(); - auto cadPropNode = transfomerNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - // Get nodes points - std::vector<wxPoint2DDouble> ptsList; - auto nodePosList = cadPropNode->first_node("NodeList"); - if(!nodePosList) return false; - auto nodePos = nodePosList->first_node("Node"); - while(nodePos) { - double nodePosX = GetNodeValueDouble(nodePos, "X"); - double nodePosY = GetNodeValueDouble(nodePos, "Y"); - ptsList.push_back(wxPoint2DDouble(nodePosX, nodePosY)); - nodePos = nodePos->next_sibling("Node"); - } - - // Get parents IDs - auto parentIDList = cadPropNode->first_node("ParentIDList"); - if(!parentIDList) return false; - auto parentNode = parentIDList->first_node("ParentID"); - long parentID[2] = {-1, -1}; - while(parentNode) { - long index = 0; - wxString(parentNode->first_attribute("ID")->value()).ToLong(&index); - wxString(parentNode->value()).ToCLong(&parentID[index]); - parentNode = parentNode->next_sibling("ParentID"); - } - - // Set parents (if have) - Bus *parent1, *parent2; - if(parentID[0] == -1) { - parent1 = new Bus(ptsList[0]); - transformer->AddParent(parent1, ptsList[0]); - } else { - parent1 = busList[parentID[0]]; - transformer->AddParent(parent1, ptsList[0]); - } - if(parentID[1] == -1) { - parent2 = new Bus(ptsList[ptsList.size() - 1]); - transformer->AddParent(parent2, ptsList[ptsList.size() - 1]); - } else { - parent2 = busList[parentID[1]]; - transformer->AddParent(parent2, ptsList[ptsList.size() - 1]); - } - - transformer->StartMove(transformer->GetPosition()); - transformer->Move(wxPoint2DDouble(posX, posY)); - - if(parentID[0] == -1) { - transformer->RemoveParent(parent1); - delete parent1; - } - if(parentID[1] == -1) { - transformer->RemoveParent(parent2); - delete parent2; - } - - transformer->SetWidth(width); - transformer->SetHeight(height); - - int numRot = angle / transformer->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) transformer->Rotate(clockwise); - - auto electricalProp = transfomerNode->first_node("ElectricalProperties"); - if(!electricalProp) return false; - - transformer->SetOnline(GetNodeValueInt(electricalProp, "IsOnline")); - TransformerElectricalData data = transformer->GetElectricalData(); - data.name = electricalProp->first_node("Name")->value(); - data.primaryNominalVoltage = GetNodeValueDouble(electricalProp, "PrimaryNominalVoltage"); - data.primaryNominalVoltageUnit = - (ElectricalUnit)GetAttributeValueInt(electricalProp, "PrimaryNominalVoltage", "UnitID"); - data.secondaryNominalVoltage = GetNodeValueDouble(electricalProp, "SecondaryNominalVoltage"); - data.secondaryNominalVoltageUnit = - (ElectricalUnit)GetAttributeValueInt(electricalProp, "SecondaryNominalVoltage", "UnitID"); - data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower"); - data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID"); - data.resistance = GetNodeValueDouble(electricalProp, "Resistance"); - data.resistanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "Resistance", "UnitID"); - data.indReactance = GetNodeValueDouble(electricalProp, "IndReactance"); - data.indReactanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "IndReactance", "UnitID"); - data.connection = (TransformerConnection)GetNodeValueInt(electricalProp, "Connection"); - data.turnsRatio = GetNodeValueDouble(electricalProp, "TurnsRatio"); - data.phaseShift = GetNodeValueDouble(electricalProp, "PhaseShift"); - data.useTransformerPower = GetNodeValueInt(electricalProp, "UseTransfomerPower"); - - auto fault = electricalProp->first_node("Fault"); - data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance"); - data.zeroIndReactance = GetNodeValueDouble(fault, "ZeroIndReactance"); - data.primaryGrndResistance = GetNodeValueDouble(fault, "PrimaryGrndResistance"); - data.primaryGrndReactance = GetNodeValueDouble(fault, "PrimaryGrndReactance"); - data.secondaryGrndResistance = GetNodeValueDouble(fault, "SecondaryGrndResistance"); - data.secondaryGrndReactance = GetNodeValueDouble(fault, "SecondaryGrndReactance"); - - SwitchingData swData; - auto switchingList = electricalProp->first_node("SwitchingList"); - if(!switchingList) return false; - auto swNode = switchingList->first_node("Switching"); - while(swNode) { - swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type")); - swData.swTime.push_back(GetNodeValueDouble(swNode, "Time")); - swNode = swNode->next_sibling("Switching"); - } - transformer->SetSwitchingData(swData); - - transformer->SetElectricaData(data); - - if(swData.swTime.size() != 0) transformer->SetDynamicEvent(true); - + if(!transformer->OpenElement(transfomerNode, parentList)) return false; elementList.push_back(transformer); transformerList.push_back(transformer); + transfomerNode = transfomerNode->next_sibling("Transfomer"); } //} @@ -1819,32 +485,10 @@ bool FileHanding::OpenProject(wxFileName path) if(!textListNode) return false; auto textNode = textListNode->first_node("Text"); while(textNode) { - auto cadPropNode = textNode->first_node("CADProperties"); - if(!cadPropNode) return false; + Text* text = new Text(); - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); + if(!text->OpenElement(textNode)) return true; - Text* text = new Text(wxPoint2DDouble(posX, posY)); - - text->SetWidth(width); - text->SetHeight(height); - - auto textProperties = textNode->first_node("TextProperties"); - if(!textProperties) return false; - - text->SetElementType((ElementType)GetNodeValueDouble(textProperties, "ElementType")); - text->SetDataType((DataType)GetNodeValueDouble(textProperties, "DataType")); - text->SetUnit((ElectricalUnit)GetNodeValueDouble(textProperties, "DataUnit")); - text->SetDirection(GetNodeValueDouble(textProperties, "Direction")); - text->SetDecimalPlaces(GetNodeValueDouble(textProperties, "DecimalPlaces")); - - text->SetElementNumber(GetNodeValueInt(textProperties, "ElementNumber")); switch(text->GetElementType()) { case TYPE_NONE: break; @@ -1886,14 +530,6 @@ bool FileHanding::OpenProject(wxFileName path) } break; } - int numRot = angle / text->GetRotationAngle(); - bool clockwise = true; - if(numRot < 0) { - numRot = std::abs(numRot); - clockwise = false; - } - for(int i = 0; i < numRot; i++) text->Rotate(clockwise); - textList.push_back(text); textNode = textNode->next_sibling("Text"); } //} @@ -1922,10 +558,10 @@ void FileHanding::SaveControl(wxFileName path) rapidxml::xml_node<>* rootNode = doc.allocate_node(rapidxml::node_element, "Control"); doc.append_node(rootNode); - rapidxml::xml_node<>* projectNameNode = AppendNode(doc, rootNode, "Name"); - SetNodeValue(doc, projectNameNode, path.GetName()); + rapidxml::xml_node<>* projectNameNode = XMLParser::AppendNode(doc, rootNode, "Name"); + XMLParser::SetNodeValue(doc, projectNameNode, path.GetName()); - auto elementsNode = AppendNode(doc, rootNode, "ControlElements"); + auto elementsNode = XMLParser::AppendNode(doc, rootNode, "ControlElements"); SaveControlElements(doc, elementsNode); std::ofstream writeXML(path.GetFullPath()); writeXML << doc; @@ -1951,7 +587,7 @@ bool FileHanding::OpenControl(wxFileName path, auto elementsNode = projectNode->first_node("ControlElements"); if(!elementsNode) return false; - // auto elementsNode = AppendNode(doc, rootNode, "ControlElements"); + // auto elementsNode = XMLParser::AppendNode(doc, rootNode, "ControlElements"); ControlElementContainer* ctrlElementContainer = new ControlElementContainer(); if(!OpenControlElements(doc, elementsNode, ctrlElementContainer)) return false; ctrlElementList = ctrlElementContainer->GetControlElementsList(); @@ -1969,393 +605,107 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, } //{ Constant - auto constsNode = AppendNode(doc, elementsNode, "ConstantList"); + auto constsNode = XMLParser::AppendNode(doc, elementsNode, "ConstantList"); auto constList = ctrlContainer->GetConstantList(); for(auto it = constList.begin(), itEnd = constList.end(); it != itEnd; ++it) { - Constant* constant = *it; - auto constNode = AppendNode(doc, constsNode, "Constant"); - SetNodeAttribute(doc, constNode, "ID", constant->GetID()); - auto cadProp = AppendNode(doc, constNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, constant->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, constant->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, constant->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, constant->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, constant->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, constNode, "NodeList"); - SaveControlNodes(doc, nodeList, constant->GetNodeList()); - - // Control properties - auto value = AppendNode(doc, constNode, "Value"); - SetNodeValue(doc, value, constant->GetValue()); + (*it)->SaveElement(doc, constsNode); } //} //{ Exponential - auto expsNode = AppendNode(doc, elementsNode, "ExponentialList"); + auto expsNode = XMLParser::AppendNode(doc, elementsNode, "ExponentialList"); auto expList = ctrlContainer->GetExponentialList(); - for(auto it = expList.begin(), itEnd = expList.end(); it != itEnd; ++it) { - Exponential* exponential = *it; - auto expNode = AppendNode(doc, expsNode, "Exponential"); - SetNodeAttribute(doc, expNode, "ID", exponential->GetID()); - auto cadProp = AppendNode(doc, expNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, exponential->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, exponential->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, exponential->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, exponential->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, exponential->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, expNode, "NodeList"); - SaveControlNodes(doc, nodeList, exponential->GetNodeList()); - - // Control properties - double a, b; - exponential->GetValues(a, b); - auto value = AppendNode(doc, expNode, "Value"); - auto aValue = AppendNode(doc, value, "A"); - SetNodeValue(doc, aValue, a); - auto bValue = AppendNode(doc, value, "B"); - SetNodeValue(doc, bValue, b); - } //} + for(auto it = expList.begin(), itEnd = expList.end(); it != itEnd; ++it) { (*it)->SaveElement(doc, expsNode); } //} //{ Gain - auto gainsNode = AppendNode(doc, elementsNode, "GainList"); + auto gainsNode = XMLParser::AppendNode(doc, elementsNode, "GainList"); auto gainList = ctrlContainer->GetGainList(); for(auto it = gainList.begin(), itEnd = gainList.end(); it != itEnd; ++it) { - Gain* gain = *it; - auto gainNode = AppendNode(doc, gainsNode, "Gain"); - SetNodeAttribute(doc, gainNode, "ID", gain->GetID()); - auto cadProp = AppendNode(doc, gainNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, gain->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, gain->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, gain->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, gain->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, gain->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, gainNode, "NodeList"); - SaveControlNodes(doc, nodeList, gain->GetNodeList()); - - // Control properties - auto value = AppendNode(doc, gainNode, "Value"); - SetNodeValue(doc, value, gain->GetValue()); + (*it)->SaveElement(doc, gainsNode); } //} //{ IO - auto iosNode = AppendNode(doc, elementsNode, "IOList"); + auto iosNode = XMLParser::AppendNode(doc, elementsNode, "IOList"); auto ioList = ctrlContainer->GetIOControlList(); - for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) { - IOControl* io = *it; - auto ioNode = AppendNode(doc, iosNode, "IO"); - SetNodeAttribute(doc, ioNode, "ID", io->GetID()); - auto cadProp = AppendNode(doc, ioNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, io->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, io->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, io->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, io->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, io->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, ioNode, "NodeList"); - SaveControlNodes(doc, nodeList, io->GetNodeList()); - - // Control properties - auto value = AppendNode(doc, ioNode, "Value"); - SetNodeValue(doc, value, io->GetValue()); - auto ioFlags = AppendNode(doc, ioNode, "IOFlags"); - SetNodeValue(doc, ioFlags, io->GetIOFlags()); - } //} + for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) { (*it)->SaveElement(doc, iosNode); } //} //{ Limiter - auto limitersNode = AppendNode(doc, elementsNode, "LimiterList"); + auto limitersNode = XMLParser::AppendNode(doc, elementsNode, "LimiterList"); auto limiterList = ctrlContainer->GetLimiterList(); for(auto it = limiterList.begin(), itEnd = limiterList.end(); it != itEnd; ++it) { - Limiter* limiter = *it; - auto limiterNode = AppendNode(doc, limitersNode, "Limiter"); - SetNodeAttribute(doc, limiterNode, "ID", limiter->GetID()); - auto cadProp = AppendNode(doc, limiterNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, limiter->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, limiter->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, limiter->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, limiter->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, limiter->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, limiterNode, "NodeList"); - SaveControlNodes(doc, nodeList, limiter->GetNodeList()); - - // Control properties - auto upLimit = AppendNode(doc, limiterNode, "UpperLimit"); - SetNodeValue(doc, upLimit, limiter->GetUpLimit()); - auto lowLimit = AppendNode(doc, limiterNode, "LowerLimit"); - SetNodeValue(doc, lowLimit, limiter->GetLowLimit()); + (*it)->SaveElement(doc, limitersNode); } //} //{ Multiplier - auto multipliersNode = AppendNode(doc, elementsNode, "MultiplierList"); + auto multipliersNode = XMLParser::AppendNode(doc, elementsNode, "MultiplierList"); auto multiplierList = ctrlContainer->GetMultiplierList(); for(auto it = multiplierList.begin(), itEnd = multiplierList.end(); it != itEnd; ++it) { - Multiplier* multiplier = *it; - auto multiplierNode = AppendNode(doc, multipliersNode, "Multiplier"); - SetNodeAttribute(doc, multiplierNode, "ID", multiplier->GetID()); - auto cadProp = AppendNode(doc, multiplierNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, multiplier->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, multiplier->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, multiplier->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, multiplier->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, multiplier->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, multiplierNode, "NodeList"); - SaveControlNodes(doc, nodeList, multiplier->GetNodeList()); + (*it)->SaveElement(doc, multipliersNode); } //} //{ Divider - auto dividersNode = AppendNode(doc, elementsNode, "DividerList"); + auto dividersNode = XMLParser::AppendNode(doc, elementsNode, "DividerList"); auto dividersList = ctrlContainer->GetDividerList(); for(auto it = dividersList.begin(), itEnd = dividersList.end(); it != itEnd; ++it) { - Divider* divider = *it; - auto dividerNode = AppendNode(doc, dividersNode, "Divider"); - SetNodeAttribute(doc, dividerNode, "ID", divider->GetID()); - auto cadProp = AppendNode(doc, dividerNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, divider->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, divider->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, divider->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, divider->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, divider->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, dividerNode, "NodeList"); - SaveControlNodes(doc, nodeList, divider->GetNodeList()); + (*it)->SaveElement(doc, dividersNode); } //} //{ Rate limiter - auto rateLimitersNode = AppendNode(doc, elementsNode, "RateLimiterList"); + auto rateLimitersNode = XMLParser::AppendNode(doc, elementsNode, "RateLimiterList"); auto rateLimiterList = ctrlContainer->GetRateLimiterList(); for(auto it = rateLimiterList.begin(), itEnd = rateLimiterList.end(); it != itEnd; ++it) { - RateLimiter* rateLimiter = *it; - auto rateLimiterNode = AppendNode(doc, rateLimitersNode, "RateLimiter"); - SetNodeAttribute(doc, rateLimiterNode, "ID", rateLimiter->GetID()); - auto cadProp = AppendNode(doc, rateLimiterNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, rateLimiter->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, rateLimiter->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, rateLimiter->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, rateLimiter->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, rateLimiter->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, rateLimiterNode, "NodeList"); - SaveControlNodes(doc, nodeList, rateLimiter->GetNodeList()); - - // Control properties - auto upLimit = AppendNode(doc, rateLimiterNode, "UpperLimit"); - SetNodeValue(doc, upLimit, rateLimiter->GetUpLimit()); - auto lowLimit = AppendNode(doc, rateLimiterNode, "LowerLimit"); - SetNodeValue(doc, lowLimit, rateLimiter->GetLowLimit()); + (*it)->SaveElement(doc, rateLimitersNode); } //} //{ Sum - auto sumsNode = AppendNode(doc, elementsNode, "SumList"); + auto sumsNode = XMLParser::AppendNode(doc, elementsNode, "SumList"); auto sumList = ctrlContainer->GetSumList(); - for(auto it = sumList.begin(), itEnd = sumList.end(); it != itEnd; ++it) { - Sum* sum = *it; - auto sumNode = AppendNode(doc, sumsNode, "Sum"); - SetNodeAttribute(doc, sumNode, "ID", sum->GetID()); - auto cadProp = AppendNode(doc, sumNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, sum->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, sum->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, sum->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, sum->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, sum->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, sumNode, "NodeList"); - SaveControlNodes(doc, nodeList, sum->GetNodeList()); - - // Control properties - auto signsNode = AppendNode(doc, sumNode, "Signs"); - auto signs = sum->GetSignalList(); - for(int i = 0; i < (int)signs.size(); ++i) { - auto value = AppendNode(doc, signsNode, "Value"); - SetNodeValue(doc, value, static_cast<int>(signs[i])); - } + for(auto it = sumList.begin(), itEnd = sumList.end(); it != itEnd; ++it) { (*it)->SaveElement(doc, sumsNode); } //} - } //} - //{ Math expression - auto mathExprsNode = AppendNode(doc, elementsNode, "MathExprList"); + auto mathExprsNode = XMLParser::AppendNode(doc, elementsNode, "MathExprList"); auto mathExprList = ctrlContainer->GetMathExprList(); for(auto it = mathExprList.begin(), itEnd = mathExprList.end(); it != itEnd; ++it) { - MathExpression* mathExpr = *it; - auto mathExprNode = AppendNode(doc, mathExprsNode, "MathExpr"); - SetNodeAttribute(doc, mathExprNode, "ID", mathExpr->GetID()); - auto cadProp = AppendNode(doc, mathExprNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, mathExpr->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, mathExpr->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, mathExpr->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, mathExpr->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, mathExpr->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, mathExprNode, "NodeList"); - SaveControlNodes(doc, nodeList, mathExpr->GetNodeList()); - - // Control properties - auto variablesNode = AppendNode(doc, mathExprNode, "VariableList"); - auto variables = mathExpr->GetVariables(); - for(unsigned int i = 0; i < variables.size(); ++i) { - auto variable = AppendNode(doc, variablesNode, "Variable"); - SetNodeValue(doc, variable, variables[i]); - } - auto mathExprValue = AppendNode(doc, mathExprNode, "MathExprValue"); - SetNodeValue(doc, mathExprValue, mathExpr->GetMathExpression()); - + (*it)->SaveElement(doc, mathExprsNode); } //} //{ Transfer function - auto tfsNode = AppendNode(doc, elementsNode, "TransferFunctionList"); + auto tfsNode = XMLParser::AppendNode(doc, elementsNode, "TransferFunctionList"); auto tfList = ctrlContainer->GetTFList(); - for(auto it = tfList.begin(), itEnd = tfList.end(); it != itEnd; ++it) { - TransferFunction* tf = *it; - auto tfNode = AppendNode(doc, tfsNode, "TransferFunction"); - SetNodeAttribute(doc, tfNode, "ID", tf->GetID()); - auto cadProp = AppendNode(doc, tfNode, "CADProperties"); - auto position = AppendNode(doc, cadProp, "Position"); - auto posX = AppendNode(doc, position, "X"); - SetNodeValue(doc, posX, tf->GetPosition().m_x); - auto posY = AppendNode(doc, position, "Y"); - SetNodeValue(doc, posY, tf->GetPosition().m_y); - auto size = AppendNode(doc, cadProp, "Size"); - auto width = AppendNode(doc, size, "Width"); - SetNodeValue(doc, width, tf->GetWidth()); - auto height = AppendNode(doc, size, "Height"); - SetNodeValue(doc, height, tf->GetHeight()); - auto angle = AppendNode(doc, cadProp, "Angle"); - SetNodeValue(doc, angle, tf->GetAngle()); - - // Nodes - auto nodeList = AppendNode(doc, tfNode, "NodeList"); - SaveControlNodes(doc, nodeList, tf->GetNodeList()); - - // Control properties - auto numeratorNode = AppendNode(doc, tfNode, "Numerator"); - auto numerator = tf->GetNumerator(); - for(int i = 0; i < (int)numerator.size(); ++i) { - auto value = AppendNode(doc, numeratorNode, "Value"); - SetNodeValue(doc, value, numerator[i]); - } - auto denominatorNode = AppendNode(doc, tfNode, "Denominator"); - auto denominator = tf->GetDenominator(); - for(int i = 0; i < (int)denominator.size(); ++i) { - auto value = AppendNode(doc, denominatorNode, "Value"); - SetNodeValue(doc, value, denominator[i]); - } - } //} + for(auto it = tfList.begin(), itEnd = tfList.end(); it != itEnd; ++it) { (*it)->SaveElement(doc, tfsNode); } //} //{ Connection line - auto cLinesNode = AppendNode(doc, elementsNode, "ConnectionList"); + auto cLinesNode = XMLParser::AppendNode(doc, elementsNode, "ConnectionList"); auto connLineList = ctrlContainer->GetConnectionLineList(); for(auto it = connLineList.begin(), itEnd = connLineList.end(); it != itEnd; ++it) { ConnectionLine* cLine = *it; - auto cLineNode = AppendNode(doc, cLinesNode, "Connection"); - SetNodeAttribute(doc, cLineNode, "ID", cLine->GetID()); + auto cLineNode = XMLParser::AppendNode(doc, cLinesNode, "Connection"); + XMLParser::SetNodeAttribute(doc, cLineNode, "ID", cLine->GetID()); // CAD properties - auto cadProp = AppendNode(doc, cLineNode, "CADProperties"); - auto offset = AppendNode(doc, cadProp, "Offset"); - SetNodeValue(doc, offset, cLine->GetOffset()); + auto cadProp = XMLParser::AppendNode(doc, cLineNode, "CADProperties"); + auto offset = XMLParser::AppendNode(doc, cadProp, "Offset"); + XMLParser::SetNodeValue(doc, offset, cLine->GetOffset()); // Parent list - auto parentsNode = AppendNode(doc, cLineNode, "ParentList"); + auto parentsNode = XMLParser::AppendNode(doc, cLineNode, "ParentList"); auto parentList = cLine->GetParentList(); int nodeIndex = 0; for(auto itP = parentList.begin(), itPEnd = parentList.end(); itP != itPEnd; ++itP) { Element* parent = *itP; - auto parentNode = AppendNode(doc, parentsNode, "Parent"); - auto elementID = AppendNode(doc, parentNode, "ElementID"); - SetNodeValue(doc, elementID, parent->GetID()); - auto nodeID = AppendNode(doc, parentNode, "NodeID"); - SetNodeValue(doc, nodeID, cLine->GetNodeList()[nodeIndex]->GetID()); + auto parentNode = XMLParser::AppendNode(doc, parentsNode, "Parent"); + auto elementID = XMLParser::AppendNode(doc, parentNode, "ElementID"); + XMLParser::SetNodeValue(doc, elementID, parent->GetID()); + auto nodeID = XMLParser::AppendNode(doc, parentNode, "NodeID"); + XMLParser::SetNodeValue(doc, nodeID, cLine->GetNodeList()[nodeIndex]->GetID()); nodeIndex++; } - auto parentLine = AppendNode(doc, cLineNode, "ParentLine"); + auto parentLine = XMLParser::AppendNode(doc, cLineNode, "ParentLine"); if(cLine->GetParentLine()) { ConnectionLine* parent = cLine->GetParentLine(); - SetNodeAttribute(doc, parentLine, "ID", parent->GetID()); + XMLParser::SetNodeAttribute(doc, parentLine, "ID", parent->GetID()); } else { - SetNodeAttribute(doc, parentLine, "ID", -1); + XMLParser::SetNodeAttribute(doc, parentLine, "ID", -1); } } //} } @@ -2372,35 +722,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(constListNode) { auto constNode = constListNode->first_node("Constant"); while(constNode) { - int id = GetAttributeValueInt(constNode, "ID"); + int id = XMLParser::GetAttributeValueInt(constNode, "ID"); Constant* constant = new Constant(id); - auto cadPropNode = constNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - double value = GetNodeValueDouble(constNode, "Value"); - - constant->SetWidth(width); - constant->SetHeight(height); - constant->SetAngle(angle); - constant->SetPosition(wxPoint2DDouble(posX, posY)); - constant->StartMove(constant->GetPosition()); - - constant->SetValue(value); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(constNode, nodeVector)) return false; - - constant->SetNodeList(nodeVector); - constant->UpdatePoints(); + if(!constant->OpenElement(constNode)) return false; elementList.push_back(constant); constNode = constNode->next_sibling("Constant"); @@ -2413,37 +738,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(expListNode) { auto expNode = expListNode->first_node("Exponential"); while(expNode) { - int id = GetAttributeValueInt(expNode, "ID"); + int id = XMLParser::GetAttributeValueInt(expNode, "ID"); Exponential* exponential = new Exponential(id); - auto cadPropNode = expNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - auto value = expNode->first_node("Value"); - double a = GetNodeValueDouble(value, "A"); - double b = GetNodeValueDouble(value, "B"); - - exponential->SetWidth(width); - exponential->SetHeight(height); - exponential->SetAngle(angle); - exponential->SetPosition(wxPoint2DDouble(posX, posY)); - exponential->StartMove(exponential->GetPosition()); - - exponential->SetValues(a, b); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(expNode, nodeVector)) return false; - - exponential->SetNodeList(nodeVector); - exponential->UpdatePoints(); + if(!exponential->OpenElement(expNode)) return false; elementList.push_back(exponential); expNode = expNode->next_sibling("Exponential"); @@ -2456,34 +754,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(gainListNode) { auto gainNode = gainListNode->first_node("Gain"); while(gainNode) { - int id = GetAttributeValueInt(gainNode, "ID"); + int id = XMLParser::GetAttributeValueInt(gainNode, "ID"); Gain* gain = new Gain(id); - auto cadPropNode = gainNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - double value = GetNodeValueDouble(gainNode, "Value"); - - gain->SetWidth(width); - gain->SetHeight(height); - gain->SetAngle(angle); - gain->SetPosition(wxPoint2DDouble(posX, posY)); - gain->SetValue(value); - gain->StartMove(gain->GetPosition()); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(gainNode, nodeVector)) return false; - - gain->SetNodeList(nodeVector); - gain->UpdatePoints(); + if(!gain->OpenElement(gainNode)) return false; elementList.push_back(gain); gainNode = gainNode->next_sibling("Gain"); @@ -2496,35 +770,12 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(ioListNode) { auto ioNode = ioListNode->first_node("IO"); while(ioNode) { - int id = GetAttributeValueInt(ioNode, "ID"); - - auto cadPropNode = ioNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(ioNode, nodeVector)) return false; - - IOControl::IOFlags value = static_cast<IOControl::IOFlags>(GetNodeValueInt(ioNode, "Value")); - int ioFlags = GetNodeValueInt(ioNode, "IOFlags"); + int id = XMLParser::GetAttributeValueInt(ioNode, "ID"); + int ioFlags = XMLParser::GetNodeValueInt(ioNode, "IOFlags"); IOControl* io = new IOControl(ioFlags, id); - io->SetWidth(width); - io->SetHeight(height); - io->SetAngle(angle); - io->SetPosition(wxPoint2DDouble(posX, posY)); - io->SetValue(value); - io->StartMove(io->GetPosition()); - io->SetNodeList(nodeVector); - io->UpdatePoints(); + if(!io->OpenElement(ioNode)) return false; elementList.push_back(io); ioNode = ioNode->next_sibling("IO"); @@ -2537,36 +788,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(limiterListNode) { auto limiterNode = limiterListNode->first_node("Limiter"); while(limiterNode) { - int id = GetAttributeValueInt(limiterNode, "ID"); + int id = XMLParser::GetAttributeValueInt(limiterNode, "ID"); Limiter* limiter = new Limiter(id); - auto cadPropNode = limiterNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - double upLimit = GetNodeValueDouble(limiterNode, "UpperLimit"); - double lowLimit = GetNodeValueDouble(limiterNode, "LowerLimit"); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(limiterNode, nodeVector)) return false; - - limiter->SetWidth(width); - limiter->SetHeight(height); - limiter->SetAngle(angle); - limiter->SetPosition(wxPoint2DDouble(posX, posY)); - limiter->SetUpLimit(upLimit); - limiter->SetLowLimit(lowLimit); - - limiter->StartMove(limiter->GetPosition()); - limiter->SetNodeList(nodeVector); - limiter->UpdatePoints(); + if(!limiter->OpenElement(limiterNode)) return false; elementList.push_back(limiter); limiterNode = limiterNode->next_sibling("Limiter"); @@ -2579,31 +804,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(multiplierListNode) { auto multiplierNode = multiplierListNode->first_node("Multiplier"); while(multiplierNode) { - int id = GetAttributeValueInt(multiplierNode, "ID"); + int id = XMLParser::GetAttributeValueInt(multiplierNode, "ID"); Multiplier* multiplier = new Multiplier(id); - auto cadPropNode = multiplierNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(multiplierNode, nodeVector)) return false; - - multiplier->SetWidth(width); - multiplier->SetHeight(height); - multiplier->SetAngle(angle); - multiplier->SetPosition(wxPoint2DDouble(posX, posY)); - - multiplier->StartMove(multiplier->GetPosition()); - multiplier->SetNodeList(nodeVector); - multiplier->UpdatePoints(); + if(!multiplier->OpenElement(multiplierNode)) return false; elementList.push_back(multiplier); multiplierNode = multiplierNode->next_sibling("Multiplier"); @@ -2616,31 +820,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(dividerListNode) { auto dividerNode = dividerListNode->first_node("Divider"); while(dividerNode) { - int id = GetAttributeValueInt(dividerNode, "ID"); + int id = XMLParser::GetAttributeValueInt(dividerNode, "ID"); Divider* divider = new Divider(id); - auto cadPropNode = dividerNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(dividerNode, nodeVector)) return false; - - divider->SetWidth(width); - divider->SetHeight(height); - divider->SetAngle(angle); - divider->SetPosition(wxPoint2DDouble(posX, posY)); - - divider->StartMove(divider->GetPosition()); - divider->SetNodeList(nodeVector); - divider->UpdatePoints(); + if(!divider->OpenElement(dividerNode)) return false; elementList.push_back(divider); dividerNode = dividerNode->next_sibling("Divider"); @@ -2653,36 +836,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(rateLimiterListNode) { auto rateLimiterNode = rateLimiterListNode->first_node("RateLimiter"); while(rateLimiterNode) { - int id = GetAttributeValueInt(rateLimiterNode, "ID"); + int id = XMLParser::GetAttributeValueInt(rateLimiterNode, "ID"); RateLimiter* limiter = new RateLimiter(id); - auto cadPropNode = rateLimiterNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - double upLimit = GetNodeValueDouble(rateLimiterNode, "UpperLimit"); - double lowLimit = GetNodeValueDouble(rateLimiterNode, "LowerLimit"); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(rateLimiterNode, nodeVector)) return false; - - limiter->SetWidth(width); - limiter->SetHeight(height); - limiter->SetAngle(angle); - limiter->SetPosition(wxPoint2DDouble(posX, posY)); - limiter->SetUpLimit(upLimit); - limiter->SetLowLimit(lowLimit); - - limiter->StartMove(limiter->GetPosition()); - limiter->SetNodeList(nodeVector); - limiter->UpdatePoints(); + if(!limiter->OpenElement(rateLimiterNode)) return false; elementList.push_back(limiter); rateLimiterNode = rateLimiterNode->next_sibling("RateLimiter"); @@ -2695,91 +852,26 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(sumListNode) { auto sumNode = sumListNode->first_node("Sum"); while(sumNode) { - int id = GetAttributeValueInt(sumNode, "ID"); + int id = XMLParser::GetAttributeValueInt(sumNode, "ID"); Sum* sum = new Sum(id); - auto cadPropNode = sumNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - std::vector<Sum::Signal> signs; - auto signsNode = sumNode->first_node("Signs"); - auto sign = signsNode->first_node("Value"); - while(sign) { - long value; - wxString(sign->value()).ToCLong(&value); - signs.push_back(static_cast<Sum::Signal>(value)); - sign = sign->next_sibling("Value"); - } - sum->SetSignalList(signs); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(sumNode, nodeVector)) return false; - - sum->SetWidth(width); - sum->SetHeight(height); - sum->SetAngle(angle); - sum->SetPosition(wxPoint2DDouble(posX, posY)); - - sum->StartMove(sum->GetPosition()); - sum->SetNodeList(nodeVector); - sum->UpdatePoints(); + if(!sum->OpenElement(sumNode)) return false; elementList.push_back(sum); sumNode = sumNode->next_sibling("Sum"); } } //} - + //{ Math expression auto mathListNode = elementsNode->first_node("MathExprList"); if(mathListNode) { auto mathExprNode = mathListNode->first_node("MathExpr"); while(mathExprNode) { - int id = GetAttributeValueInt(mathExprNode, "ID"); + int id = XMLParser::GetAttributeValueInt(mathExprNode, "ID"); MathExpression* mathExpr = new MathExpression(id); - auto cadPropNode = mathExprNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - std::vector<wxString> variables; - auto variablesNode = mathExprNode->first_node("VariableList"); - auto variable = variablesNode->first_node("Variable"); - while(variable) { - variables.push_back(variable->value()); - variable = variable->next_sibling("Variable"); - } - mathExpr->SetVariables(variables); - - auto mathExprValueNode = mathExprNode->first_node("MathExprValue"); - mathExpr->SetMathExpression(mathExprValueNode->value()); - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(mathExprNode, nodeVector)) return false; - - mathExpr->SetWidth(width); - mathExpr->SetHeight(height); - mathExpr->SetAngle(angle); - mathExpr->SetPosition(wxPoint2DDouble(posX, posY)); - - mathExpr->StartMove(mathExpr->GetPosition()); - mathExpr->SetNodeList(nodeVector); - mathExpr->UpdatePoints(); + if(!mathExpr->OpenElement(mathExprNode)) return false; elementList.push_back(mathExpr); mathExprNode = mathExprNode->next_sibling("MathExpr"); @@ -2792,54 +884,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, if(tfListNode) { auto tfNode = tfListNode->first_node("TransferFunction"); while(tfNode) { - int id = GetAttributeValueInt(tfNode, "ID"); + int id = XMLParser::GetAttributeValueInt(tfNode, "ID"); TransferFunction* tf = new TransferFunction(id); - auto cadPropNode = tfNode->first_node("CADProperties"); - if(!cadPropNode) return false; - - auto position = cadPropNode->first_node("Position"); - double posX = GetNodeValueDouble(position, "X"); - double posY = GetNodeValueDouble(position, "Y"); - auto size = cadPropNode->first_node("Size"); - double width = GetNodeValueDouble(size, "Width"); - double height = GetNodeValueDouble(size, "Height"); - double angle = GetNodeValueDouble(cadPropNode, "Angle"); - - std::vector<double> numerator, denominator; - auto numeratorNode = tfNode->first_node("Numerator"); - auto nValue = numeratorNode->first_node("Value"); - while(nValue) { - double value = 0.0; - wxString(nValue->value()).ToCDouble(&value); - numerator.push_back(value); - nValue = nValue->next_sibling("Value"); - } - auto denominatorNode = tfNode->first_node("Denominator"); - auto dValue = denominatorNode->first_node("Value"); - while(dValue) { - double value = 0.0; - wxString(dValue->value()).ToCDouble(&value); - denominator.push_back(value); - dValue = dValue->next_sibling("Value"); - } - - std::vector<Node*> nodeVector; - if(!OpenControlNodeList(tfNode, nodeVector)) return false; - - tf->SetWidth(width); - tf->SetHeight(height); - tf->SetAngle(angle); - tf->SetPosition(wxPoint2DDouble(posX, posY)); - - tf->SetNumerator(numerator); - tf->SetDenominator(denominator); - - tf->StartMove(tf->GetPosition()); - tf->SetNodeList(nodeVector); - - tf->UpdateTFText(); - + if(!tf->OpenElement(tfNode)) return false; elementList.push_back(tf); tfNode = tfNode->next_sibling("TransferFunction"); @@ -2853,11 +901,11 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, auto connNode = connectionListNode->first_node("Connection"); while(connNode) { ConnectionLine* cLine = NULL; - int id = GetAttributeValueInt(connNode, "ID"); + int id = XMLParser::GetAttributeValueInt(connNode, "ID"); auto cadPropNode = connNode->first_node("CADProperties"); if(!cadPropNode) return false; - double offset = GetNodeValueDouble(cadPropNode, "Offset"); + double offset = XMLParser::GetNodeValueDouble(cadPropNode, "Offset"); auto parentList = connNode->first_node("ParentList"); if(!parentList) return false; @@ -2865,10 +913,10 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, auto parentNode = parentList->first_node("Parent"); bool firstNode = true; while(parentNode) { - int elementID = GetNodeValueInt(parentNode, "ElementID"); - int nodeID = GetNodeValueInt(parentNode, "NodeID"); + int elementID = XMLParser::GetNodeValueInt(parentNode, "ElementID"); + int nodeID = XMLParser::GetNodeValueInt(parentNode, "NodeID"); - ControlElement* element = GetControlElementFromID(elementList, elementID); + ControlElement* element = ControlElement::GetControlElementFromID(elementList, elementID); Node* node = element->GetNodeList()[nodeID]; if(firstNode) cLine = new ConnectionLine(node, id); @@ -2882,7 +930,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, auto parentLine = connNode->first_node("ParentLine"); if(!parentLine) return false; - int parentLineID = GetAttributeValueInt(parentLine, "ID"); + int parentLineID = XMLParser::GetAttributeValueInt(parentLine, "ID"); if(parentLineID != -1) { for(auto it = connectionList.begin(), itEnd = connectionList.end(); it != itEnd; ++it) { ConnectionLine* parent = *it; @@ -2898,152 +946,8 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, connectionList.push_back(cLine); connNode = connNode->next_sibling("Connection"); } - } //} - - ctrlContainer->FillContainer(elementList, connectionList); - return true; -} - -void FileHanding::SaveControlNodes(rapidxml::xml_document<>& doc, - rapidxml::xml_node<>* nodesN, - std::vector<Node*> nodeList) -{ - int id = 0; - for(auto it = nodeList.begin(), itEnd = nodeList.end(); it != itEnd; ++it) { - Node* node = *it; - node->SetID(id); - auto nodeN = AppendNode(doc, nodesN, "Node"); - SetNodeAttribute(doc, nodeN, "ID", id); - auto nodePosition = AppendNode(doc, nodeN, "Position"); - auto posNodeX = AppendNode(doc, nodePosition, "X"); - SetNodeValue(doc, posNodeX, node->GetPosition().m_x); - auto posNodeY = AppendNode(doc, nodePosition, "Y"); - SetNodeValue(doc, posNodeY, node->GetPosition().m_y); - auto angle = AppendNode(doc, nodeN, "Angle"); - SetNodeValue(doc, angle, node->GetAngle()); - auto nodeType = AppendNode(doc, nodeN, "Type"); - SetNodeValue(doc, nodeType, node->GetNodeType()); - id++; - } -} - -ControlElement* FileHanding::GetControlElementFromID(std::vector<ControlElement*> elementList, int id) -{ - for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) { - ControlElement* element = *it; - if(element->GetID() == id) return element; - } - return NULL; -} + } //} -bool FileHanding::OpenControlNodeList(rapidxml::xml_node<>* elementNode, std::vector<Node*>& nodeVector) -{ - auto nodeList = elementNode->first_node("NodeList"); - if(!nodeList) return false; - auto nodeN = nodeList->first_node("Node"); - while(nodeN) { - auto nodePosition = nodeN->first_node("Position"); - double nodePosX = GetNodeValueDouble(nodePosition, "X"); - double nodePosY = GetNodeValueDouble(nodePosition, "Y"); - double nodeAngle = GetNodeValueDouble(nodeN, "Angle"); - Node::NodeType nodeType = (Node::NodeType)GetNodeValueInt(nodeN, "Type"); - Node* node = new Node(wxPoint2DDouble(nodePosX, nodePosY), nodeType, 2.0); - node->SetAngle(nodeAngle); - nodeVector.push_back(node); - nodeN = nodeN->next_sibling("Node"); - } + ctrlContainer->FillContainer(elementList, connectionList); return true; } - -rapidxml::xml_node<>* FileHanding::AppendNode(rapidxml::xml_document<>& doc, - rapidxml::xml_node<>* parentNode, - const char* name, - rapidxml::node_type nodeType) -{ - rapidxml::xml_node<>* node = doc.allocate_node(nodeType, name); - parentNode->append_node(node); - return node; -} - -void FileHanding::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, wxString value) -{ - node->value(doc.allocate_string(value.mb_str())); -} - -void FileHanding::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, int value) -{ - node->value(doc.allocate_string(wxString::Format("%d", value).mb_str())); -} - -void FileHanding::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, double value) -{ - node->value(doc.allocate_string(wxString::FromCDouble(value, 13).mb_str())); -} - -void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc, - rapidxml::xml_node<>* node, - const char* atrName, - wxString value) -{ - node->append_attribute(doc.allocate_attribute(atrName, doc.allocate_string(value.mb_str()))); -} - -void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc, - rapidxml::xml_node<>* node, - const char* atrName, - int value) -{ - node->append_attribute( - doc.allocate_attribute(atrName, doc.allocate_string(wxString::Format("%d", value).mb_str()))); -} - -void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc, - rapidxml::xml_node<>* node, - const char* atrName, - double value) -{ - node->append_attribute( - doc.allocate_attribute(atrName, doc.allocate_string(wxString::FromCDouble(value, 13).mb_str()))); -} - -double FileHanding::GetNodeValueDouble(rapidxml::xml_node<>* parent, const char* nodeName) -{ - double dValue = 0.0; - if(parent) { - auto node = parent->first_node(nodeName); - if(node) wxString(node->value()).ToCDouble(&dValue); - } - return dValue; -} - -int FileHanding::GetNodeValueInt(rapidxml::xml_node<>* parent, const char* nodeName) -{ - long iValue = -1; - if(parent) { - auto node = parent->first_node(nodeName); - if(node) wxString(node->value()).ToCLong(&iValue); - } - return (int)iValue; -} - -int FileHanding::GetAttributeValueInt(rapidxml::xml_node<>* parent, const char* nodeName, const char* atrName) -{ - long iValue = -1; - if(parent) { - auto node = parent->first_node(nodeName); - if(node) { - auto atr = node->first_attribute(atrName); - if(atr) wxString(atr->value()).ToCLong(&iValue); - } - } - return (int)iValue; -} - -int FileHanding::GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName) -{ - long intValue; - auto atr = node->first_attribute(atrName); - if(!atr) return false; - wxString(atr->value()).ToCLong(&intValue); - return (int)intValue; -} diff --git a/Project/FileHanding.h b/Project/FileHanding.h index 83c7587..6645254 100644 --- a/Project/FileHanding.h +++ b/Project/FileHanding.h @@ -28,10 +28,7 @@ #include "ElectricCalculation.h" #include "Text.h" -#include "rapidXML/rapidxml.hpp" -// Modified: http://stackoverflow.com/questions/14113923/rapidxml-print-header-has-undefined-methods -#include "rapidXML/rapidxml_print.hpp" -#include "rapidXML/rapidxml_utils.hpp" +#include "XMLParser.h" /** * @class FileHanding @@ -63,25 +60,6 @@ public: protected: Workspace* m_workspace = NULL; ControlEditor* m_controlEditor = NULL; - - rapidxml::xml_node<>* AppendNode(rapidxml::xml_document<>& doc, - rapidxml::xml_node<>* parentNode, - const char* name, - rapidxml::node_type nodeType = rapidxml::node_element); - void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, wxString value); - void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, int value); - void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, double value); - void SetNodeAttribute(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, const char* atrName, wxString value); - void SetNodeAttribute(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, const char* atrName, int value); - void SetNodeAttribute(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, const char* atrName, double value); - double GetNodeValueDouble(rapidxml::xml_node<>* parent, const char* nodeName); - int GetNodeValueInt(rapidxml::xml_node<>* parent, const char* nodeName); - int GetAttributeValueInt(rapidxml::xml_node<>* parent, const char* nodeName, const char* atrName); - int GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName); - - void SaveControlNodes(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* nodesN, std::vector<Node*> nodeList); - ControlElement* GetControlElementFromID(std::vector<ControlElement*> elementList, int id); - bool OpenControlNodeList(rapidxml::xml_node<>* elementNode, std::vector<Node*>& nodeVector); }; #endif // FILEHANDING_H diff --git a/Project/Gain.cpp b/Project/Gain.cpp index 95107d8..2977f1f 100644 --- a/Project/Gain.cpp +++ b/Project/Gain.cpp @@ -177,7 +177,7 @@ void Gain::Move(wxPoint2DDouble position) bool Gain::Solve(double* input, double timeStep) { - if(!input){ + if(!input) { m_output = 0.0; return true; } @@ -199,3 +199,29 @@ bool Gain::UpdateText() if(!m_glText->IsTextureOK()) return false; return true; } + +rapidxml::xml_node<>* Gain::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Gain"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto value = XMLParser::AppendNode(doc, elementNode, "Value"); + XMLParser::SetNodeValue(doc, value, m_value); + + return elementNode; +} + +bool Gain::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + double value = XMLParser::GetNodeValueDouble(elementNode, "Value"); + SetValue(value); + return true; +}
\ No newline at end of file diff --git a/Project/Gain.h b/Project/Gain.h index 4d436f9..3c2e66b 100644 --- a/Project/Gain.h +++ b/Project/Gain.h @@ -50,7 +50,7 @@ class Gain : public ControlElement virtual void UpdatePoints(); /** * @brief Multiply the input by a constant - * + * * <center>\f$ output = K \cdot input \f$</center> * @param input Input value. * @param timeStep Time step. @@ -58,6 +58,9 @@ class Gain : public ControlElement */ virtual bool Solve(double* input, double timeStep); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/IOControl.cpp b/Project/IOControl.cpp index 193986e..114e8bf 100644 --- a/Project/IOControl.cpp +++ b/Project/IOControl.cpp @@ -270,3 +270,32 @@ bool IOControl::UpdateText() if(!m_glText->IsTextureOK()) return false; return true; } + +rapidxml::xml_node<>* IOControl::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "IO"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto value = XMLParser::AppendNode(doc, elementNode, "Value"); + XMLParser::SetNodeValue(doc, value, m_value); + auto ioFlags = XMLParser::AppendNode(doc, elementNode, "IOFlags"); + XMLParser::SetNodeValue(doc, ioFlags, m_ioFlags); + + return elementNode; +} + +bool IOControl::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + IOControl::IOFlags value = static_cast<IOControl::IOFlags>(XMLParser::GetNodeValueInt(elementNode, "Value")); + SetValue(value); + + return true; +} diff --git a/Project/IOControl.h b/Project/IOControl.h index a445efb..0af3429 100644 --- a/Project/IOControl.h +++ b/Project/IOControl.h @@ -65,6 +65,10 @@ class IOControl : public ControlElement virtual void SetValue(IOFlags value); virtual int GetIOFlags() const { return m_ioFlags; } virtual Node::NodeType GetType() { return m_ioNodeType; } + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/IndMotor.cpp b/Project/IndMotor.cpp index 64d40c4..e8008dd 100644 --- a/Project/IndMotor.cpp +++ b/Project/IndMotor.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "IndMotorForm.h" #include "IndMotor.h" +#include "IndMotorForm.h" IndMotor::IndMotor() : Machines() {} IndMotor::IndMotor(wxString name) : Machines() { m_electricalData.name = name; } @@ -142,3 +142,48 @@ wxString IndMotor::GetTipText() const return tipText; } + +rapidxml::xml_node<>* IndMotor::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "IndMotor"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + + // Element properties + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto activePower = XMLParser::AppendNode(doc, electricalProp, "ActivePower"); + XMLParser::SetNodeValue(doc, activePower, m_electricalData.activePower); + XMLParser::SetNodeAttribute(doc, activePower, "UnitID", m_electricalData.activePowerUnit); + auto reactivePower = XMLParser::AppendNode(doc, electricalProp, "ReactivePower"); + XMLParser::SetNodeValue(doc, reactivePower, m_electricalData.reactivePower); + XMLParser::SetNodeAttribute(doc, reactivePower, "UnitID", m_electricalData.reactivePowerUnit); + + return elementNode; +} + +bool IndMotor::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + if(!OpenCADProperties(elementNode, parentList)) return false; + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + // Element properties + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.activePower = XMLParser::GetNodeValueDouble(electricalProp, "ActivePower"); + m_electricalData.activePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ActivePower", "UnitID")); + m_electricalData.reactivePower = XMLParser::GetNodeValueDouble(electricalProp, "ReactivePower"); + m_electricalData.reactivePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID")); + + m_inserted = true; + + return true; +} diff --git a/Project/IndMotor.h b/Project/IndMotor.h index 511eb61..c210279 100644 --- a/Project/IndMotor.h +++ b/Project/IndMotor.h @@ -52,6 +52,10 @@ class IndMotor : public Machines virtual IndMotorElectricalData GetElectricalData() { return m_electricalData; } virtual IndMotorElectricalData GetPUElectricalData(double systemPowerBase); virtual void SetElectricalData(IndMotorElectricalData electricalData) { m_electricalData = electricalData; } + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + protected: IndMotorElectricalData m_electricalData; }; diff --git a/Project/Inductor.cpp b/Project/Inductor.cpp index c3fe3cd..9bfd599 100644 --- a/Project/Inductor.cpp +++ b/Project/Inductor.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "ReactiveShuntElementForm.h" #include "Inductor.h" +#include "ReactiveShuntElementForm.h" Inductor::Inductor() : Shunt() {} Inductor::Inductor(wxString name) : Shunt() { m_electricalData.name = name; } @@ -211,3 +211,44 @@ wxString Inductor::GetTipText() const return tipText; } + +rapidxml::xml_node<>* Inductor::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Inductor"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto reactivePower = XMLParser::AppendNode(doc, electricalProp, "ReactivePower"); + XMLParser::SetNodeValue(doc, reactivePower, m_electricalData.reactivePower); + XMLParser::SetNodeAttribute(doc, reactivePower, "UnitID", m_electricalData.reactivePowerUnit); + + SaveSwitchingData(doc, electricalProp); + + return elementNode; +} + +bool Inductor::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + if(!OpenCADProperties(elementNode, parentList)) return false; + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.reactivePower = XMLParser::GetNodeValueDouble(electricalProp, "ReactivePower"); + m_electricalData.reactivePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID")); + + if(!OpenSwitchingData(electricalProp)) return false; + if(m_swData.swTime.size() != 0) SetDynamicEvent(true); + + m_inserted = true; + return true; +} diff --git a/Project/Inductor.h b/Project/Inductor.h index ffd65da..0362dcf 100644 --- a/Project/Inductor.h +++ b/Project/Inductor.h @@ -54,6 +54,10 @@ class Inductor : public Shunt virtual InductorElectricalData GetElectricalData() { return m_electricalData; } virtual InductorElectricalData GetPUElectricalData(double systemPowerBase); virtual void SetElectricalData(InductorElectricalData electricalData) { m_electricalData = electricalData; } + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + protected: InductorElectricalData m_electricalData; }; diff --git a/Project/Limiter.cpp b/Project/Limiter.cpp index 2a1d076..74fbf3d 100644 --- a/Project/Limiter.cpp +++ b/Project/Limiter.cpp @@ -107,7 +107,7 @@ void Limiter::UpdatePoints() bool Limiter::Solve(double* input, double timeStep) { - if(!input){ + if(!input) { m_output = 0.0; return true; } @@ -126,3 +126,34 @@ Element* Limiter::GetCopy() *copy = *this; return copy; } + +rapidxml::xml_node<>* Limiter::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Limiter"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto upLimit = XMLParser::AppendNode(doc, elementNode, "UpperLimit"); + XMLParser::SetNodeValue(doc, upLimit, m_upLimit); + auto lowLimit = XMLParser::AppendNode(doc, elementNode, "LowerLimit"); + XMLParser::SetNodeValue(doc, lowLimit, m_lowLimit); + + return elementNode; +} + +bool Limiter::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + m_upLimit = XMLParser::GetNodeValueDouble(elementNode, "UpperLimit"); + m_lowLimit = XMLParser::GetNodeValueDouble(elementNode, "LowerLimit"); + + StartMove(m_position); + UpdatePoints(); + return true; +} diff --git a/Project/Limiter.h b/Project/Limiter.h index c351eac..5dab4c1 100644 --- a/Project/Limiter.h +++ b/Project/Limiter.h @@ -48,6 +48,10 @@ class Limiter : public ControlElement double GetLowLimit() const { return m_lowLimit; } void SetUpLimit(double upLimit) { m_upLimit = upLimit; } void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; } + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/Line.cpp b/Project/Line.cpp index eac48c2..d143355 100644 --- a/Project/Line.cpp +++ b/Project/Line.cpp @@ -20,27 +20,21 @@ Line::Line() : Branch() { for(int i = 0; i < 2; i++) { - for(int j = 0; j < 3; j++) { - m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); - } + for(int j = 0; j < 3; j++) { m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); } } } Line::Line(wxString name) : Branch() { for(int i = 0; i < 2; i++) { - for(int j = 0; j < 3; j++) { - m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); - } + for(int j = 0; j < 3; j++) { m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); } } m_electricalData.name = name; } Line::~Line() {} bool Line::Contains(wxPoint2DDouble position) const { - if(PointToLineDistance(position) < 5.0) { - return true; - } + if(PointToLineDistance(position) < 5.0) { return true; } return false; } @@ -59,9 +53,7 @@ void Line::Draw(wxPoint2DDouble translation, double scale) const std::vector<wxPoint2DDouble> pointList = m_pointList; if(!m_inserted && pointList.size() > 0) { wxPoint2DDouble secondPoint = m_position; - if(pointList.size() > 2) { - secondPoint = pointList[2]; - } + if(pointList.size() > 2) { secondPoint = pointList[2]; } pointList[1] = GetSwitchPoint(m_parentList[0], pointList[0], secondPoint); pointList.push_back(m_position); } @@ -75,9 +67,7 @@ void Line::Draw(wxPoint2DDouble translation, double scale) const // Draw nodes selection. if(pointList.size() > 0) { DrawCircle(pointList[0], 5.0 + m_borderSize / scale, 10, GL_POLYGON); - if(m_inserted) { - DrawCircle(pointList[pointList.size() - 1], 5.0 + m_borderSize / scale, 10, GL_POLYGON); - } + if(m_inserted) { DrawCircle(pointList[pointList.size() - 1], 5.0 + m_borderSize / scale, 10, GL_POLYGON); } } } @@ -95,9 +85,7 @@ void Line::Draw(wxPoint2DDouble translation, double scale) const if(pointList.size() > 0) { glColor4dv(elementColour.GetRGBA()); DrawCircle(pointList[0], 5.0, 10, GL_POLYGON); - if(m_inserted) { - DrawCircle(pointList[pointList.size() - 1], 5.0, 10, GL_POLYGON); - } + if(m_inserted) { DrawCircle(pointList[pointList.size() - 1], 5.0, 10, GL_POLYGON); } } // Draw pickboxes (Layer 3). @@ -163,8 +151,9 @@ bool Line::AddParent(Element* parent, wxPoint2DDouble position) Bus* parentBus = static_cast<Bus*>(parent); if(m_electricalData.nominalVoltage != parentBus->GetElectricalData().nominalVoltage || m_electricalData.nominalVoltageUnit != parentBus->GetElectricalData().nominalVoltageUnit) { - wxMessageDialog msgDialog(NULL, _("Unable to connect two buses with different nominal voltages.\n" - "Use a transformer or edit the bus properties."), + wxMessageDialog msgDialog(NULL, + _("Unable to connect two buses with different nominal voltages.\n" + "Use a transformer or edit the bus properties."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR); msgDialog.ShowModal(); return false; @@ -179,9 +168,7 @@ bool Line::AddParent(Element* parent, wxPoint2DDouble position) // Set first switch point. wxPoint2DDouble secondPoint = parentPt; - if(m_pointList.size() > 2) { - secondPoint = m_pointList[2]; - } + if(m_pointList.size() > 2) { secondPoint = m_pointList[2]; } m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], secondPoint); // Set the second switch point. @@ -233,9 +220,7 @@ bool Line::PickboxContains(wxPoint2DDouble position) void Line::AddPoint(wxPoint2DDouble point) { - if(m_parentList.size() != 0) { - m_pointList.push_back(point); - } + if(m_parentList.size() != 0) { m_pointList.push_back(point); } } void Line::StartMove(wxPoint2DDouble position) @@ -294,15 +279,18 @@ bool Line::GetContextMenu(wxMenu& menu) menu.Append(ID_EDIT_ELEMENT, _("Edit line")); if(m_activePickboxID == ID_PB_NONE) { wxMenuItem* addNodeItem = new wxMenuItem(&menu, ID_LINE_ADD_NODE, _("Insert node")); - addNodeItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\addNode16.png", wxPATH_WIN).GetPath())); + addNodeItem->SetBitmap( + wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\addNode16.png", wxPATH_WIN).GetPath())); menu.Append(addNodeItem); } else { wxMenuItem* addNodeItem = new wxMenuItem(&menu, ID_LINE_REMOVE_NODE, _("Remove node")); - addNodeItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\removeNode16.png", wxPATH_WIN).GetPath())); + addNodeItem->SetBitmap( + wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\removeNode16.png", wxPATH_WIN).GetPath())); menu.Append(addNodeItem); } wxMenuItem* deleteItem = new wxMenuItem(&menu, ID_DELETE, _("Delete")); - deleteItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\delete16.png", wxPATH_WIN).GetPath())); + deleteItem->SetBitmap( + wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\delete16.png", wxPATH_WIN).GetPath())); menu.Append(deleteItem); return true; } @@ -392,8 +380,9 @@ bool Line::SetNodeParent(Element* parent) m_electricalData.nominalVoltageUnit = parentBus->GetElectricalData().nominalVoltageUnit; } else if(m_electricalData.nominalVoltage != parentBus->GetElectricalData().nominalVoltage || m_electricalData.nominalVoltageUnit != parentBus->GetElectricalData().nominalVoltageUnit) { - wxMessageDialog msgDialog(NULL, _("Unable to connect two buses with different nominal voltages.\n" - "Use a transformer or edit the bus properties."), + wxMessageDialog msgDialog(NULL, + _("Unable to connect two buses with different nominal voltages.\n" + "Use a transformer or edit the bus properties."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR); msgDialog.ShowModal(); m_activeNodeID = 0; @@ -460,14 +449,10 @@ void Line::UpdatePowerFlowArrowsPosition() m_powerFlowArrow.clear(); } break; case PF_BUS1_TO_BUS2: { - for(int i = 1; i < (int)m_pointList.size() - 1; i++) { - edges.push_back(m_pointList[i]); - } + for(int i = 1; i < (int)m_pointList.size() - 1; i++) { edges.push_back(m_pointList[i]); } } break; case PF_BUS2_TO_BUS1: { - for(int i = (int)m_pointList.size() - 2; i > 0; i--) { - edges.push_back(m_pointList[i]); - } + for(int i = (int)m_pointList.size() - 2; i > 0; i--) { edges.push_back(m_pointList[i]); } } break; default: break; @@ -591,3 +576,164 @@ LineElectricalData Line::GetPUElectricalData(double systemBasePower) return data; } + +rapidxml::xml_node<>* Line::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Line"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + auto cadProp = XMLParser::AppendNode(doc, elementNode, "CADProperties"); + auto nodeList = XMLParser::AppendNode(doc, cadProp, "NodeList"); + int nodeID = 0; + // Parse all the points. + for(unsigned int i = 0; i < m_pointList.size(); i++) { + // Don't save switch points, the method UpdateSwitchesPosition() calculate these points properly after open the + // element + if((i != 1) && (i != m_pointList.size() - 2)) { + auto nodePos = XMLParser::AppendNode(doc, nodeList, "Node"); + XMLParser::SetNodeAttribute(doc, nodePos, "ID", nodeID); + auto nodePosX = XMLParser::AppendNode(doc, nodePos, "X"); + XMLParser::SetNodeValue(doc, nodePosX, m_pointList[i].m_x); + auto nodePosY = XMLParser::AppendNode(doc, nodePos, "Y"); + XMLParser::SetNodeValue(doc, nodePosY, m_pointList[i].m_y); + nodeID++; + } + } + + auto parentIDList = XMLParser::AppendNode(doc, cadProp, "ParentIDList"); + for(unsigned int i = 0; i < m_parentList.size(); i++) { + if(m_parentList[i]) { + auto parentID = XMLParser::AppendNode(doc, parentIDList, "ParentID"); + XMLParser::SetNodeAttribute(doc, parentID, "ID", static_cast<int>(i)); + XMLParser::SetNodeValue(doc, parentID, m_parentList[i]->GetID()); + } + } + + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto nominalVoltage = XMLParser::AppendNode(doc, electricalProp, "NominalVoltage"); + XMLParser::SetNodeValue(doc, nominalVoltage, m_electricalData.nominalVoltage); + XMLParser::SetNodeAttribute(doc, nominalVoltage, "UnitID", m_electricalData.nominalVoltageUnit); + auto nominalPower = XMLParser::AppendNode(doc, electricalProp, "NominalPower"); + XMLParser::SetNodeValue(doc, nominalPower, m_electricalData.nominalPower); + XMLParser::SetNodeAttribute(doc, nominalPower, "UnitID", m_electricalData.nominalPowerUnit); + auto resistance = XMLParser::AppendNode(doc, electricalProp, "Resistance"); + XMLParser::SetNodeValue(doc, resistance, m_electricalData.resistance); + XMLParser::SetNodeAttribute(doc, resistance, "UnitID", m_electricalData.resistanceUnit); + auto indReactance = XMLParser::AppendNode(doc, electricalProp, "IndReactance"); + XMLParser::SetNodeValue(doc, indReactance, m_electricalData.indReactance); + XMLParser::SetNodeAttribute(doc, indReactance, "UnitID", m_electricalData.indReactanceUnit); + auto capSusceptance = XMLParser::AppendNode(doc, electricalProp, "CapSusceptance"); + XMLParser::SetNodeValue(doc, capSusceptance, m_electricalData.capSusceptance); + XMLParser::SetNodeAttribute(doc, capSusceptance, "UnitID", m_electricalData.capSusceptanceUnit); + auto lineSize = XMLParser::AppendNode(doc, electricalProp, "LineSize"); + XMLParser::SetNodeValue(doc, lineSize, m_electricalData.lineSize); + auto useLinePower = XMLParser::AppendNode(doc, electricalProp, "UseLinePower"); + XMLParser::SetNodeValue(doc, useLinePower, m_electricalData.useLinePower); + + auto fault = XMLParser::AppendNode(doc, electricalProp, "Fault"); + auto zeroResistance = XMLParser::AppendNode(doc, fault, "ZeroResistance"); + XMLParser::SetNodeValue(doc, zeroResistance, m_electricalData.zeroResistance); + auto zeroIndReactance = XMLParser::AppendNode(doc, fault, "ZeroIndReactance"); + XMLParser::SetNodeValue(doc, zeroIndReactance, m_electricalData.zeroIndReactance); + auto zeroCapSusceptance = XMLParser::AppendNode(doc, fault, "ZeroCapSusceptance"); + XMLParser::SetNodeValue(doc, zeroCapSusceptance, m_electricalData.zeroCapSusceptance); + + SaveSwitchingData(doc, electricalProp); + + return elementNode; +} + +bool Line::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + auto cadPropNode = elementNode->first_node("CADProperties"); + if(!cadPropNode) return false; + + // Get nodes points + std::vector<wxPoint2DDouble> ptsList; + auto nodePosList = cadPropNode->first_node("NodeList"); + if(!nodePosList) return false; + auto nodePos = nodePosList->first_node("Node"); + while(nodePos) { + double nodePosX = XMLParser::GetNodeValueDouble(nodePos, "X"); + double nodePosY = XMLParser::GetNodeValueDouble(nodePos, "Y"); + ptsList.push_back(wxPoint2DDouble(nodePosX, nodePosY)); + nodePos = nodePos->next_sibling("Node"); + } + + // Get parents IDs + auto parentIDList = cadPropNode->first_node("ParentIDList"); + if(!parentIDList) return false; + auto parentNode = parentIDList->first_node("ParentID"); + long parentID[2] = {-1, -1}; + while(parentNode) { + long index = 0; + wxString(parentNode->first_attribute("ID")->value()).ToCLong(&index); + wxString(parentNode->value()).ToCLong(&parentID[index]); + parentNode = parentNode->next_sibling("ParentID"); + } + + std::vector<wxPoint2DDouble> nodePtsList; // List of node points + nodePtsList.push_back(ptsList[0]); // First point on the list + nodePtsList.push_back(ptsList[ptsList.size() - 1]); // Last point on the list + + // List of dummy buses to set not connected nodes properly + std::vector<Bus*> dummyBusList; + for(unsigned int i = 0; i < nodePtsList.size(); ++i) { + if(parentID[i] == -1) // No parent connected + { + Bus* dummyBus = new Bus(nodePtsList[i]); + dummyBusList.push_back(dummyBus); + AddParent(dummyBus, nodePtsList[i]); + } else { // Parent connected (necessarily a bus, get from bus list) + AddParent(parentList[parentID[i]], nodePtsList[i]); + } + } + + // Add the others nodes (if exists) + std::vector<wxPoint2DDouble> midPts; + for(unsigned int i = 1; i < ptsList.size() - 1; i++) midPts.push_back(ptsList[i]); + m_pointList.insert(m_pointList.begin() + 2, midPts.begin(), midPts.end()); + SetPointList(m_pointList); + + // Remove dummy buses + for(auto it = dummyBusList.begin(), itEnd = dummyBusList.end(); it != itEnd; ++it) { + RemoveParent(*it); + delete *it; + } + dummyBusList.clear(); + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.nominalVoltage = XMLParser::GetNodeValueDouble(electricalProp, "NominalVoltage"); + m_electricalData.nominalVoltageUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID")); + m_electricalData.nominalPower = XMLParser::GetNodeValueDouble(electricalProp, "NominalPower"); + m_electricalData.nominalPowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "NominalPower", "UnitID")); + m_electricalData.resistance = XMLParser::GetNodeValueDouble(electricalProp, "Resistance"); + m_electricalData.resistanceUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "Resistance", "UnitID")); + m_electricalData.indReactance = XMLParser::GetNodeValueDouble(electricalProp, "IndReactance"); + m_electricalData.indReactanceUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "IndReactance", "UnitID")); + m_electricalData.capSusceptance = XMLParser::GetNodeValueDouble(electricalProp, "CapSusceptance"); + m_electricalData.capSusceptanceUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "CapSusceptance", "UnitID")); + m_electricalData.lineSize = XMLParser::GetNodeValueDouble(electricalProp, "LineSize"); + m_electricalData.useLinePower = XMLParser::GetNodeValueInt(electricalProp, "UseLinePower"); + + auto fault = electricalProp->first_node("Fault"); + m_electricalData.zeroResistance = XMLParser::GetNodeValueDouble(fault, "ZeroResistance"); + m_electricalData.zeroIndReactance = XMLParser::GetNodeValueDouble(fault, "ZeroIndReactance"); + m_electricalData.zeroCapSusceptance = XMLParser::GetNodeValueDouble(fault, "ZeroCapSusceptance"); + + if(!OpenSwitchingData(electricalProp)) return false; + if(m_swData.swTime.size() != 0) SetDynamicEvent(true); + return true; +} diff --git a/Project/Line.h b/Project/Line.h index aa6baf2..75df0f2 100644 --- a/Project/Line.h +++ b/Project/Line.h @@ -88,6 +88,9 @@ class Line : public Branch virtual void SetElectricalData(LineElectricalData electricalData) { m_electricalData = electricalData; } virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit); virtual void SetPointList(std::vector<wxPoint2DDouble> pointList); + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); protected: void UpdatePowerFlowArrowsPosition(); diff --git a/Project/Load.cpp b/Project/Load.cpp index 7d47e5a..64c5514 100644 --- a/Project/Load.cpp +++ b/Project/Load.cpp @@ -105,9 +105,7 @@ void Load::Draw(wxPoint2DDouble translation, double scale) const DrawPowerFlowPts(); std::vector<wxPoint2DDouble> triangPts; - for(int i = 0; i < 3; i++) { - triangPts.push_back(m_triangPts[i] + m_position); - } + for(int i = 0; i < 3; i++) { triangPts.push_back(m_triangPts[i] + m_position); } glPushMatrix(); glTranslated(m_position.m_x, m_position.m_y, 0.0); glRotated(m_angle, 0.0, 0.0, 1.0); @@ -272,3 +270,92 @@ bool Load::GetPlotData(ElementPlotData& plotData) return true; } + +rapidxml::xml_node<>* Load::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Load"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto activePower = XMLParser::AppendNode(doc, electricalProp, "ActivePower"); + XMLParser::SetNodeValue(doc, activePower, m_electricalData.activePower); + XMLParser::SetNodeAttribute(doc, activePower, "UnitID", m_electricalData.activePowerUnit); + auto reactivePower = XMLParser::AppendNode(doc, electricalProp, "ReactivePower"); + XMLParser::SetNodeValue(doc, reactivePower, m_electricalData.reactivePower); + XMLParser::SetNodeAttribute(doc, reactivePower, "UnitID", m_electricalData.reactivePowerUnit); + auto loadType = XMLParser::AppendNode(doc, electricalProp, "LoadType"); + XMLParser::SetNodeValue(doc, loadType, m_electricalData.loadType); + + auto stability = XMLParser::AppendNode(doc, electricalProp, "Stability"); + auto plotLoad = XMLParser::AppendNode(doc, stability, "PlotLoad"); + XMLParser::SetNodeValue(doc, plotLoad, m_electricalData.plotLoad); + auto useCompLoad = XMLParser::AppendNode(doc, stability, "UseCompositeLoad"); + XMLParser::SetNodeValue(doc, useCompLoad, m_electricalData.useCompLoad); + auto activePowerCompl = XMLParser::AppendNode(doc, stability, "ActivePowerComposition"); + auto pzl = XMLParser::AppendNode(doc, activePowerCompl, "ConstantImpedance"); + XMLParser::SetNodeValue(doc, pzl, m_electricalData.constImpedanceActive); + auto pil = XMLParser::AppendNode(doc, activePowerCompl, "ConstantCurrent"); + XMLParser::SetNodeValue(doc, pil, m_electricalData.constCurrentActive); + auto ppl = XMLParser::AppendNode(doc, activePowerCompl, "ConstantPower"); + XMLParser::SetNodeValue(doc, ppl, m_electricalData.constPowerActive); + auto reactivePowerCompl = XMLParser::AppendNode(doc, stability, "ReactivePowerComposition"); + auto qzl = XMLParser::AppendNode(doc, reactivePowerCompl, "ConstantImpedance"); + XMLParser::SetNodeValue(doc, qzl, m_electricalData.constImpedanceReactive); + auto qil = XMLParser::AppendNode(doc, reactivePowerCompl, "ConstantCurrent"); + XMLParser::SetNodeValue(doc, qil, m_electricalData.constCurrentReactive); + auto qpl = XMLParser::AppendNode(doc, reactivePowerCompl, "ConstantPower"); + XMLParser::SetNodeValue(doc, qpl, m_electricalData.constPowerReactive); + + SaveSwitchingData(doc, electricalProp); + + return elementNode; +} + +bool Load::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + if(!OpenCADProperties(elementNode, parentList)) return false; + // The load have to insert the points that define his triangle + m_triangPts.push_back(wxPoint2DDouble(-m_width / 2.0, -m_height / 2.0)); + m_triangPts.push_back(wxPoint2DDouble(m_width / 2.0, -m_height / 2.0)); + m_triangPts.push_back(wxPoint2DDouble(0.0, m_height / 2.0)); + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.activePower = XMLParser::GetNodeValueDouble(electricalProp, "ActivePower"); + m_electricalData.activePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ActivePower", "UnitID")); + m_electricalData.reactivePower = XMLParser::GetNodeValueDouble(electricalProp, "ReactivePower"); + m_electricalData.reactivePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID")); + m_electricalData.loadType = static_cast<LoadType>(XMLParser::GetNodeValueInt(electricalProp, "LoadType")); + // Stability + auto stability = electricalProp->first_node("Stability"); + if(stability) { + m_electricalData.plotLoad = XMLParser::GetNodeValueInt(stability, "PlotLoad"); + m_electricalData.useCompLoad = XMLParser::GetNodeValueInt(stability, "UseCompositeLoad"); + auto activePowerComp = stability->first_node("ActivePowerComposition"); + m_electricalData.constImpedanceActive = XMLParser::GetNodeValueDouble(activePowerComp, "ConstantImpedance"); + m_electricalData.constCurrentActive = XMLParser::GetNodeValueDouble(activePowerComp, "ConstantCurrent"); + m_electricalData.constPowerActive = XMLParser::GetNodeValueDouble(activePowerComp, "ConstantPower"); + auto reactivePowerComp = stability->first_node("ReactivePowerComposition"); + m_electricalData.constImpedanceReactive = XMLParser::GetNodeValueDouble(reactivePowerComp, "ConstantImpedance"); + m_electricalData.constCurrentReactive = XMLParser::GetNodeValueDouble(reactivePowerComp, "ConstantCurrent"); + m_electricalData.constPowerReactive = XMLParser::GetNodeValueDouble(reactivePowerComp, "ConstantPower"); + } + + if(!OpenSwitchingData(electricalProp)) return false; + if(m_swData.swTime.size() != 0) SetDynamicEvent(true); + + m_inserted = true; + + return true; +} diff --git a/Project/Load.h b/Project/Load.h index 9d82fa3..342f377 100644 --- a/Project/Load.h +++ b/Project/Load.h @@ -89,6 +89,9 @@ class Load : public Shunt void SetElectricalData(LoadElectricalData electricalData) { m_electricalData = electricalData; } virtual bool GetPlotData(ElementPlotData& plotData); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + protected: std::vector<wxPoint2DDouble> m_triangPts; LoadElectricalData m_electricalData; diff --git a/Project/MathExpression.cpp b/Project/MathExpression.cpp index f8be598..f22b828 100644 --- a/Project/MathExpression.cpp +++ b/Project/MathExpression.cpp @@ -159,9 +159,9 @@ bool MathExpression::Solve(double* input, double timeStep) return true; } // Get the input vector from connection lines (can't use default (one) input argument) - m_inputValues[0] = input[1]; // Current time + m_inputValues[0] = input[1]; // Current time m_inputValues[1] = timeStep; - m_inputValues[2] = input[2]; // Switch status + m_inputValues[2] = input[2]; // Switch status int i = 3; for(auto itN = m_nodeList.begin(), itNEnd = m_nodeList.end(); itN != itNEnd; ++itN) { Node* node = *itN; @@ -325,8 +325,56 @@ bool MathExpression::Initialize() if(m_inputValues) delete m_inputValues; m_inputValues = new double[m_variablesVector.size() + 3]; // Custom variables + time + step + switch - + // Optimize only once to gain performance. m_fparser.Optimize(); + + m_solved = false; + m_output = 0.0; + return true; +} + +rapidxml::xml_node<>* MathExpression::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "MathExpr"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto variablesNode = XMLParser::AppendNode(doc, elementNode, "VariableList"); + for(unsigned int i = 0; i < m_variablesVector.size(); ++i) { + auto variable = XMLParser::AppendNode(doc, variablesNode, "Variable"); + XMLParser::SetNodeValue(doc, variable, m_variablesVector[i]); + } + auto mathExprValue = XMLParser::AppendNode(doc, elementNode, "MathExprValue"); + XMLParser::SetNodeValue(doc, mathExprValue, m_mathExpression); + + return elementNode; +} + +bool MathExpression::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + std::vector<wxString> variables; + auto variablesNode = elementNode->first_node("VariableList"); + auto variable = variablesNode->first_node("Variable"); + while(variable) { + variables.push_back(variable->value()); + variable = variable->next_sibling("Variable"); + } + SetVariables(variables); + + auto mathExprValueNode = elementNode->first_node("MathExprValue"); + m_mathExpression = mathExprValueNode->value(); + + // Init opened properties + StartMove(m_position); + UpdatePoints(); + return true; } diff --git a/Project/MathExpression.h b/Project/MathExpression.h index 77894ef..f10965c 100644 --- a/Project/MathExpression.h +++ b/Project/MathExpression.h @@ -58,6 +58,9 @@ class MathExpression : public ControlElement void RemoveInNode(); virtual bool UpdateText(); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/Multiplier.cpp b/Project/Multiplier.cpp index b25a406..7a9bcd8 100644 --- a/Project/Multiplier.cpp +++ b/Project/Multiplier.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "Multiplier.h" #include "ConnectionLine.h" +#include "Multiplier.h" Multiplier::Multiplier(int id) : MathOperation(id) {} Multiplier::~Multiplier() {} @@ -58,9 +58,7 @@ bool Multiplier::Solve(double* input, double timeStep) } m_output = 1.0; - for(unsigned int i = 0; i < inputVector.size(); ++i) { - m_output *= inputVector[i]; - } + for(unsigned int i = 0; i < inputVector.size(); ++i) { m_output *= inputVector[i]; } return true; } @@ -71,3 +69,24 @@ Element* Multiplier::GetCopy() *copy = *this; return copy; } + +rapidxml::xml_node<>* Multiplier::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Multiplier"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + return elementNode; +} + +bool Multiplier::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + StartMove(m_position); + UpdatePoints(); + return true; +} diff --git a/Project/Multiplier.h b/Project/Multiplier.h index 83eb37b..e0413aa 100644 --- a/Project/Multiplier.h +++ b/Project/Multiplier.h @@ -37,6 +37,10 @@ class Multiplier : public MathOperation virtual void DrawSymbol() const; virtual bool Solve(double* input, double timeStep); + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); }; diff --git a/Project/PowerElement.cpp b/Project/PowerElement.cpp index 4c4e072..326c1c8 100644 --- a/Project/PowerElement.cpp +++ b/Project/PowerElement.cpp @@ -155,9 +155,7 @@ void PowerElement::DrawPowerFlowPts() const { if(m_online) { glColor4dv(m_powerFlowArrowColour.GetRGBA()); - for(int i = 0; i < (int)m_powerFlowArrow.size(); i++) { - DrawTriangle(m_powerFlowArrow[i]); - } + for(int i = 0; i < (int)m_powerFlowArrow.size(); i++) { DrawTriangle(m_powerFlowArrow[i]); } } } @@ -181,3 +179,107 @@ double PowerElement::GetValueFromUnit(double value, ElectricalUnit valueUnit) } return value; } + +bool PowerElement::OpenCADProperties(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + auto cadPropNode = elementNode->first_node("CADProperties"); + if(!cadPropNode) return false; + + auto position = cadPropNode->first_node("Position"); + double posX = XMLParser::GetNodeValueDouble(position, "X"); + double posY = XMLParser::GetNodeValueDouble(position, "Y"); + auto size = cadPropNode->first_node("Size"); + m_width = XMLParser::GetNodeValueDouble(size, "Width"); + m_height = XMLParser::GetNodeValueDouble(size, "Height"); + double angle = XMLParser::GetNodeValueDouble(cadPropNode, "Angle"); + SetPosition(wxPoint2DDouble(posX, posY)); + + auto nodePosition = cadPropNode->first_node("NodePosition"); + double nodePosX = XMLParser::GetNodeValueDouble(nodePosition, "X"); + double nodePosY = XMLParser::GetNodeValueDouble(nodePosition, "Y"); + + int parentID = XMLParser::GetNodeValueInt(cadPropNode, "ParentID"); + // If the opened power element has no parent, set up the basics CAD properties of the element manually, otherwise + // just class method AddParent to calculate properly. + if(parentID == -1) { + m_parentList.push_back(NULL); + m_pointList.push_back(wxPoint2DDouble(nodePosX, nodePosY)); + m_pointList.push_back(wxPoint2DDouble(nodePosX, nodePosY)); + m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -m_height / 2.0 - 10.0)); + m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -m_height / 2.0)); + + wxRect2DDouble genRect(0, 0, 0, 0); + m_switchRect.push_back(genRect); // Push a general rectangle. + UpdateSwitches(); + + m_online = false; // Not connected elements are always offline. + } else { + AddParent(parentList[parentID], wxPoint2DDouble(nodePosX, nodePosY)); + } + + // Set up the points properly. + StartMove(m_position); + Move(wxPoint2DDouble(posX, posY)); + + // Set the rotation properly. + int numRot = angle / m_rotationAngle; + bool clockwise = true; + if(numRot < 0) { + numRot = std::abs(numRot); + clockwise = false; + } + for(int i = 0; i < numRot; i++) Rotate(clockwise); + + return true; +} + +void PowerElement::SaveCADProperties(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode) +{ + auto cadProp = XMLParser::AppendNode(doc, elementNode, "CADProperties"); + auto position = XMLParser::AppendNode(doc, cadProp, "Position"); + auto posX = XMLParser::AppendNode(doc, position, "X"); + XMLParser::SetNodeValue(doc, posX, m_position.m_x); + auto posY = XMLParser::AppendNode(doc, position, "Y"); + XMLParser::SetNodeValue(doc, posY, m_position.m_y); + auto size = XMLParser::AppendNode(doc, cadProp, "Size"); + auto width = XMLParser::AppendNode(doc, size, "Width"); + XMLParser::SetNodeValue(doc, width, m_width); + auto height = XMLParser::AppendNode(doc, size, "Height"); + XMLParser::SetNodeValue(doc, height, m_height); + auto angle = XMLParser::AppendNode(doc, cadProp, "Angle"); + XMLParser::SetNodeValue(doc, angle, m_angle); + auto nodePos = XMLParser::AppendNode(doc, cadProp, "NodePosition"); + auto nodePosX = XMLParser::AppendNode(doc, nodePos, "X"); + XMLParser::SetNodeValue(doc, nodePosX, m_pointList[0].m_x); + auto nodePosY = XMLParser::AppendNode(doc, nodePos, "Y"); + XMLParser::SetNodeValue(doc, nodePosY, m_pointList[0].m_y); + auto parentID = XMLParser::AppendNode(doc, cadProp, "ParentID"); + Element* parent = m_parentList[0]; + if(parent) XMLParser::SetNodeValue(doc, parentID, parent->GetID()); +} + +void PowerElement::SaveSwitchingData(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* electricalNode) +{ + auto switchingList = XMLParser::AppendNode(doc, electricalNode, "SwitchingList"); + for(int i = 0; i < static_cast<int>(m_swData.swType.size()); i++) { + auto switching = XMLParser::AppendNode(doc, switchingList, "Switching"); + XMLParser::SetNodeAttribute(doc, switching, "ID", i); + auto swType = XMLParser::AppendNode(doc, switching, "Type"); + XMLParser::SetNodeValue(doc, swType, m_swData.swType[i]); + auto swTime = XMLParser::AppendNode(doc, switching, "Time"); + XMLParser::SetNodeValue(doc, swTime, m_swData.swTime[i]); + } +} + +bool PowerElement::OpenSwitchingData(rapidxml::xml_node<>* electricalNode) +{ + auto switchingList = electricalNode->first_node("SwitchingList"); + if(!switchingList) return false; + auto swNode = switchingList->first_node("Switching"); + while(swNode) { + m_swData.swType.push_back((SwitchingType)XMLParser::GetNodeValueInt(swNode, "Type")); + m_swData.swTime.push_back(XMLParser::GetNodeValueDouble(swNode, "Time")); + swNode = swNode->next_sibling("Switching"); + } + return true; +} diff --git a/Project/PowerElement.h b/Project/PowerElement.h index 93a2357..d2b13e7 100644 --- a/Project/PowerElement.h +++ b/Project/PowerElement.h @@ -207,6 +207,12 @@ class PowerElement : public Element */ virtual void SetDynamicEvent(bool dynEvent = true) { m_dynEvent = dynEvent; } virtual double GetValueFromUnit(double value, ElectricalUnit valueUnit); + + virtual void SaveCADProperties(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode); + virtual void SaveSwitchingData(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* electricalNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) { return true; } + virtual bool OpenCADProperties(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + virtual bool OpenSwitchingData(rapidxml::xml_node<>* electricalNode); protected: SwitchingData m_swData; diff --git a/Project/Project.mk b/Project/Project.mk index c4048c2..42dab76 100644 --- a/Project/Project.mk +++ b/Project/Project.mk @@ -5,16 +5,16 @@ ## Release_Windows_x64 ProjectName :=Project ConfigurationName :=Release_Windows_x64 -WorkspacePath :=C:/Users/Thales/Documents/GitHub/PSP -ProjectPath :=C:/Users/Thales/Documents/GitHub/PSP/Project +WorkspacePath :=C:/Users/NDSE-69/Documents/GitHub/PSP +ProjectPath :=C:/Users/NDSE-69/Documents/GitHub/PSP/Project IntermediateDirectory :=./Release_Windows_x64 OutDir := $(IntermediateDirectory) CurrentFileName := CurrentFilePath := CurrentFileFullPath := -User :=Thales -Date :=31/12/2017 -CodeLitePath :="C:/Program Files (x86)/CodeLite" +User :=NDSE-69 +Date :=08/01/2018 +CodeLitePath :="C:/Program Files/CodeLite" LinkerName :=C:/TDM-GCC-64/bin/g++.exe SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC ObjectSuffix :=.o @@ -61,22 +61,21 @@ AS := C:/TDM-GCC-64/bin/as.exe ## ## User defined environment variables ## -CodeLiteDir:=C:\Program Files (x86)\CodeLite -UNIT_TEST_PP_SRC_DIR:=C:\UnitTest++-1.3 +CodeLiteDir:=C:\Program Files\CodeLite WXWIN:=C:\wxWidgets-3.1.0 WXCFG:=gcc_dll\mswu -Objects0=$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_DataReportBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix) $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IntermediateDirectory)/artProvider_ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix) $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix) $(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix) +Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) $(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_DataReportBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix) $(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix) $(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix) $(IntermediateDirectory)/XMLParser.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IntermediateDirectory)/artProvider_ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix) $(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix) $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) \ + -Objects1=$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) +Objects1=$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) @@ -108,522 +107,418 @@ PreBuild: ## ## Objects ## -$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix): ConnectionLine.cpp $(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ConnectionLine.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix): ConnectionLine.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) -MM ConnectionLine.cpp - -$(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix): ConnectionLine.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix) ConnectionLine.cpp - -$(IntermediateDirectory)/Text.cpp$(ObjectSuffix): Text.cpp $(IntermediateDirectory)/Text.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Text.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Text.cpp$(DependSuffix): Text.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Text.cpp$(DependSuffix) -MM Text.cpp +$(IntermediateDirectory)/main.cpp$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/main.cpp$(DependSuffix): main.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/main.cpp$(DependSuffix) -MM main.cpp -$(IntermediateDirectory)/Text.cpp$(PreprocessSuffix): Text.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Text.cpp$(PreprocessSuffix) Text.cpp +$(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.cpp$(PreprocessSuffix) main.cpp -$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix): IOControl.cpp $(IntermediateDirectory)/IOControl.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/IOControl.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IOControl.cpp$(DependSuffix): IOControl.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IOControl.cpp$(DependSuffix) -MM IOControl.cpp +$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix): win_resources.rc + $(RcCompilerName) -i "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/win_resources.rc" $(RcCmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(RcIncludePath) +$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix): PropertiesData.cpp $(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PropertiesData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix): PropertiesData.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix) -MM PropertiesData.cpp -$(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix): IOControl.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix) IOControl.cpp +$(IntermediateDirectory)/PropertiesData.cpp$(PreprocessSuffix): PropertiesData.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PropertiesData.cpp$(PreprocessSuffix) PropertiesData.cpp -$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix): RateLimiter.cpp $(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/RateLimiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix): RateLimiter.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) -MM RateLimiter.cpp +$(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix): OpenGLText.cpp $(IntermediateDirectory)/OpenGLText.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/OpenGLText.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/OpenGLText.cpp$(DependSuffix): OpenGLText.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/OpenGLText.cpp$(DependSuffix) -MM OpenGLText.cpp -$(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix): RateLimiter.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix) RateLimiter.cpp +$(IntermediateDirectory)/OpenGLText.cpp$(PreprocessSuffix): OpenGLText.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/OpenGLText.cpp$(PreprocessSuffix) OpenGLText.cpp -$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix): ControlSystemTest.cpp $(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ControlSystemTest.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix): ControlSystemTest.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix) -MM ControlSystemTest.cpp +$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix): BusFormBitmaps.cpp $(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/BusFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix): BusFormBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix) -MM BusFormBitmaps.cpp -$(IntermediateDirectory)/ControlSystemTest.cpp$(PreprocessSuffix): ControlSystemTest.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlSystemTest.cpp$(PreprocessSuffix) ControlSystemTest.cpp +$(IntermediateDirectory)/BusFormBitmaps.cpp$(PreprocessSuffix): BusFormBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/BusFormBitmaps.cpp$(PreprocessSuffix) BusFormBitmaps.cpp -$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix): ConstantForm.cpp $(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ConstantForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix): ConstantForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix) -MM ConstantForm.cpp +$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix): base/ChartViewBitmaps.cpp $(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/ChartViewBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(DependSuffix): base/ChartViewBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(DependSuffix) -MM base/ChartViewBitmaps.cpp -$(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix): ConstantForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix) ConstantForm.cpp +$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(PreprocessSuffix): base/ChartViewBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(PreprocessSuffix) base/ChartViewBitmaps.cpp -$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix): FileHanding.cpp $(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/FileHanding.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix): FileHanding.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) -MM FileHanding.cpp +$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix): base/ControlEditorBitmaps.cpp $(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/ControlEditorBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(DependSuffix): base/ControlEditorBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(DependSuffix) -MM base/ControlEditorBitmaps.cpp -$(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix): FileHanding.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix) FileHanding.cpp +$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(PreprocessSuffix): base/ControlEditorBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(PreprocessSuffix) base/ControlEditorBitmaps.cpp $(IntermediateDirectory)/base_DataReportBitmaps.cpp$(ObjectSuffix): base/DataReportBitmaps.cpp $(IntermediateDirectory)/base_DataReportBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/DataReportBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_DataReportBitmaps.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/DataReportBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_DataReportBitmaps.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/base_DataReportBitmaps.cpp$(DependSuffix): base/DataReportBitmaps.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_DataReportBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_DataReportBitmaps.cpp$(DependSuffix) -MM base/DataReportBitmaps.cpp $(IntermediateDirectory)/base_DataReportBitmaps.cpp$(PreprocessSuffix): base/DataReportBitmaps.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_DataReportBitmaps.cpp$(PreprocessSuffix) base/DataReportBitmaps.cpp -$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix): MainFrame.cpp $(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MainFrame.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix): MainFrame.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) -MM MainFrame.cpp +$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix): base/ElementFormBitmaps.cpp $(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/ElementFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(DependSuffix): base/ElementFormBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(DependSuffix) -MM base/ElementFormBitmaps.cpp -$(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix): MainFrame.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix) MainFrame.cpp +$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(PreprocessSuffix): base/ElementFormBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(PreprocessSuffix) base/ElementFormBitmaps.cpp -$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix): Fault.cpp $(IntermediateDirectory)/Fault.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Fault.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Fault.cpp$(DependSuffix): Fault.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Fault.cpp$(DependSuffix) -MM Fault.cpp +$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix): base/MainFrameBitmaps.cpp $(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/MainFrameBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(DependSuffix): base/MainFrameBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(DependSuffix) -MM base/MainFrameBitmaps.cpp -$(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix): Fault.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix) Fault.cpp +$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(PreprocessSuffix): base/MainFrameBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(PreprocessSuffix) base/MainFrameBitmaps.cpp -$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix): wxMathPlot/mathplot.cpp $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/wxMathPlot/mathplot.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix): wxMathPlot/mathplot.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) -MM wxMathPlot/mathplot.cpp +$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix): base/PropertiesFormBitmaps.cpp $(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/PropertiesFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(DependSuffix): base/PropertiesFormBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(DependSuffix) -MM base/PropertiesFormBitmaps.cpp -$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix): wxMathPlot/mathplot.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix) wxMathPlot/mathplot.cpp +$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(PreprocessSuffix): base/PropertiesFormBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(PreprocessSuffix) base/PropertiesFormBitmaps.cpp -$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix): LimiterForm.cpp $(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/LimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix): LimiterForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) -MM LimiterForm.cpp +$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix): base/WorkspaceBitmaps.cpp $(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/WorkspaceBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(DependSuffix): base/WorkspaceBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(DependSuffix) -MM base/WorkspaceBitmaps.cpp -$(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix): LimiterForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix) LimiterForm.cpp +$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(PreprocessSuffix): base/WorkspaceBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(PreprocessSuffix) base/WorkspaceBitmaps.cpp -$(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix): fparser/fparser.cc $(IntermediateDirectory)/fparser_fparser.cc$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/fparser/fparser.cc" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/fparser_fparser.cc$(DependSuffix): fparser/fparser.cc - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix) -MF$(IntermediateDirectory)/fparser_fparser.cc$(DependSuffix) -MM fparser/fparser.cc +$(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix): base/ChartViewBase.cpp $(IntermediateDirectory)/base_ChartViewBase.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/ChartViewBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_ChartViewBase.cpp$(DependSuffix): base/ChartViewBase.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ChartViewBase.cpp$(DependSuffix) -MM base/ChartViewBase.cpp -$(IntermediateDirectory)/fparser_fparser.cc$(PreprocessSuffix): fparser/fparser.cc - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/fparser_fparser.cc$(PreprocessSuffix) fparser/fparser.cc +$(IntermediateDirectory)/base_ChartViewBase.cpp$(PreprocessSuffix): base/ChartViewBase.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ChartViewBase.cpp$(PreprocessSuffix) base/ChartViewBase.cpp + +$(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix): base/ControlEditorBase.cpp $(IntermediateDirectory)/base_ControlEditorBase.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/ControlEditorBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_ControlEditorBase.cpp$(DependSuffix): base/ControlEditorBase.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ControlEditorBase.cpp$(DependSuffix) -MM base/ControlEditorBase.cpp + +$(IntermediateDirectory)/base_ControlEditorBase.cpp$(PreprocessSuffix): base/ControlEditorBase.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ControlEditorBase.cpp$(PreprocessSuffix) base/ControlEditorBase.cpp + +$(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix): base/DataReportBase.cpp $(IntermediateDirectory)/base_DataReportBase.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/DataReportBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_DataReportBase.cpp$(DependSuffix): base/DataReportBase.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_DataReportBase.cpp$(DependSuffix) -MM base/DataReportBase.cpp + +$(IntermediateDirectory)/base_DataReportBase.cpp$(PreprocessSuffix): base/DataReportBase.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_DataReportBase.cpp$(PreprocessSuffix) base/DataReportBase.cpp + +$(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix): base/ElementFormBase.cpp $(IntermediateDirectory)/base_ElementFormBase.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/ElementFormBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_ElementFormBase.cpp$(DependSuffix): base/ElementFormBase.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ElementFormBase.cpp$(DependSuffix) -MM base/ElementFormBase.cpp + +$(IntermediateDirectory)/base_ElementFormBase.cpp$(PreprocessSuffix): base/ElementFormBase.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ElementFormBase.cpp$(PreprocessSuffix) base/ElementFormBase.cpp + +$(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix): base/MainFrameBase.cpp $(IntermediateDirectory)/base_MainFrameBase.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/MainFrameBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_MainFrameBase.cpp$(DependSuffix): base/MainFrameBase.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_MainFrameBase.cpp$(DependSuffix) -MM base/MainFrameBase.cpp + +$(IntermediateDirectory)/base_MainFrameBase.cpp$(PreprocessSuffix): base/MainFrameBase.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_MainFrameBase.cpp$(PreprocessSuffix) base/MainFrameBase.cpp + +$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix): base/PropertiesFormBase.cpp $(IntermediateDirectory)/base_PropertiesFormBase.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/PropertiesFormBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(DependSuffix): base/PropertiesFormBase.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(DependSuffix) -MM base/PropertiesFormBase.cpp + +$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(PreprocessSuffix): base/PropertiesFormBase.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_PropertiesFormBase.cpp$(PreprocessSuffix) base/PropertiesFormBase.cpp + +$(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix): base/WorkspaceBase.cpp $(IntermediateDirectory)/base_WorkspaceBase.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/base/WorkspaceBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/base_WorkspaceBase.cpp$(DependSuffix): base/WorkspaceBase.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_WorkspaceBase.cpp$(DependSuffix) -MM base/WorkspaceBase.cpp + +$(IntermediateDirectory)/base_WorkspaceBase.cpp$(PreprocessSuffix): base/WorkspaceBase.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_WorkspaceBase.cpp$(PreprocessSuffix) base/WorkspaceBase.cpp + +$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix): ElectricCalculation.cpp $(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElectricCalculation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix): ElectricCalculation.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix) -MM ElectricCalculation.cpp + +$(IntermediateDirectory)/ElectricCalculation.cpp$(PreprocessSuffix): ElectricCalculation.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElectricCalculation.cpp$(PreprocessSuffix) ElectricCalculation.cpp $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix): PowerFlow.cpp $(IntermediateDirectory)/PowerFlow.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/PowerFlow.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PowerFlow.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/PowerFlow.cpp$(DependSuffix): PowerFlow.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PowerFlow.cpp$(DependSuffix) -MM PowerFlow.cpp $(IntermediateDirectory)/PowerFlow.cpp$(PreprocessSuffix): PowerFlow.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PowerFlow.cpp$(PreprocessSuffix) PowerFlow.cpp -$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix): TransferFunction.cpp $(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/TransferFunction.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix): TransferFunction.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) -MM TransferFunction.cpp +$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix): Fault.cpp $(IntermediateDirectory)/Fault.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Fault.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Fault.cpp$(DependSuffix): Fault.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Fault.cpp$(DependSuffix) -MM Fault.cpp -$(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix): TransferFunction.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix) TransferFunction.cpp +$(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix): Fault.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix) Fault.cpp -$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix): ElementDataObject.cpp $(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ElementDataObject.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix): ElementDataObject.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) -MM ElementDataObject.cpp +$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix): Electromechanical.cpp $(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Electromechanical.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix): Electromechanical.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix) -MM Electromechanical.cpp -$(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix): ElementDataObject.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix) ElementDataObject.cpp +$(IntermediateDirectory)/Electromechanical.cpp$(PreprocessSuffix): Electromechanical.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Electromechanical.cpp$(PreprocessSuffix) Electromechanical.cpp $(IntermediateDirectory)/Element.cpp$(ObjectSuffix): Element.cpp $(IntermediateDirectory)/Element.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Element.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Element.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Element.cpp$(DependSuffix): Element.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Element.cpp$(DependSuffix) -MM Element.cpp $(IntermediateDirectory)/Element.cpp$(PreprocessSuffix): Element.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Element.cpp$(PreprocessSuffix) Element.cpp -$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix): PropertiesData.cpp $(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/PropertiesData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix): PropertiesData.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix) -MM PropertiesData.cpp - -$(IntermediateDirectory)/PropertiesData.cpp$(PreprocessSuffix): PropertiesData.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PropertiesData.cpp$(PreprocessSuffix) PropertiesData.cpp - -$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix): base/WorkspaceBitmaps.cpp $(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/WorkspaceBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(DependSuffix): base/WorkspaceBitmaps.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(DependSuffix) -MM base/WorkspaceBitmaps.cpp - -$(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(PreprocessSuffix): base/WorkspaceBitmaps.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_WorkspaceBitmaps.cpp$(PreprocessSuffix) base/WorkspaceBitmaps.cpp - -$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix): base/ChartViewBitmaps.cpp $(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/ChartViewBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(DependSuffix): base/ChartViewBitmaps.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(DependSuffix) -MM base/ChartViewBitmaps.cpp +$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix): ElementDataObject.cpp $(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementDataObject.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix): ElementDataObject.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) -MM ElementDataObject.cpp -$(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(PreprocessSuffix): base/ChartViewBitmaps.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ChartViewBitmaps.cpp$(PreprocessSuffix) base/ChartViewBitmaps.cpp +$(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix): ElementDataObject.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix) ElementDataObject.cpp -$(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix): OpenGLText.cpp $(IntermediateDirectory)/OpenGLText.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/OpenGLText.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/OpenGLText.cpp$(DependSuffix): OpenGLText.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/OpenGLText.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/OpenGLText.cpp$(DependSuffix) -MM OpenGLText.cpp +$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix): ElementPlotData.cpp $(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementPlotData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix): ElementPlotData.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) -MM ElementPlotData.cpp -$(IntermediateDirectory)/OpenGLText.cpp$(PreprocessSuffix): OpenGLText.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/OpenGLText.cpp$(PreprocessSuffix) OpenGLText.cpp +$(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix): ElementPlotData.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix) ElementPlotData.cpp -$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix): BusFormBitmaps.cpp $(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/BusFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix): BusFormBitmaps.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix) -MM BusFormBitmaps.cpp +$(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix): MathExprParser.cpp $(IntermediateDirectory)/MathExprParser.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MathExprParser.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/MathExprParser.cpp$(DependSuffix): MathExprParser.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathExprParser.cpp$(DependSuffix) -MM MathExprParser.cpp -$(IntermediateDirectory)/BusFormBitmaps.cpp$(PreprocessSuffix): BusFormBitmaps.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/BusFormBitmaps.cpp$(PreprocessSuffix) BusFormBitmaps.cpp +$(IntermediateDirectory)/MathExprParser.cpp$(PreprocessSuffix): MathExprParser.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathExprParser.cpp$(PreprocessSuffix) MathExprParser.cpp -$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix): IndMotor.cpp $(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/IndMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix): IndMotor.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) -MM IndMotor.cpp +$(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix): fparser/fparser.cc $(IntermediateDirectory)/fparser_fparser.cc$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/fparser/fparser.cc" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/fparser_fparser.cc$(DependSuffix): fparser/fparser.cc + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/fparser_fparser.cc$(ObjectSuffix) -MF$(IntermediateDirectory)/fparser_fparser.cc$(DependSuffix) -MM fparser/fparser.cc -$(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix): IndMotor.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix) IndMotor.cpp +$(IntermediateDirectory)/fparser_fparser.cc$(PreprocessSuffix): fparser/fparser.cc + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/fparser_fparser.cc$(PreprocessSuffix) fparser/fparser.cc -$(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix): base/ControlEditorBase.cpp $(IntermediateDirectory)/base_ControlEditorBase.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/ControlEditorBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_ControlEditorBase.cpp$(DependSuffix): base/ControlEditorBase.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ControlEditorBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ControlEditorBase.cpp$(DependSuffix) -MM base/ControlEditorBase.cpp +$(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix): fparser/fpoptimizer.cc $(IntermediateDirectory)/fparser_fpoptimizer.cc$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/fparser/fpoptimizer.cc" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/fparser_fpoptimizer.cc$(DependSuffix): fparser/fpoptimizer.cc + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix) -MF$(IntermediateDirectory)/fparser_fpoptimizer.cc$(DependSuffix) -MM fparser/fpoptimizer.cc -$(IntermediateDirectory)/base_ControlEditorBase.cpp$(PreprocessSuffix): base/ControlEditorBase.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ControlEditorBase.cpp$(PreprocessSuffix) base/ControlEditorBase.cpp +$(IntermediateDirectory)/fparser_fpoptimizer.cc$(PreprocessSuffix): fparser/fpoptimizer.cc + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/fparser_fpoptimizer.cc$(PreprocessSuffix) fparser/fpoptimizer.cc -$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix): Branch.cpp $(IntermediateDirectory)/Branch.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Branch.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Branch.cpp$(DependSuffix): Branch.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Branch.cpp$(DependSuffix) -MM Branch.cpp +$(IntermediateDirectory)/XMLParser.cpp$(ObjectSuffix): XMLParser.cpp $(IntermediateDirectory)/XMLParser.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/XMLParser.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/XMLParser.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/XMLParser.cpp$(DependSuffix): XMLParser.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/XMLParser.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/XMLParser.cpp$(DependSuffix) -MM XMLParser.cpp -$(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix): Branch.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix) Branch.cpp +$(IntermediateDirectory)/XMLParser.cpp$(PreprocessSuffix): XMLParser.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/XMLParser.cpp$(PreprocessSuffix) XMLParser.cpp -$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix): win_resources.rc - $(RcCompilerName) -i "C:/Users/Thales/Documents/GitHub/PSP/Project/win_resources.rc" $(RcCmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(RcIncludePath) -$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix): ElectricCalculation.cpp $(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ElectricCalculation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix): ElectricCalculation.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix) -MM ElectricCalculation.cpp +$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix): wxMathPlot/mathplot.cpp $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/wxMathPlot/mathplot.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix): wxMathPlot/mathplot.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) -MM wxMathPlot/mathplot.cpp -$(IntermediateDirectory)/ElectricCalculation.cpp$(PreprocessSuffix): ElectricCalculation.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElectricCalculation.cpp$(PreprocessSuffix) ElectricCalculation.cpp +$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix): wxMathPlot/mathplot.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix) wxMathPlot/mathplot.cpp $(IntermediateDirectory)/artProvider_ArtMetro.cpp$(ObjectSuffix): artProvider/ArtMetro.cpp $(IntermediateDirectory)/artProvider_ArtMetro.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/artProvider/ArtMetro.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/artProvider_ArtMetro.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/artProvider/ArtMetro.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/artProvider_ArtMetro.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/artProvider_ArtMetro.cpp$(DependSuffix): artProvider/ArtMetro.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/artProvider_ArtMetro.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/artProvider_ArtMetro.cpp$(DependSuffix) -MM artProvider/ArtMetro.cpp $(IntermediateDirectory)/artProvider_ArtMetro.cpp$(PreprocessSuffix): artProvider/ArtMetro.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/artProvider_ArtMetro.cpp$(PreprocessSuffix) artProvider/ArtMetro.cpp -$(IntermediateDirectory)/main.cpp$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/main.cpp$(DependSuffix): main.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/main.cpp$(DependSuffix) -MM main.cpp - -$(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.cpp$(PreprocessSuffix) main.cpp - -$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix): ControlElementContainer.cpp $(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ControlElementContainer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix): ControlElementContainer.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) -MM ControlElementContainer.cpp - -$(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix): ControlElementContainer.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix) ControlElementContainer.cpp - $(IntermediateDirectory)/Camera.cpp$(ObjectSuffix): Camera.cpp $(IntermediateDirectory)/Camera.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Camera.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Camera.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Camera.cpp$(DependSuffix): Camera.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Camera.cpp$(DependSuffix) -MM Camera.cpp $(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix): Camera.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix) Camera.cpp -$(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix): MathExprParser.cpp $(IntermediateDirectory)/MathExprParser.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MathExprParser.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/MathExprParser.cpp$(DependSuffix): MathExprParser.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathExprParser.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathExprParser.cpp$(DependSuffix) -MM MathExprParser.cpp - -$(IntermediateDirectory)/MathExprParser.cpp$(PreprocessSuffix): MathExprParser.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathExprParser.cpp$(PreprocessSuffix) MathExprParser.cpp - -$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix): Sum.cpp $(IntermediateDirectory)/Sum.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Sum.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Sum.cpp$(DependSuffix): Sum.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Sum.cpp$(DependSuffix) -MM Sum.cpp - -$(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix): Sum.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix) Sum.cpp - -$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix): GeneratorStabForm.cpp $(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/GeneratorStabForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix): GeneratorStabForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) -MM GeneratorStabForm.cpp - -$(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix): GeneratorStabForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix) GeneratorStabForm.cpp - -$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix): base/ControlEditorBitmaps.cpp $(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/ControlEditorBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(DependSuffix): base/ControlEditorBitmaps.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(DependSuffix) -MM base/ControlEditorBitmaps.cpp - -$(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(PreprocessSuffix): base/ControlEditorBitmaps.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ControlEditorBitmaps.cpp$(PreprocessSuffix) base/ControlEditorBitmaps.cpp - -$(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix): DataReport.cpp $(IntermediateDirectory)/DataReport.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/DataReport.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/DataReport.cpp$(DependSuffix): DataReport.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/DataReport.cpp$(DependSuffix) -MM DataReport.cpp +$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix): MainFrame.cpp $(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrame.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix): MainFrame.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) -MM MainFrame.cpp -$(IntermediateDirectory)/DataReport.cpp$(PreprocessSuffix): DataReport.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/DataReport.cpp$(PreprocessSuffix) DataReport.cpp +$(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix): MainFrame.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix) MainFrame.cpp -$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix): ReactiveShuntElementForm.cpp $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ReactiveShuntElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix): ReactiveShuntElementForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) -MM ReactiveShuntElementForm.cpp +$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix): Workspace.cpp $(IntermediateDirectory)/Workspace.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Workspace.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Workspace.cpp$(DependSuffix): Workspace.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Workspace.cpp$(DependSuffix) -MM Workspace.cpp -$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix): ReactiveShuntElementForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix) ReactiveShuntElementForm.cpp +$(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix): Workspace.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix) Workspace.cpp -$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix): ControlElement.cpp $(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ControlElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix): ControlElement.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) -MM ControlElement.cpp +$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix): ChartView.cpp $(IntermediateDirectory)/ChartView.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ChartView.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ChartView.cpp$(DependSuffix): ChartView.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ChartView.cpp$(DependSuffix) -MM ChartView.cpp -$(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix): ControlElement.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix) ControlElement.cpp +$(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix): ChartView.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix) ChartView.cpp $(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix): ControlEditor.cpp $(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ControlEditor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlEditor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix): ControlEditor.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix) -MM ControlEditor.cpp $(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix): ControlEditor.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix) ControlEditor.cpp -$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix): base/ElementFormBitmaps.cpp $(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/ElementFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(DependSuffix): base/ElementFormBitmaps.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(DependSuffix) -MM base/ElementFormBitmaps.cpp - -$(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(PreprocessSuffix): base/ElementFormBitmaps.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ElementFormBitmaps.cpp$(PreprocessSuffix) base/ElementFormBitmaps.cpp - -$(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix): fparser/fpoptimizer.cc $(IntermediateDirectory)/fparser_fpoptimizer.cc$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/fparser/fpoptimizer.cc" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/fparser_fpoptimizer.cc$(DependSuffix): fparser/fpoptimizer.cc - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/fparser_fpoptimizer.cc$(ObjectSuffix) -MF$(IntermediateDirectory)/fparser_fpoptimizer.cc$(DependSuffix) -MM fparser/fpoptimizer.cc - -$(IntermediateDirectory)/fparser_fpoptimizer.cc$(PreprocessSuffix): fparser/fpoptimizer.cc - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/fparser_fpoptimizer.cc$(PreprocessSuffix) fparser/fpoptimizer.cc - -$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix): base/MainFrameBitmaps.cpp $(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/MainFrameBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(DependSuffix): base/MainFrameBitmaps.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(DependSuffix) -MM base/MainFrameBitmaps.cpp - -$(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(PreprocessSuffix): base/MainFrameBitmaps.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_MainFrameBitmaps.cpp$(PreprocessSuffix) base/MainFrameBitmaps.cpp - -$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix): GainForm.cpp $(IntermediateDirectory)/GainForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/GainForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/GainForm.cpp$(DependSuffix): GainForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GainForm.cpp$(DependSuffix) -MM GainForm.cpp +$(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix): DataReport.cpp $(IntermediateDirectory)/DataReport.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/DataReport.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/DataReport.cpp$(DependSuffix): DataReport.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/DataReport.cpp$(DependSuffix) -MM DataReport.cpp -$(IntermediateDirectory)/GainForm.cpp$(PreprocessSuffix): GainForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GainForm.cpp$(PreprocessSuffix) GainForm.cpp +$(IntermediateDirectory)/DataReport.cpp$(PreprocessSuffix): DataReport.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/DataReport.cpp$(PreprocessSuffix) DataReport.cpp -$(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix): base/ChartViewBase.cpp $(IntermediateDirectory)/base_ChartViewBase.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/ChartViewBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_ChartViewBase.cpp$(DependSuffix): base/ChartViewBase.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ChartViewBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ChartViewBase.cpp$(DependSuffix) -MM base/ChartViewBase.cpp +$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix): FileHanding.cpp $(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/FileHanding.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix): FileHanding.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) -MM FileHanding.cpp -$(IntermediateDirectory)/base_ChartViewBase.cpp$(PreprocessSuffix): base/ChartViewBase.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ChartViewBase.cpp$(PreprocessSuffix) base/ChartViewBase.cpp +$(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix): FileHanding.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix) FileHanding.cpp -$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix): base/PropertiesFormBase.cpp $(IntermediateDirectory)/base_PropertiesFormBase.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/PropertiesFormBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(DependSuffix): base/PropertiesFormBase.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(DependSuffix) -MM base/PropertiesFormBase.cpp +$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix): ConnectionLine.cpp $(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ConnectionLine.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix): ConnectionLine.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) -MM ConnectionLine.cpp -$(IntermediateDirectory)/base_PropertiesFormBase.cpp$(PreprocessSuffix): base/PropertiesFormBase.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_PropertiesFormBase.cpp$(PreprocessSuffix) base/PropertiesFormBase.cpp +$(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix): ConnectionLine.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix) ConnectionLine.cpp $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix): Constant.cpp $(IntermediateDirectory)/Constant.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Constant.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Constant.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Constant.cpp$(DependSuffix): Constant.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Constant.cpp$(DependSuffix) -MM Constant.cpp $(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix): Constant.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix) Constant.cpp -$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix): SumForm.cpp $(IntermediateDirectory)/SumForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SumForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SumForm.cpp$(DependSuffix): SumForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SumForm.cpp$(DependSuffix) -MM SumForm.cpp - -$(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix): SumForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix) SumForm.cpp - -$(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix): MathExpressionForm.cpp $(IntermediateDirectory)/MathExpressionForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MathExpressionForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/MathExpressionForm.cpp$(DependSuffix): MathExpressionForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathExpressionForm.cpp$(DependSuffix) -MM MathExpressionForm.cpp - -$(IntermediateDirectory)/MathExpressionForm.cpp$(PreprocessSuffix): MathExpressionForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathExpressionForm.cpp$(PreprocessSuffix) MathExpressionForm.cpp - -$(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix): base/ElementFormBase.cpp $(IntermediateDirectory)/base_ElementFormBase.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/ElementFormBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_ElementFormBase.cpp$(DependSuffix): base/ElementFormBase.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_ElementFormBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_ElementFormBase.cpp$(DependSuffix) -MM base/ElementFormBase.cpp - -$(IntermediateDirectory)/base_ElementFormBase.cpp$(PreprocessSuffix): base/ElementFormBase.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_ElementFormBase.cpp$(PreprocessSuffix) base/ElementFormBase.cpp - -$(IntermediateDirectory)/Line.cpp$(ObjectSuffix): Line.cpp $(IntermediateDirectory)/Line.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Line.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Line.cpp$(DependSuffix): Line.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Line.cpp$(DependSuffix) -MM Line.cpp - -$(IntermediateDirectory)/Line.cpp$(PreprocessSuffix): Line.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Line.cpp$(PreprocessSuffix) Line.cpp - -$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix): Transformer.cpp $(IntermediateDirectory)/Transformer.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Transformer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Transformer.cpp$(DependSuffix): Transformer.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Transformer.cpp$(DependSuffix) -MM Transformer.cpp - -$(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix): Transformer.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix) Transformer.cpp - -$(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix): base/MainFrameBase.cpp $(IntermediateDirectory)/base_MainFrameBase.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/MainFrameBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_MainFrameBase.cpp$(DependSuffix): base/MainFrameBase.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_MainFrameBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_MainFrameBase.cpp$(DependSuffix) -MM base/MainFrameBase.cpp - -$(IntermediateDirectory)/base_MainFrameBase.cpp$(PreprocessSuffix): base/MainFrameBase.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_MainFrameBase.cpp$(PreprocessSuffix) base/MainFrameBase.cpp - -$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix): ChartView.cpp $(IntermediateDirectory)/ChartView.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ChartView.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ChartView.cpp$(DependSuffix): ChartView.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ChartView.cpp$(DependSuffix) -MM ChartView.cpp - -$(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix): ChartView.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix) ChartView.cpp - -$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix): Bus.cpp $(IntermediateDirectory)/Bus.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Bus.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Bus.cpp$(DependSuffix): Bus.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Bus.cpp$(DependSuffix) -MM Bus.cpp - -$(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix): Bus.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix) Bus.cpp - -$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix): Electromechanical.cpp $(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Electromechanical.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix): Electromechanical.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix) -MM Electromechanical.cpp - -$(IntermediateDirectory)/Electromechanical.cpp$(PreprocessSuffix): Electromechanical.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Electromechanical.cpp$(PreprocessSuffix) Electromechanical.cpp - -$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix): IndMotorForm.cpp $(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/IndMotorForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix): IndMotorForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) -MM IndMotorForm.cpp +$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix): ControlElement.cpp $(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix): ControlElement.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) -MM ControlElement.cpp -$(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix): IndMotorForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix) IndMotorForm.cpp +$(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix): ControlElement.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix) ControlElement.cpp -$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix): ElementPlotData.cpp $(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ElementPlotData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix): ElementPlotData.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) -MM ElementPlotData.cpp +$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix): ControlElementContainer.cpp $(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElementContainer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix): ControlElementContainer.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) -MM ControlElementContainer.cpp -$(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix): ElementPlotData.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix) ElementPlotData.cpp +$(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix): ControlElementContainer.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix) ControlElementContainer.cpp $(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix): ControlElementSolver.cpp $(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ControlElementSolver.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElementSolver.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix): ControlElementSolver.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix) -MM ControlElementSolver.cpp $(IntermediateDirectory)/ControlElementSolver.cpp$(PreprocessSuffix): ControlElementSolver.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementSolver.cpp$(PreprocessSuffix) ControlElementSolver.cpp +$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix): Exponential.cpp $(IntermediateDirectory)/Exponential.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Exponential.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Exponential.cpp$(DependSuffix): Exponential.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Exponential.cpp$(DependSuffix) -MM Exponential.cpp + +$(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix): Exponential.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix) Exponential.cpp + $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix): Gain.cpp $(IntermediateDirectory)/Gain.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Gain.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Gain.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Gain.cpp$(DependSuffix): Gain.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Gain.cpp$(DependSuffix) -MM Gain.cpp $(IntermediateDirectory)/Gain.cpp$(PreprocessSuffix): Gain.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Gain.cpp$(PreprocessSuffix) Gain.cpp -$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix): SyncMachineForm.cpp $(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SyncMachineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix): SyncMachineForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) -MM SyncMachineForm.cpp - -$(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix): SyncMachineForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix) SyncMachineForm.cpp - -$(IntermediateDirectory)/Load.cpp$(ObjectSuffix): Load.cpp $(IntermediateDirectory)/Load.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Load.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Load.cpp$(DependSuffix): Load.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Load.cpp$(DependSuffix) -MM Load.cpp +$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix): IOControl.cpp $(IntermediateDirectory)/IOControl.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IOControl.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/IOControl.cpp$(DependSuffix): IOControl.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IOControl.cpp$(DependSuffix) -MM IOControl.cpp -$(IntermediateDirectory)/Load.cpp$(PreprocessSuffix): Load.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Load.cpp$(PreprocessSuffix) Load.cpp +$(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix): IOControl.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix) IOControl.cpp $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix): Limiter.cpp $(IntermediateDirectory)/Limiter.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Limiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Limiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Limiter.cpp$(DependSuffix): Limiter.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Limiter.cpp$(DependSuffix) -MM Limiter.cpp $(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix): Limiter.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix) Limiter.cpp -$(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix): base/DataReportBase.cpp $(IntermediateDirectory)/base_DataReportBase.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/DataReportBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_DataReportBase.cpp$(DependSuffix): base/DataReportBase.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_DataReportBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_DataReportBase.cpp$(DependSuffix) -MM base/DataReportBase.cpp +$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix): Multiplier.cpp $(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Multiplier.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix): Multiplier.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) -MM Multiplier.cpp -$(IntermediateDirectory)/base_DataReportBase.cpp$(PreprocessSuffix): base/DataReportBase.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_DataReportBase.cpp$(PreprocessSuffix) base/DataReportBase.cpp +$(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix): Multiplier.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix) Multiplier.cpp -$(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix): MathExpression.cpp $(IntermediateDirectory)/MathExpression.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MathExpression.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/MathExpression.cpp$(DependSuffix): MathExpression.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathExpression.cpp$(DependSuffix) -MM MathExpression.cpp +$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix): RateLimiter.cpp $(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix): RateLimiter.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) -MM RateLimiter.cpp -$(IntermediateDirectory)/MathExpression.cpp$(PreprocessSuffix): MathExpression.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathExpression.cpp$(PreprocessSuffix) MathExpression.cpp +$(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix): RateLimiter.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix) RateLimiter.cpp -$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix): PowerElement.cpp $(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/PowerElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix): PowerElement.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) -MM PowerElement.cpp +$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix): Sum.cpp $(IntermediateDirectory)/Sum.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Sum.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Sum.cpp$(DependSuffix): Sum.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Sum.cpp$(DependSuffix) -MM Sum.cpp -$(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix): PowerElement.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix) PowerElement.cpp +$(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix): Sum.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix) Sum.cpp + +$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix): TransferFunction.cpp $(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunction.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix): TransferFunction.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) -MM TransferFunction.cpp + +$(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix): TransferFunction.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix) TransferFunction.cpp $(IntermediateDirectory)/Divider.cpp$(ObjectSuffix): Divider.cpp $(IntermediateDirectory)/Divider.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Divider.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Divider.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Divider.cpp$(DependSuffix): Divider.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Divider.cpp$(DependSuffix) -MM Divider.cpp @@ -631,212 +526,324 @@ $(IntermediateDirectory)/Divider.cpp$(PreprocessSuffix): Divider.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Divider.cpp$(PreprocessSuffix) Divider.cpp $(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix): MathOperation.cpp $(IntermediateDirectory)/MathOperation.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MathOperation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MathOperation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/MathOperation.cpp$(DependSuffix): MathOperation.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathOperation.cpp$(DependSuffix) -MM MathOperation.cpp $(IntermediateDirectory)/MathOperation.cpp$(PreprocessSuffix): MathOperation.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathOperation.cpp$(PreprocessSuffix) MathOperation.cpp +$(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix): MathExpression.cpp $(IntermediateDirectory)/MathExpression.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MathExpression.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/MathExpression.cpp$(DependSuffix): MathExpression.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathExpression.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathExpression.cpp$(DependSuffix) -MM MathExpression.cpp + +$(IntermediateDirectory)/MathExpression.cpp$(PreprocessSuffix): MathExpression.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathExpression.cpp$(PreprocessSuffix) MathExpression.cpp + $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix): GraphicalElement.cpp $(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/GraphicalElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GraphicalElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix): GraphicalElement.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix) -MM GraphicalElement.cpp $(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix): GraphicalElement.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix) GraphicalElement.cpp -$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix): TransferFunctionForm.cpp $(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/TransferFunctionForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix): TransferFunctionForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) -MM TransferFunctionForm.cpp +$(IntermediateDirectory)/Text.cpp$(ObjectSuffix): Text.cpp $(IntermediateDirectory)/Text.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Text.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Text.cpp$(DependSuffix): Text.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Text.cpp$(DependSuffix) -MM Text.cpp -$(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix): TransferFunctionForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix) TransferFunctionForm.cpp +$(IntermediateDirectory)/Text.cpp$(PreprocessSuffix): Text.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Text.cpp$(PreprocessSuffix) Text.cpp + +$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix): Branch.cpp $(IntermediateDirectory)/Branch.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Branch.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Branch.cpp$(DependSuffix): Branch.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Branch.cpp$(DependSuffix) -MM Branch.cpp + +$(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix): Branch.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix) Branch.cpp + +$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix): Bus.cpp $(IntermediateDirectory)/Bus.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Bus.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Bus.cpp$(DependSuffix): Bus.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Bus.cpp$(DependSuffix) -MM Bus.cpp + +$(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix): Bus.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix) Bus.cpp + +$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix): Capacitor.cpp $(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Capacitor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix): Capacitor.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) -MM Capacitor.cpp + +$(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix): Capacitor.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix) Capacitor.cpp + +$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix): IndMotor.cpp $(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix): IndMotor.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) -MM IndMotor.cpp + +$(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix): IndMotor.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix) IndMotor.cpp $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix): Inductor.cpp $(IntermediateDirectory)/Inductor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Inductor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Inductor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Inductor.cpp$(DependSuffix): Inductor.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Inductor.cpp$(DependSuffix) -MM Inductor.cpp $(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix): Inductor.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix) Inductor.cpp +$(IntermediateDirectory)/Line.cpp$(ObjectSuffix): Line.cpp $(IntermediateDirectory)/Line.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Line.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Line.cpp$(DependSuffix): Line.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Line.cpp$(DependSuffix) -MM Line.cpp + +$(IntermediateDirectory)/Line.cpp$(PreprocessSuffix): Line.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Line.cpp$(PreprocessSuffix) Line.cpp + +$(IntermediateDirectory)/Load.cpp$(ObjectSuffix): Load.cpp $(IntermediateDirectory)/Load.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Load.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Load.cpp$(DependSuffix): Load.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Load.cpp$(DependSuffix) -MM Load.cpp + +$(IntermediateDirectory)/Load.cpp$(PreprocessSuffix): Load.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Load.cpp$(PreprocessSuffix) Load.cpp + $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix): Machines.cpp $(IntermediateDirectory)/Machines.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Machines.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Machines.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Machines.cpp$(DependSuffix): Machines.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Machines.cpp$(DependSuffix) -MM Machines.cpp $(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix): Machines.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix) Machines.cpp +$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix): PowerElement.cpp $(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PowerElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix): PowerElement.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) -MM PowerElement.cpp + +$(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix): PowerElement.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix) PowerElement.cpp + +$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix): Shunt.cpp $(IntermediateDirectory)/Shunt.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Shunt.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Shunt.cpp$(DependSuffix): Shunt.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Shunt.cpp$(DependSuffix) -MM Shunt.cpp + +$(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix): Shunt.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix) Shunt.cpp + $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix): SyncGenerator.cpp $(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SyncGenerator.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncGenerator.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix): SyncGenerator.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix) -MM SyncGenerator.cpp $(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix): SyncGenerator.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix) SyncGenerator.cpp -$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix): Capacitor.cpp $(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Capacitor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix): Capacitor.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) -MM Capacitor.cpp - -$(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix): Capacitor.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix) Capacitor.cpp - -$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix): LineForm.cpp $(IntermediateDirectory)/LineForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/LineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/LineForm.cpp$(DependSuffix): LineForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LineForm.cpp$(DependSuffix) -MM LineForm.cpp - -$(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix): LineForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix) LineForm.cpp - $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix): SyncMotor.cpp $(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SyncMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix): SyncMotor.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix) -MM SyncMotor.cpp $(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix): SyncMotor.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix) SyncMotor.cpp -$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix): Exponential.cpp $(IntermediateDirectory)/Exponential.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Exponential.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Exponential.cpp$(DependSuffix): Exponential.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Exponential.cpp$(DependSuffix) -MM Exponential.cpp - -$(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix): Exponential.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix) Exponential.cpp - -$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix): Multiplier.cpp $(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Multiplier.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix): Multiplier.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) -MM Multiplier.cpp +$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix): Transformer.cpp $(IntermediateDirectory)/Transformer.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Transformer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Transformer.cpp$(DependSuffix): Transformer.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Transformer.cpp$(DependSuffix) -MM Transformer.cpp -$(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix): Multiplier.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix) Multiplier.cpp +$(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix): Transformer.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix) Transformer.cpp $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix): GeneralPropertiesForm.cpp $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/GeneralPropertiesForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GeneralPropertiesForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(DependSuffix): GeneralPropertiesForm.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(DependSuffix) -MM GeneralPropertiesForm.cpp $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(PreprocessSuffix): GeneralPropertiesForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(PreprocessSuffix) GeneralPropertiesForm.cpp +$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix): SimulationsSettingsForm.cpp $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SimulationsSettingsForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix): SimulationsSettingsForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix) -MM SimulationsSettingsForm.cpp + +$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(PreprocessSuffix): SimulationsSettingsForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(PreprocessSuffix) SimulationsSettingsForm.cpp + +$(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix): AboutForm.cpp $(IntermediateDirectory)/AboutForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/AboutForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/AboutForm.cpp$(DependSuffix): AboutForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/AboutForm.cpp$(DependSuffix) -MM AboutForm.cpp + +$(IntermediateDirectory)/AboutForm.cpp$(PreprocessSuffix): AboutForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/AboutForm.cpp$(PreprocessSuffix) AboutForm.cpp + +$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix): ConstantForm.cpp $(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ConstantForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix): ConstantForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix) -MM ConstantForm.cpp + +$(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix): ConstantForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix) ConstantForm.cpp + +$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix): ControlSystemTest.cpp $(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlSystemTest.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix): ControlSystemTest.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix) -MM ControlSystemTest.cpp + +$(IntermediateDirectory)/ControlSystemTest.cpp$(PreprocessSuffix): ControlSystemTest.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlSystemTest.cpp$(PreprocessSuffix) ControlSystemTest.cpp + $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix): ExponentialForm.cpp $(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ExponentialForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ExponentialForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix): ExponentialForm.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix) -MM ExponentialForm.cpp $(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix): ExponentialForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix) ExponentialForm.cpp +$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix): GainForm.cpp $(IntermediateDirectory)/GainForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GainForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/GainForm.cpp$(DependSuffix): GainForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GainForm.cpp$(DependSuffix) -MM GainForm.cpp + +$(IntermediateDirectory)/GainForm.cpp$(PreprocessSuffix): GainForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GainForm.cpp$(PreprocessSuffix) GainForm.cpp + $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix): IOControlForm.cpp $(IntermediateDirectory)/IOControlForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/IOControlForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IOControlForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/IOControlForm.cpp$(DependSuffix): IOControlForm.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IOControlForm.cpp$(DependSuffix) -MM IOControlForm.cpp $(IntermediateDirectory)/IOControlForm.cpp$(PreprocessSuffix): IOControlForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IOControlForm.cpp$(PreprocessSuffix) IOControlForm.cpp +$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix): LimiterForm.cpp $(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix): LimiterForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) -MM LimiterForm.cpp + +$(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix): LimiterForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix) LimiterForm.cpp + $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix): RateLimiterForm.cpp $(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/RateLimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix): RateLimiterForm.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix) -MM RateLimiterForm.cpp $(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix): RateLimiterForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix) RateLimiterForm.cpp +$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix): SumForm.cpp $(IntermediateDirectory)/SumForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SumForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SumForm.cpp$(DependSuffix): SumForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SumForm.cpp$(DependSuffix) -MM SumForm.cpp + +$(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix): SumForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix) SumForm.cpp + +$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix): TransferFunctionForm.cpp $(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunctionForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix): TransferFunctionForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) -MM TransferFunctionForm.cpp + +$(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix): TransferFunctionForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix) TransferFunctionForm.cpp + +$(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix): MathExpressionForm.cpp $(IntermediateDirectory)/MathExpressionForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MathExpressionForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/MathExpressionForm.cpp$(DependSuffix): MathExpressionForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathExpressionForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathExpressionForm.cpp$(DependSuffix) -MM MathExpressionForm.cpp + +$(IntermediateDirectory)/MathExpressionForm.cpp$(PreprocessSuffix): MathExpressionForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathExpressionForm.cpp$(PreprocessSuffix) MathExpressionForm.cpp + $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix): TextForm.cpp $(IntermediateDirectory)/TextForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/TextForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TextForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/TextForm.cpp$(DependSuffix): TextForm.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TextForm.cpp$(DependSuffix) -MM TextForm.cpp $(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix): TextForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix) TextForm.cpp -$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix): LoadForm.cpp $(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/LoadForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix): LoadForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) -MM LoadForm.cpp - -$(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix): LoadForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix) LoadForm.cpp - $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix): BusForm.cpp $(IntermediateDirectory)/BusForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/BusForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IncludePath) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/BusForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/BusForm.cpp$(DependSuffix): BusForm.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/BusForm.cpp$(DependSuffix) -MM BusForm.cpp $(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix): BusForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix) BusForm.cpp -$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix): SwitchingForm.cpp $(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SwitchingForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix): SwitchingForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) -MM SwitchingForm.cpp +$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix): GeneratorStabForm.cpp $(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GeneratorStabForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix): GeneratorStabForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) -MM GeneratorStabForm.cpp -$(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix): SwitchingForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix) SwitchingForm.cpp +$(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix): GeneratorStabForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix) GeneratorStabForm.cpp -$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix): TransformerForm.cpp $(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/TransformerForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix): TransformerForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) -MM TransformerForm.cpp +$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix): IndMotorForm.cpp $(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotorForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix): IndMotorForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) -MM IndMotorForm.cpp -$(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix): TransformerForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix) TransformerForm.cpp +$(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix): IndMotorForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix) IndMotorForm.cpp -$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix): Workspace.cpp $(IntermediateDirectory)/Workspace.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Workspace.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Workspace.cpp$(DependSuffix): Workspace.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Workspace.cpp$(DependSuffix) -MM Workspace.cpp +$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix): LineForm.cpp $(IntermediateDirectory)/LineForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/LineForm.cpp$(DependSuffix): LineForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LineForm.cpp$(DependSuffix) -MM LineForm.cpp -$(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix): Workspace.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix) Workspace.cpp +$(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix): LineForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix) LineForm.cpp -$(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix): base/WorkspaceBase.cpp $(IntermediateDirectory)/base_WorkspaceBase.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/WorkspaceBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_WorkspaceBase.cpp$(DependSuffix): base/WorkspaceBase.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_WorkspaceBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_WorkspaceBase.cpp$(DependSuffix) -MM base/WorkspaceBase.cpp +$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix): LoadForm.cpp $(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LoadForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix): LoadForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) -MM LoadForm.cpp -$(IntermediateDirectory)/base_WorkspaceBase.cpp$(PreprocessSuffix): base/WorkspaceBase.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_WorkspaceBase.cpp$(PreprocessSuffix) base/WorkspaceBase.cpp +$(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix): LoadForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix) LoadForm.cpp -$(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix): AboutForm.cpp $(IntermediateDirectory)/AboutForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/AboutForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/AboutForm.cpp$(DependSuffix): AboutForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/AboutForm.cpp$(DependSuffix) -MM AboutForm.cpp +$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix): ReactiveShuntElementForm.cpp $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ReactiveShuntElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix): ReactiveShuntElementForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) -MM ReactiveShuntElementForm.cpp -$(IntermediateDirectory)/AboutForm.cpp$(PreprocessSuffix): AboutForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/AboutForm.cpp$(PreprocessSuffix) AboutForm.cpp +$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix): ReactiveShuntElementForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix) ReactiveShuntElementForm.cpp -$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix): Shunt.cpp $(IntermediateDirectory)/Shunt.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Shunt.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Shunt.cpp$(DependSuffix): Shunt.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Shunt.cpp$(DependSuffix) -MM Shunt.cpp +$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix): SwitchingForm.cpp $(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SwitchingForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix): SwitchingForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) -MM SwitchingForm.cpp -$(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix): Shunt.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix) Shunt.cpp +$(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix): SwitchingForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix) SwitchingForm.cpp -$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix): base/PropertiesFormBitmaps.cpp $(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/base/PropertiesFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(DependSuffix): base/PropertiesFormBitmaps.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(DependSuffix) -MM base/PropertiesFormBitmaps.cpp +$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix): SyncMachineForm.cpp $(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMachineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix): SyncMachineForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) -MM SyncMachineForm.cpp -$(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(PreprocessSuffix): base/PropertiesFormBitmaps.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/base_PropertiesFormBitmaps.cpp$(PreprocessSuffix) base/PropertiesFormBitmaps.cpp +$(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix): SyncMachineForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix) SyncMachineForm.cpp -$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix): SimulationsSettingsForm.cpp $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SimulationsSettingsForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix): SimulationsSettingsForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix) -MM SimulationsSettingsForm.cpp +$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix): TransformerForm.cpp $(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransformerForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix): TransformerForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) -MM TransformerForm.cpp -$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(PreprocessSuffix): SimulationsSettingsForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(PreprocessSuffix) SimulationsSettingsForm.cpp +$(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix): TransformerForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix) TransformerForm.cpp -include $(IntermediateDirectory)/*$(DependSuffix) diff --git a/Project/Project.project b/Project/Project.project index bbbcf04..e1e6d09 100644 --- a/Project/Project.project +++ b/Project/Project.project @@ -64,6 +64,9 @@ <File Name="fparser/fparser.cc"/> <File Name="fparser/fpoptimizer.cc"/> </VirtualDirectory> + <VirtualDirectory Name="rapidXML"> + <File Name="XMLParser.cpp"/> + </VirtualDirectory> </VirtualDirectory> <VirtualDirectory Name="view"> <VirtualDirectory Name="wxMathPlot"> @@ -137,6 +140,7 @@ <File Name="rapidXML/rapidxml_iterators.hpp"/> <File Name="rapidXML/rapidxml_print.hpp"/> <File Name="rapidXML/rapidxml_utils.hpp"/> + <File Name="XMLParser.h"/> </VirtualDirectory> <VirtualDirectory Name="element"> <File Name="Element.h"/> @@ -180,7 +184,7 @@ <File Name="Transformer.h"/> </VirtualDirectory> </VirtualDirectory> - <VirtualDirectory Name="farser"> + <VirtualDirectory Name="fparser"> <File Name="MathExprParser.h"/> <File Name="fparser/fparser.hh"/> <File Name="fparser/fpconfig.hh"/> diff --git a/Project/Project.txt b/Project/Project.txt index 0c7ae3a..84162a8 100644 --- a/Project/Project.txt +++ b/Project/Project.txt @@ -1,2 +1,2 @@ -./Release_Windows_x64/ConnectionLine.cpp.o ./Release_Windows_x64/Text.cpp.o ./Release_Windows_x64/IOControl.cpp.o ./Release_Windows_x64/RateLimiter.cpp.o ./Release_Windows_x64/ControlSystemTest.cpp.o ./Release_Windows_x64/ConstantForm.cpp.o ./Release_Windows_x64/FileHanding.cpp.o ./Release_Windows_x64/base_DataReportBitmaps.cpp.o ./Release_Windows_x64/MainFrame.cpp.o ./Release_Windows_x64/Fault.cpp.o ./Release_Windows_x64/wxMathPlot_mathplot.cpp.o ./Release_Windows_x64/LimiterForm.cpp.o ./Release_Windows_x64/fparser_fparser.cc.o ./Release_Windows_x64/PowerFlow.cpp.o ./Release_Windows_x64/TransferFunction.cpp.o ./Release_Windows_x64/ElementDataObject.cpp.o ./Release_Windows_x64/Element.cpp.o ./Release_Windows_x64/PropertiesData.cpp.o ./Release_Windows_x64/base_WorkspaceBitmaps.cpp.o ./Release_Windows_x64/base_ChartViewBitmaps.cpp.o ./Release_Windows_x64/OpenGLText.cpp.o ./Release_Windows_x64/BusFormBitmaps.cpp.o ./Release_Windows_x64/IndMotor.cpp.o ./Release_Windows_x64/base_ControlEditorBase.cpp.o ./Release_Windows_x64/Branch.cpp.o ./Release_Windows_x64/win_resources.rc.o ./Release_Windows_x64/ElectricCalculation.cpp.o ./Release_Windows_x64/artProvider_ArtMetro.cpp.o ./Release_Windows_x64/main.cpp.o ./Release_Windows_x64/ControlElementContainer.cpp.o ./Release_Windows_x64/Camera.cpp.o ./Release_Windows_x64/MathExprParser.cpp.o ./Release_Windows_x64/Sum.cpp.o ./Release_Windows_x64/GeneratorStabForm.cpp.o ./Release_Windows_x64/base_ControlEditorBitmaps.cpp.o ./Release_Windows_x64/DataReport.cpp.o ./Release_Windows_x64/ReactiveShuntElementForm.cpp.o ./Release_Windows_x64/ControlElement.cpp.o ./Release_Windows_x64/ControlEditor.cpp.o ./Release_Windows_x64/base_ElementFormBitmaps.cpp.o ./Release_Windows_x64/fparser_fpoptimizer.cc.o ./Release_Windows_x64/base_MainFrameBitmaps.cpp.o -./Release_Windows_x64/GainForm.cpp.o ./Release_Windows_x64/base_ChartViewBase.cpp.o ./Release_Windows_x64/base_PropertiesFormBase.cpp.o ./Release_Windows_x64/Constant.cpp.o ./Release_Windows_x64/SumForm.cpp.o ./Release_Windows_x64/MathExpressionForm.cpp.o ./Release_Windows_x64/base_ElementFormBase.cpp.o ./Release_Windows_x64/Line.cpp.o ./Release_Windows_x64/Transformer.cpp.o ./Release_Windows_x64/base_MainFrameBase.cpp.o ./Release_Windows_x64/ChartView.cpp.o ./Release_Windows_x64/Bus.cpp.o ./Release_Windows_x64/Electromechanical.cpp.o ./Release_Windows_x64/IndMotorForm.cpp.o ./Release_Windows_x64/ElementPlotData.cpp.o ./Release_Windows_x64/ControlElementSolver.cpp.o ./Release_Windows_x64/Gain.cpp.o ./Release_Windows_x64/SyncMachineForm.cpp.o ./Release_Windows_x64/Load.cpp.o ./Release_Windows_x64/Limiter.cpp.o ./Release_Windows_x64/base_DataReportBase.cpp.o ./Release_Windows_x64/MathExpression.cpp.o ./Release_Windows_x64/PowerElement.cpp.o ./Release_Windows_x64/Divider.cpp.o ./Release_Windows_x64/MathOperation.cpp.o ./Release_Windows_x64/GraphicalElement.cpp.o ./Release_Windows_x64/TransferFunctionForm.cpp.o ./Release_Windows_x64/Inductor.cpp.o ./Release_Windows_x64/Machines.cpp.o ./Release_Windows_x64/SyncGenerator.cpp.o ./Release_Windows_x64/Capacitor.cpp.o ./Release_Windows_x64/LineForm.cpp.o ./Release_Windows_x64/SyncMotor.cpp.o ./Release_Windows_x64/Exponential.cpp.o ./Release_Windows_x64/Multiplier.cpp.o ./Release_Windows_x64/GeneralPropertiesForm.cpp.o ./Release_Windows_x64/ExponentialForm.cpp.o ./Release_Windows_x64/IOControlForm.cpp.o ./Release_Windows_x64/RateLimiterForm.cpp.o ./Release_Windows_x64/TextForm.cpp.o ./Release_Windows_x64/LoadForm.cpp.o ./Release_Windows_x64/BusForm.cpp.o ./Release_Windows_x64/SwitchingForm.cpp.o ./Release_Windows_x64/TransformerForm.cpp.o ./Release_Windows_x64/Workspace.cpp.o ./Release_Windows_x64/base_WorkspaceBase.cpp.o ./Release_Windows_x64/AboutForm.cpp.o ./Release_Windows_x64/Shunt.cpp.o ./Release_Windows_x64/base_PropertiesFormBitmaps.cpp.o ./Release_Windows_x64/SimulationsSettingsForm.cpp.o +./Release_Windows_x64/main.cpp.o ./Release_Windows_x64/win_resources.rc.o ./Release_Windows_x64/PropertiesData.cpp.o ./Release_Windows_x64/OpenGLText.cpp.o ./Release_Windows_x64/BusFormBitmaps.cpp.o ./Release_Windows_x64/base_ChartViewBitmaps.cpp.o ./Release_Windows_x64/base_ControlEditorBitmaps.cpp.o ./Release_Windows_x64/base_DataReportBitmaps.cpp.o ./Release_Windows_x64/base_ElementFormBitmaps.cpp.o ./Release_Windows_x64/base_MainFrameBitmaps.cpp.o ./Release_Windows_x64/base_PropertiesFormBitmaps.cpp.o ./Release_Windows_x64/base_WorkspaceBitmaps.cpp.o ./Release_Windows_x64/base_ChartViewBase.cpp.o ./Release_Windows_x64/base_ControlEditorBase.cpp.o ./Release_Windows_x64/base_DataReportBase.cpp.o ./Release_Windows_x64/base_ElementFormBase.cpp.o ./Release_Windows_x64/base_MainFrameBase.cpp.o ./Release_Windows_x64/base_PropertiesFormBase.cpp.o ./Release_Windows_x64/base_WorkspaceBase.cpp.o ./Release_Windows_x64/ElectricCalculation.cpp.o ./Release_Windows_x64/PowerFlow.cpp.o ./Release_Windows_x64/Fault.cpp.o ./Release_Windows_x64/Electromechanical.cpp.o ./Release_Windows_x64/Element.cpp.o ./Release_Windows_x64/ElementDataObject.cpp.o ./Release_Windows_x64/ElementPlotData.cpp.o ./Release_Windows_x64/MathExprParser.cpp.o ./Release_Windows_x64/fparser_fparser.cc.o ./Release_Windows_x64/fparser_fpoptimizer.cc.o ./Release_Windows_x64/XMLParser.cpp.o ./Release_Windows_x64/wxMathPlot_mathplot.cpp.o ./Release_Windows_x64/artProvider_ArtMetro.cpp.o ./Release_Windows_x64/Camera.cpp.o ./Release_Windows_x64/MainFrame.cpp.o ./Release_Windows_x64/Workspace.cpp.o ./Release_Windows_x64/ChartView.cpp.o ./Release_Windows_x64/ControlEditor.cpp.o ./Release_Windows_x64/DataReport.cpp.o ./Release_Windows_x64/FileHanding.cpp.o ./Release_Windows_x64/ConnectionLine.cpp.o ./Release_Windows_x64/Constant.cpp.o ./Release_Windows_x64/ControlElement.cpp.o ./Release_Windows_x64/ControlElementContainer.cpp.o ./Release_Windows_x64/ControlElementSolver.cpp.o ./Release_Windows_x64/Exponential.cpp.o ./Release_Windows_x64/Gain.cpp.o ./Release_Windows_x64/IOControl.cpp.o ./Release_Windows_x64/Limiter.cpp.o ./Release_Windows_x64/Multiplier.cpp.o ./Release_Windows_x64/RateLimiter.cpp.o ./Release_Windows_x64/Sum.cpp.o ./Release_Windows_x64/TransferFunction.cpp.o ./Release_Windows_x64/Divider.cpp.o ./Release_Windows_x64/MathOperation.cpp.o ./Release_Windows_x64/MathExpression.cpp.o ./Release_Windows_x64/GraphicalElement.cpp.o ./Release_Windows_x64/Text.cpp.o ./Release_Windows_x64/Branch.cpp.o ./Release_Windows_x64/Bus.cpp.o ./Release_Windows_x64/Capacitor.cpp.o +./Release_Windows_x64/IndMotor.cpp.o ./Release_Windows_x64/Inductor.cpp.o ./Release_Windows_x64/Line.cpp.o ./Release_Windows_x64/Load.cpp.o ./Release_Windows_x64/Machines.cpp.o ./Release_Windows_x64/PowerElement.cpp.o ./Release_Windows_x64/Shunt.cpp.o ./Release_Windows_x64/SyncGenerator.cpp.o ./Release_Windows_x64/SyncMotor.cpp.o ./Release_Windows_x64/Transformer.cpp.o ./Release_Windows_x64/GeneralPropertiesForm.cpp.o ./Release_Windows_x64/SimulationsSettingsForm.cpp.o ./Release_Windows_x64/AboutForm.cpp.o ./Release_Windows_x64/ConstantForm.cpp.o ./Release_Windows_x64/ControlSystemTest.cpp.o ./Release_Windows_x64/ExponentialForm.cpp.o ./Release_Windows_x64/GainForm.cpp.o ./Release_Windows_x64/IOControlForm.cpp.o ./Release_Windows_x64/LimiterForm.cpp.o ./Release_Windows_x64/RateLimiterForm.cpp.o ./Release_Windows_x64/SumForm.cpp.o ./Release_Windows_x64/TransferFunctionForm.cpp.o ./Release_Windows_x64/MathExpressionForm.cpp.o ./Release_Windows_x64/TextForm.cpp.o ./Release_Windows_x64/BusForm.cpp.o ./Release_Windows_x64/GeneratorStabForm.cpp.o ./Release_Windows_x64/IndMotorForm.cpp.o ./Release_Windows_x64/LineForm.cpp.o ./Release_Windows_x64/LoadForm.cpp.o ./Release_Windows_x64/ReactiveShuntElementForm.cpp.o ./Release_Windows_x64/SwitchingForm.cpp.o ./Release_Windows_x64/SyncMachineForm.cpp.o ./Release_Windows_x64/TransformerForm.cpp.o diff --git a/Project/RateLimiter.cpp b/Project/RateLimiter.cpp index c8da81d..dedd910 100644 --- a/Project/RateLimiter.cpp +++ b/Project/RateLimiter.cpp @@ -140,3 +140,34 @@ Element* RateLimiter::GetCopy() *copy = *this; return copy; } + +rapidxml::xml_node<>* RateLimiter::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "RateLimiter"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto upLimit = XMLParser::AppendNode(doc, elementNode, "UpperLimit"); + XMLParser::SetNodeValue(doc, upLimit, m_upLimit); + auto lowLimit = XMLParser::AppendNode(doc, elementNode, "LowerLimit"); + XMLParser::SetNodeValue(doc, lowLimit, m_lowLimit); + + return elementNode; +} + +bool RateLimiter::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + m_upLimit = XMLParser::GetNodeValueDouble(elementNode, "UpperLimit"); + m_lowLimit = XMLParser::GetNodeValueDouble(elementNode, "LowerLimit"); + + StartMove(m_position); + UpdatePoints(); + return true; +} diff --git a/Project/RateLimiter.h b/Project/RateLimiter.h index 91e0b9f..3247857 100644 --- a/Project/RateLimiter.h +++ b/Project/RateLimiter.h @@ -65,6 +65,9 @@ class RateLimiter : public ControlElement */ virtual bool Solve(double* input, double timeStep); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/Sum.cpp b/Project/Sum.cpp index 52fe66a..9908497 100644 --- a/Project/Sum.cpp +++ b/Project/Sum.cpp @@ -15,9 +15,9 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +#include "ConnectionLine.h" #include "Sum.h" #include "SumForm.h" -#include "ConnectionLine.h" Sum::Sum(int id) : ControlElement(id) { @@ -245,3 +245,42 @@ Element* Sum::GetCopy() *copy = *this; return copy; } + +rapidxml::xml_node<>* Sum::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Sum"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto signsNode = XMLParser::AppendNode(doc, elementNode, "Signs"); + for(unsigned int i = 0; i < m_signalList.size(); ++i) { + auto value = XMLParser::AppendNode(doc, signsNode, "Value"); + XMLParser::SetNodeValue(doc, value, static_cast<int>(m_signalList[i])); + } + + return elementNode; +} + +bool Sum::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + m_signalList.clear(); + auto signsNode = elementNode->first_node("Signs"); + auto sign = signsNode->first_node("Value"); + while(sign) { + long value; + wxString(sign->value()).ToCLong(&value); + m_signalList.push_back(static_cast<Sum::Signal>(value)); + sign = sign->next_sibling("Value"); + } + + StartMove(m_position); + UpdatePoints(); + + return true; +} diff --git a/Project/Sum.h b/Project/Sum.h index 3e4d288..d26e108 100644 --- a/Project/Sum.h +++ b/Project/Sum.h @@ -51,6 +51,9 @@ class Sum : public ControlElement void AddInNode(); void RemoveInNode(); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + virtual Element* GetCopy(); protected: diff --git a/Project/SyncGenerator.cpp b/Project/SyncGenerator.cpp index 74806b6..17463e2 100644 --- a/Project/SyncGenerator.cpp +++ b/Project/SyncGenerator.cpp @@ -15,9 +15,9 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "SyncMachineForm.h" -#include "SyncGenerator.h" #include "ControlElementContainer.h" +#include "SyncGenerator.h" +#include "SyncMachineForm.h" SyncGenerator::SyncGenerator() : Machines() { Init(); } SyncGenerator::SyncGenerator(wxString name) : Machines() @@ -48,9 +48,7 @@ void SyncGenerator::DrawSymbol() const { // Draw sine. std::vector<wxPoint2DDouble> sinePts; - for(int i = 0; i < (int)m_sinePts.size(); i++) { - sinePts.push_back(m_sinePts[i] + m_position); - } + for(int i = 0; i < (int)m_sinePts.size(); i++) { sinePts.push_back(m_sinePts[i] + m_position); } DrawLine(sinePts); } bool SyncGenerator::GetContextMenu(wxMenu& menu) @@ -77,9 +75,7 @@ SyncGeneratorElectricalData SyncGenerator::GetPUElectricalData(double systemPowe { SyncGeneratorElectricalData data = m_electricalData; double machineBasePower = 1.0; - if(data.useMachineBase) { - machineBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit); - } + if(data.useMachineBase) { machineBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit); } // Active power double activePower = GetValueFromUnit(data.activePower, data.activePowerUnit); @@ -248,3 +244,172 @@ bool SyncGenerator::GetPlotData(ElementPlotData& plotData) plotData.AddData(m_electricalData.deltaVector, _("Delta")); return true; } + +rapidxml::xml_node<>* SyncGenerator::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "SyncGenerator"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto nominalPower = XMLParser::AppendNode(doc, electricalProp, "NominalPower"); + XMLParser::SetNodeValue(doc, nominalPower, m_electricalData.nominalPower); + XMLParser::SetNodeAttribute(doc, nominalPower, "UnitID", m_electricalData.nominalPowerUnit); + auto nominalVoltage = XMLParser::AppendNode(doc, electricalProp, "NominalVoltage"); + XMLParser::SetNodeValue(doc, nominalVoltage, m_electricalData.nominalVoltage); + XMLParser::SetNodeAttribute(doc, nominalVoltage, "UnitID", m_electricalData.nominalVoltageUnit); + auto activePower = XMLParser::AppendNode(doc, electricalProp, "ActivePower"); + XMLParser::SetNodeValue(doc, activePower, m_electricalData.activePower); + XMLParser::SetNodeAttribute(doc, activePower, "UnitID", m_electricalData.activePowerUnit); + auto reactivePower = XMLParser::AppendNode(doc, electricalProp, "ReactivePower"); + XMLParser::SetNodeValue(doc, reactivePower, m_electricalData.reactivePower); + XMLParser::SetNodeAttribute(doc, reactivePower, "UnitID", m_electricalData.reactivePowerUnit); + auto haveMaxReactive = XMLParser::AppendNode(doc, electricalProp, "HaveMaxReactive"); + XMLParser::SetNodeValue(doc, haveMaxReactive, m_electricalData.haveMaxReactive); + auto maxReactive = XMLParser::AppendNode(doc, electricalProp, "MaxReactive"); + XMLParser::SetNodeValue(doc, maxReactive, m_electricalData.maxReactive); + XMLParser::SetNodeAttribute(doc, maxReactive, "UnitID", m_electricalData.maxReactiveUnit); + auto haveMinReactive = XMLParser::AppendNode(doc, electricalProp, "HaveMinReactive"); + XMLParser::SetNodeValue(doc, haveMinReactive, m_electricalData.haveMinReactive); + auto minReactive = XMLParser::AppendNode(doc, electricalProp, "MinReactive"); + XMLParser::SetNodeValue(doc, minReactive, m_electricalData.minReactive); + XMLParser::SetNodeAttribute(doc, minReactive, "UnitID", m_electricalData.minReactiveUnit); + auto useMachineBase = XMLParser::AppendNode(doc, electricalProp, "UseMachineBase"); + XMLParser::SetNodeValue(doc, useMachineBase, m_electricalData.useMachineBase); + + auto fault = XMLParser::AppendNode(doc, electricalProp, "Fault"); + auto positiveResistance = XMLParser::AppendNode(doc, fault, "PositiveResistance"); + XMLParser::SetNodeValue(doc, positiveResistance, m_electricalData.positiveResistance); + auto positiveReactance = XMLParser::AppendNode(doc, fault, "PositiveReactance"); + XMLParser::SetNodeValue(doc, positiveReactance, m_electricalData.positiveReactance); + auto negativeResistance = XMLParser::AppendNode(doc, fault, "NegativeResistance"); + XMLParser::SetNodeValue(doc, negativeResistance, m_electricalData.negativeResistance); + auto negativeReactance = XMLParser::AppendNode(doc, fault, "NegativeReactance"); + XMLParser::SetNodeValue(doc, negativeReactance, m_electricalData.negativeReactance); + auto zeroResistance = XMLParser::AppendNode(doc, fault, "ZeroResistance"); + XMLParser::SetNodeValue(doc, zeroResistance, m_electricalData.zeroResistance); + auto zeroReactance = XMLParser::AppendNode(doc, fault, "ZeroReactance"); + XMLParser::SetNodeValue(doc, zeroReactance, m_electricalData.zeroReactance); + auto groundResistance = XMLParser::AppendNode(doc, fault, "GroundResistance"); + XMLParser::SetNodeValue(doc, groundResistance, m_electricalData.groundResistance); + auto groundReactance = XMLParser::AppendNode(doc, fault, "GroundReactance"); + XMLParser::SetNodeValue(doc, groundReactance, m_electricalData.groundReactance); + auto groundNeutral = XMLParser::AppendNode(doc, fault, "GroundNeutral"); + XMLParser::SetNodeValue(doc, groundNeutral, m_electricalData.groundNeutral); + + auto stability = XMLParser::AppendNode(doc, electricalProp, "Stability"); + auto plotSyncMachine = XMLParser::AppendNode(doc, stability, "PlotSyncMachine"); + XMLParser::SetNodeValue(doc, plotSyncMachine, m_electricalData.plotSyncMachine); + auto inertia = XMLParser::AppendNode(doc, stability, "Inertia"); + XMLParser::SetNodeValue(doc, inertia, m_electricalData.inertia); + auto damping = XMLParser::AppendNode(doc, stability, "Damping"); + XMLParser::SetNodeValue(doc, damping, m_electricalData.damping); + auto useAVR = XMLParser::AppendNode(doc, stability, "UseAVR"); + XMLParser::SetNodeValue(doc, useAVR, m_electricalData.useAVR); + auto useSpeedGovernor = XMLParser::AppendNode(doc, stability, "UseSpeedGovernor"); + XMLParser::SetNodeValue(doc, useSpeedGovernor, m_electricalData.useSpeedGovernor); + auto armResistance = XMLParser::AppendNode(doc, stability, "ArmResistance"); + XMLParser::SetNodeValue(doc, armResistance, m_electricalData.armResistance); + auto potierReactance = XMLParser::AppendNode(doc, stability, "PotierReactance"); + XMLParser::SetNodeValue(doc, potierReactance, m_electricalData.potierReactance); + auto satFactor = XMLParser::AppendNode(doc, stability, "SatFactor"); + XMLParser::SetNodeValue(doc, satFactor, m_electricalData.satFactor); + auto syncXd = XMLParser::AppendNode(doc, stability, "SyncXd"); + XMLParser::SetNodeValue(doc, syncXd, m_electricalData.syncXd); + auto syncXq = XMLParser::AppendNode(doc, stability, "SyncXq"); + XMLParser::SetNodeValue(doc, syncXq, m_electricalData.syncXq); + auto transXd = XMLParser::AppendNode(doc, stability, "TransXd"); + XMLParser::SetNodeValue(doc, transXd, m_electricalData.transXd); + auto transXq = XMLParser::AppendNode(doc, stability, "TransXq"); + XMLParser::SetNodeValue(doc, transXq, m_electricalData.transXq); + auto transTd0 = XMLParser::AppendNode(doc, stability, "TransTd0"); + XMLParser::SetNodeValue(doc, transTd0, m_electricalData.transTd0); + auto transTq0 = XMLParser::AppendNode(doc, stability, "TransTq0"); + XMLParser::SetNodeValue(doc, transTq0, m_electricalData.transTq0); + auto subXd = XMLParser::AppendNode(doc, stability, "SubXd"); + XMLParser::SetNodeValue(doc, subXd, m_electricalData.subXd); + auto subXq = XMLParser::AppendNode(doc, stability, "SubXq"); + XMLParser::SetNodeValue(doc, subXq, m_electricalData.subXq); + auto subTd0 = XMLParser::AppendNode(doc, stability, "SubTd0"); + XMLParser::SetNodeValue(doc, subTd0, m_electricalData.subTd0); + auto subTq0 = XMLParser::AppendNode(doc, stability, "SubTq0"); + XMLParser::SetNodeValue(doc, subTq0, m_electricalData.subTq0); + + SaveSwitchingData(doc, electricalProp); + return elementNode; +} + +bool SyncGenerator::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + if(!OpenCADProperties(elementNode, parentList)) return false; + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.nominalPower = XMLParser::GetNodeValueDouble(electricalProp, "NominalPower"); + m_electricalData.nominalPowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "NominalPower", "UnitID")); + m_electricalData.nominalVoltage = XMLParser::GetNodeValueDouble(electricalProp, "NominalVoltage"); + m_electricalData.nominalVoltageUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID")); + m_electricalData.activePower = XMLParser::GetNodeValueDouble(electricalProp, "ActivePower"); + m_electricalData.activePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ActivePower", "UnitID")); + m_electricalData.reactivePower = XMLParser::GetNodeValueDouble(electricalProp, "ReactivePower"); + m_electricalData.reactivePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID")); + m_electricalData.haveMaxReactive = XMLParser::GetNodeValueInt(electricalProp, "HaveMaxReactive"); + m_electricalData.maxReactive = XMLParser::GetNodeValueDouble(electricalProp, "MaxReactive"); + m_electricalData.maxReactiveUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "MaxReactive", "UnitID")); + m_electricalData.haveMinReactive = XMLParser::GetNodeValueInt(electricalProp, "HaveMinReactive"); + m_electricalData.minReactive = XMLParser::GetNodeValueDouble(electricalProp, "MinReactive"); + m_electricalData.minReactiveUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "MinReactive", "UnitID")); + m_electricalData.useMachineBase = XMLParser::GetNodeValueInt(electricalProp, "UseMachineBase"); + + auto fault = electricalProp->first_node("Fault"); + if(!fault) return false; + m_electricalData.positiveResistance = XMLParser::GetNodeValueDouble(fault, "PositiveResistance"); + m_electricalData.positiveReactance = XMLParser::GetNodeValueDouble(fault, "PositiveReactance"); + m_electricalData.negativeResistance = XMLParser::GetNodeValueDouble(fault, "NegativeResistance"); + m_electricalData.negativeReactance = XMLParser::GetNodeValueDouble(fault, "NegativeReactance"); + m_electricalData.zeroResistance = XMLParser::GetNodeValueDouble(fault, "ZeroResistance"); + m_electricalData.zeroReactance = XMLParser::GetNodeValueDouble(fault, "ZeroReactance"); + m_electricalData.groundResistance = XMLParser::GetNodeValueDouble(fault, "GroundResistance"); + m_electricalData.groundReactance = XMLParser::GetNodeValueDouble(fault, "GroundReactance"); + m_electricalData.groundNeutral = XMLParser::GetNodeValueInt(fault, "GroundNeutral"); + + auto stability = electricalProp->first_node("Stability"); + if(!stability) return false; + m_electricalData.plotSyncMachine = XMLParser::GetNodeValueInt(stability, "PlotSyncMachine"); + m_electricalData.inertia = XMLParser::GetNodeValueDouble(stability, "Inertia"); + m_electricalData.damping = XMLParser::GetNodeValueDouble(stability, "Damping"); + m_electricalData.useAVR = XMLParser::GetNodeValueInt(stability, "UseAVR"); + m_electricalData.useSpeedGovernor = XMLParser::GetNodeValueInt(stability, "UseSpeedGovernor"); + m_electricalData.armResistance = XMLParser::GetNodeValueDouble(stability, "ArmResistance"); + m_electricalData.potierReactance = XMLParser::GetNodeValueDouble(stability, "PotierReactance"); + m_electricalData.satFactor = XMLParser::GetNodeValueDouble(stability, "SatFactor"); + m_electricalData.syncXd = XMLParser::GetNodeValueDouble(stability, "SyncXd"); + m_electricalData.syncXq = XMLParser::GetNodeValueDouble(stability, "SyncXq"); + m_electricalData.transXd = XMLParser::GetNodeValueDouble(stability, "TransXd"); + m_electricalData.transXq = XMLParser::GetNodeValueDouble(stability, "TransXq"); + m_electricalData.transTd0 = XMLParser::GetNodeValueDouble(stability, "TransTd0"); + m_electricalData.transTq0 = XMLParser::GetNodeValueDouble(stability, "TransTq0"); + m_electricalData.subXd = XMLParser::GetNodeValueDouble(stability, "SubXd"); + m_electricalData.subXq = XMLParser::GetNodeValueDouble(stability, "SubXq"); + m_electricalData.subTd0 = XMLParser::GetNodeValueDouble(stability, "SubTd0"); + m_electricalData.subTq0 = XMLParser::GetNodeValueDouble(stability, "SubTq0"); + + if(!OpenSwitchingData(electricalProp)) return false; + if(m_swData.swTime.size() != 0) SetDynamicEvent(true); + + m_inserted = true; + return true; +} diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h index cb1b146..4866f8b 100644 --- a/Project/SyncGenerator.h +++ b/Project/SyncGenerator.h @@ -156,6 +156,9 @@ class SyncGenerator : public Machines virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit); virtual bool GetPlotData(ElementPlotData& plotData); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + protected: std::vector<wxPoint2DDouble> m_sinePts; diff --git a/Project/SyncMotor.cpp b/Project/SyncMotor.cpp index 1a5b20d..8283a25 100644 --- a/Project/SyncMotor.cpp +++ b/Project/SyncMotor.cpp @@ -47,9 +47,7 @@ SyncMotorElectricalData SyncMotor::GetPUElectricalData(double systemPowerBase) { SyncMotorElectricalData data = m_electricalData; double machineBasePower = 1.0; - if(data.useMachineBase) { - machineBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit); - } + if(data.useMachineBase) { machineBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit); } // Active power double activePower = GetValueFromUnit(data.activePower, data.activePowerUnit); @@ -174,3 +172,105 @@ wxString SyncMotor::GetTipText() const return tipText; } + +rapidxml::xml_node<>* SyncMotor::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "SyncMotor"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto nominalPower = XMLParser::AppendNode(doc, electricalProp, "NominalPower"); + XMLParser::SetNodeValue(doc, nominalPower, m_electricalData.nominalPower); + XMLParser::SetNodeAttribute(doc, nominalPower, "UnitID", m_electricalData.nominalPowerUnit); + auto activePower = XMLParser::AppendNode(doc, electricalProp, "ActivePower"); + XMLParser::SetNodeValue(doc, activePower, m_electricalData.activePower); + XMLParser::SetNodeAttribute(doc, activePower, "UnitID", m_electricalData.activePowerUnit); + auto reactivePower = XMLParser::AppendNode(doc, electricalProp, "ReactivePower"); + XMLParser::SetNodeValue(doc, reactivePower, m_electricalData.reactivePower); + XMLParser::SetNodeAttribute(doc, reactivePower, "UnitID", m_electricalData.reactivePowerUnit); + auto haveMaxReactive = XMLParser::AppendNode(doc, electricalProp, "HaveMaxReactive"); + XMLParser::SetNodeValue(doc, haveMaxReactive, m_electricalData.haveMaxReactive); + auto maxReactive = XMLParser::AppendNode(doc, electricalProp, "MaxReactive"); + XMLParser::SetNodeValue(doc, maxReactive, m_electricalData.maxReactive); + XMLParser::SetNodeAttribute(doc, maxReactive, "UnitID", m_electricalData.maxReactiveUnit); + auto haveMinReactive = XMLParser::AppendNode(doc, electricalProp, "HaveMinReactive"); + XMLParser::SetNodeValue(doc, haveMinReactive, m_electricalData.haveMinReactive); + auto minReactive = XMLParser::AppendNode(doc, electricalProp, "MinReactive"); + XMLParser::SetNodeValue(doc, minReactive, m_electricalData.minReactive); + XMLParser::SetNodeAttribute(doc, minReactive, "UnitID", m_electricalData.minReactiveUnit); + auto useMachineBase = XMLParser::AppendNode(doc, electricalProp, "UseMachineBase"); + XMLParser::SetNodeValue(doc, useMachineBase, m_electricalData.useMachineBase); + + auto fault = XMLParser::AppendNode(doc, electricalProp, "Fault"); + auto positiveResistance = XMLParser::AppendNode(doc, fault, "PositiveResistance"); + XMLParser::SetNodeValue(doc, positiveResistance, m_electricalData.positiveResistance); + auto positiveReactance = XMLParser::AppendNode(doc, fault, "PositiveReactance"); + XMLParser::SetNodeValue(doc, positiveReactance, m_electricalData.positiveReactance); + auto negativeResistance = XMLParser::AppendNode(doc, fault, "NegativeResistance"); + XMLParser::SetNodeValue(doc, negativeResistance, m_electricalData.negativeResistance); + auto negativeReactance = XMLParser::AppendNode(doc, fault, "NegativeReactance"); + XMLParser::SetNodeValue(doc, negativeReactance, m_electricalData.negativeReactance); + auto zeroResistance = XMLParser::AppendNode(doc, fault, "ZeroResistance"); + XMLParser::SetNodeValue(doc, zeroResistance, m_electricalData.zeroResistance); + auto zeroReactance = XMLParser::AppendNode(doc, fault, "ZeroReactance"); + XMLParser::SetNodeValue(doc, zeroReactance, m_electricalData.zeroReactance); + auto groundResistance = XMLParser::AppendNode(doc, fault, "GroundResistance"); + XMLParser::SetNodeValue(doc, groundResistance, m_electricalData.groundResistance); + auto groundReactance = XMLParser::AppendNode(doc, fault, "GroundReactance"); + XMLParser::SetNodeValue(doc, groundReactance, m_electricalData.groundReactance); + auto groundNeutral = XMLParser::AppendNode(doc, fault, "GroundNeutral"); + XMLParser::SetNodeValue(doc, groundNeutral, m_electricalData.groundNeutral); + + return elementNode; +} + +bool SyncMotor::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + if(!OpenCADProperties(elementNode, parentList)) return false; + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.nominalPower = XMLParser::GetNodeValueDouble(electricalProp, "NominalPower"); + m_electricalData.nominalPowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "NominalPower", "UnitID")); + m_electricalData.activePower = XMLParser::GetNodeValueDouble(electricalProp, "ActivePower"); + m_electricalData.activePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ActivePower", "UnitID")); + m_electricalData.reactivePower = XMLParser::GetNodeValueDouble(electricalProp, "ReactivePower"); + m_electricalData.reactivePowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID")); + m_electricalData.haveMaxReactive = XMLParser::GetNodeValueInt(electricalProp, "HaveMaxReactive"); + m_electricalData.maxReactive = XMLParser::GetNodeValueDouble(electricalProp, "MaxReactive"); + m_electricalData.maxReactiveUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "MaxReactive", "UnitID")); + m_electricalData.haveMinReactive = XMLParser::GetNodeValueInt(electricalProp, "HaveMinReactive"); + m_electricalData.minReactive = XMLParser::GetNodeValueDouble(electricalProp, "MinReactive"); + m_electricalData.minReactiveUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "MinReactive", "UnitID")); + m_electricalData.useMachineBase = XMLParser::GetNodeValueInt(electricalProp, "UseMachineBase"); + + auto fault = electricalProp->first_node("Fault"); + if(!fault) return false; + m_electricalData.positiveResistance = XMLParser::GetNodeValueDouble(fault, "PositiveResistance"); + m_electricalData.positiveReactance = XMLParser::GetNodeValueDouble(fault, "PositiveReactance"); + m_electricalData.negativeResistance = XMLParser::GetNodeValueDouble(fault, "NegativeResistance"); + m_electricalData.negativeReactance = XMLParser::GetNodeValueDouble(fault, "NegativeReactance"); + m_electricalData.zeroResistance = XMLParser::GetNodeValueDouble(fault, "ZeroResistance"); + m_electricalData.zeroReactance = XMLParser::GetNodeValueDouble(fault, "ZeroReactance"); + m_electricalData.groundResistance = XMLParser::GetNodeValueDouble(fault, "GroundResistance"); + m_electricalData.groundReactance = XMLParser::GetNodeValueDouble(fault, "GroundReactance"); + m_electricalData.groundNeutral = XMLParser::GetNodeValueInt(fault, "GroundNeutral"); + + m_inserted = true; + + return true; +} diff --git a/Project/SyncMotor.h b/Project/SyncMotor.h index 4950922..772ef7b 100644 --- a/Project/SyncMotor.h +++ b/Project/SyncMotor.h @@ -148,6 +148,9 @@ class SyncMotor : public Machines virtual void SetElectricalData(SyncMotorElectricalData electricalData) { m_electricalData = electricalData; } virtual bool ShowForm(wxWindow* parent, Element* element); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + protected: SyncMotorElectricalData m_electricalData; }; diff --git a/Project/Text.cpp b/Project/Text.cpp index fd1d986..0697ac5 100644 --- a/Project/Text.cpp +++ b/Project/Text.cpp @@ -15,22 +15,22 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "TextForm.h" #include "Text.h" +#include "TextForm.h" #ifdef USING_WX_3_0_X #include "DegreesAndRadians.h" #endif -#include "ElectricCalculation.h" #include "Bus.h" +#include "Capacitor.h" +#include "ElectricCalculation.h" +#include "IndMotor.h" +#include "Inductor.h" #include "Line.h" -#include "Transformer.h" +#include "Load.h" #include "SyncGenerator.h" -#include "IndMotor.h" #include "SyncMotor.h" -#include "Load.h" -#include "Inductor.h" -#include "Capacitor.h" +#include "Transformer.h" Text::Text() : GraphicalElement() { SetText(m_text); } Text::Text(wxPoint2DDouble position) : GraphicalElement() @@ -90,9 +90,7 @@ void Text::SetText(wxString text) m_text = text; // Clear OpenGL text list - for(auto it = m_openGLTextList.begin(), itEnd = m_openGLTextList.end(); it != itEnd; ++it) { - delete *it; - } + for(auto it = m_openGLTextList.begin(), itEnd = m_openGLTextList.end(); it != itEnd; ++it) { delete *it; } m_openGLTextList.clear(); m_numberOfLines = m_text.Freq('\n') + 1; @@ -190,9 +188,9 @@ void Text::UpdateText(double systemPowerBase) SetText(str); } break; case UNIT_A: { - wxString str = "Ia = " + - wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) + - " A"; + wxString str = + "Ia = " + wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) + + " A"; str += "\nIb = " + wxString::FromDouble(faultCurrent[1] * baseCurrent, m_decimalPlaces) + " A"; str += "\nIc = " + @@ -227,9 +225,9 @@ void Text::UpdateText(double systemPowerBase) SetText(str); } break; case UNIT_V: { - wxString str = "Va = " + - wxString::FromDouble(faultVoltage[0] * baseVoltage, m_decimalPlaces) + - " V"; + wxString str = + "Va = " + wxString::FromDouble(faultVoltage[0] * baseVoltage, m_decimalPlaces) + + " V"; str += "\nVb = " + wxString::FromDouble(faultVoltage[1] * baseVoltage, m_decimalPlaces) + " V"; str += "\nVc = " + @@ -344,9 +342,9 @@ void Text::UpdateText(double systemPowerBase) SetText(str); } break; case UNIT_A: { - wxString str = "Ia = " + - wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) + - " A"; + wxString str = + "Ia = " + wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) + + " A"; str += "\nIb = " + wxString::FromDouble(faultCurrent[1] * baseCurrent, m_decimalPlaces) + " A"; str += "\nIc = " + @@ -480,9 +478,9 @@ void Text::UpdateText(double systemPowerBase) SetText(str); } break; case UNIT_A: { - wxString str = "Ia = " + - wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) + - " A"; + wxString str = + "Ia = " + wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) + + " A"; str += "\nIb = " + wxString::FromDouble(faultCurrent[1] * baseCurrent, m_decimalPlaces) + " A"; str += "\nIc = " + @@ -627,12 +625,14 @@ void Text::UpdateText(double systemPowerBase) "Ia = " + wxString::FromDouble(faultCurrent[0] * baseCurrent[m_direction], m_decimalPlaces) + " A"; - str += "\nIb = " + wxString::FromDouble(faultCurrent[1] * baseCurrent[m_direction], - m_decimalPlaces) + - " A"; - str += "\nIc = " + wxString::FromDouble(faultCurrent[2] * baseCurrent[m_direction], - m_decimalPlaces) + - " A"; + str += + "\nIb = " + + wxString::FromDouble(faultCurrent[1] * baseCurrent[m_direction], m_decimalPlaces) + + " A"; + str += + "\nIc = " + + wxString::FromDouble(faultCurrent[2] * baseCurrent[m_direction], m_decimalPlaces) + + " A"; SetText(str); } break; case UNIT_kA: { @@ -936,3 +936,43 @@ bool Text::IsGLTextOK() } return isOk; } + +rapidxml::xml_node<>* Text::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Text"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + + auto textProperties = XMLParser::AppendNode(doc, elementNode, "TextProperties"); + auto elementType = XMLParser::AppendNode(doc, textProperties, "ElementType"); + XMLParser::SetNodeValue(doc, elementType, m_elementType); + auto elementNumber = XMLParser::AppendNode(doc, textProperties, "ElementNumber"); + XMLParser::SetNodeValue(doc, elementNumber, m_elementNumber); + auto dataType = XMLParser::AppendNode(doc, textProperties, "DataType"); + XMLParser::SetNodeValue(doc, dataType, m_dataType); + auto dataUnit = XMLParser::AppendNode(doc, textProperties, "DataUnit"); + XMLParser::SetNodeValue(doc, dataUnit, m_unit); + auto direction = XMLParser::AppendNode(doc, textProperties, "Direction"); + XMLParser::SetNodeValue(doc, direction, m_direction); + auto decimalPlaces = XMLParser::AppendNode(doc, textProperties, "DecimalPlaces"); + XMLParser::SetNodeValue(doc, decimalPlaces, m_decimalPlaces); + + return elementNode; +} + +bool Text::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + + auto textProperties = elementNode->first_node("TextProperties"); + if(!textProperties) return false; + + SetElementType(static_cast<ElementType>(XMLParser::GetNodeValueDouble(textProperties, "ElementType"))); + SetDataType(static_cast<DataType>(XMLParser::GetNodeValueDouble(textProperties, "DataType"))); + SetUnit(static_cast<ElectricalUnit>(XMLParser::GetNodeValueDouble(textProperties, "DataUnit"))); + SetDirection(XMLParser::GetNodeValueDouble(textProperties, "Direction")); + SetDecimalPlaces(XMLParser::GetNodeValueDouble(textProperties, "DecimalPlaces")); + SetElementNumber(XMLParser::GetNodeValueInt(textProperties, "ElementNumber")); + return true; +} diff --git a/Project/Text.h b/Project/Text.h index f7b1a68..822d5ee 100644 --- a/Project/Text.h +++ b/Project/Text.h @@ -105,6 +105,10 @@ class Text : public GraphicalElement const ElementType GetElementType() const { return m_elementType; } const ElectricalUnit GetUnit() const { return m_unit; } int GetDecimalPlaces() const { return m_decimalPlaces; } + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); + protected: wxString m_text = _("Text"); int m_numberOfLines = 0; diff --git a/Project/TransferFunction.cpp b/Project/TransferFunction.cpp index b34633c..8e7b68f 100644 --- a/Project/TransferFunction.cpp +++ b/Project/TransferFunction.cpp @@ -386,3 +386,58 @@ bool TransferFunction::UpdateText() if(!m_glTextNum->IsTextureOK()) return false; return true; } + +rapidxml::xml_node<>* TransferFunction::SaveElement(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "TransferFunction"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + + SaveCADProperties(doc, elementNode); + SaveControlNodes(doc, elementNode); + + // Element properties + auto numeratorNode = XMLParser::AppendNode(doc, elementNode, "Numerator"); + for(unsigned int i = 0; i < m_numerator.size(); ++i) { + auto value = XMLParser::AppendNode(doc, numeratorNode, "Value"); + XMLParser::SetNodeValue(doc, value, m_numerator[i]); + } + auto denominatorNode = XMLParser::AppendNode(doc, elementNode, "Denominator"); + for(unsigned int i = 0; i < m_denominator.size(); ++i) { + auto value = XMLParser::AppendNode(doc, denominatorNode, "Value"); + XMLParser::SetNodeValue(doc, value, m_denominator[i]); + } + + return elementNode; +} + +bool TransferFunction::OpenElement(rapidxml::xml_node<>* elementNode) +{ + if(!OpenCADProperties(elementNode)) return false; + if(!OpenControlNodes(elementNode)) return false; + + // Element properties + std::vector<double> numerator, denominator; + m_numerator.clear(); + m_denominator.clear(); + auto numeratorNode = elementNode->first_node("Numerator"); + auto nValue = numeratorNode->first_node("Value"); + while(nValue) { + double value = 0.0; + wxString(nValue->value()).ToCDouble(&value); + m_numerator.push_back(value); + nValue = nValue->next_sibling("Value"); + } + auto denominatorNode = elementNode->first_node("Denominator"); + auto dValue = denominatorNode->first_node("Value"); + while(dValue) { + double value = 0.0; + wxString(dValue->value()).ToCDouble(&value); + m_denominator.push_back(value); + dValue = dValue->next_sibling("Value"); + } + StartMove(m_position); + UpdateTFText(); + + return true; +} diff --git a/Project/TransferFunction.h b/Project/TransferFunction.h index a3d4555..f4ba344 100644 --- a/Project/TransferFunction.h +++ b/Project/TransferFunction.h @@ -74,6 +74,9 @@ class TransferFunction : public ControlElement * @return true if the calculation converges, false otherwise. */ virtual bool Solve(double* input, double timeStep); + + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode); virtual Element* GetCopy(); diff --git a/Project/Transformer.cpp b/Project/Transformer.cpp index 75816ce..3c3edd8 100644 --- a/Project/Transformer.cpp +++ b/Project/Transformer.cpp @@ -15,23 +15,19 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "TransformerForm.h" #include "Transformer.h" +#include "TransformerForm.h" Transformer::Transformer() : Branch() { for(int i = 0; i < 2; i++) { - for(int j = 0; j < 3; j++) { - m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); - } + for(int j = 0; j < 3; j++) { m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); } } } Transformer::Transformer(wxString name) : Branch() { for(int i = 0; i < 2; i++) { - for(int j = 0; j < 3; j++) { - m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); - } + for(int j = 0; j < 3; j++) { m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0); } } m_electricalData.name = name; } @@ -80,9 +76,7 @@ bool Transformer::AddParent(Element* parent, wxPoint2DDouble position) // Set first switch point. wxPoint2DDouble secondPoint = parentPt; - if(m_pointList.size() > 2) { - secondPoint = m_pointList[2]; - } + if(m_pointList.size() > 2) { secondPoint = m_pointList[2]; } m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], secondPoint); // Set the second switch point. @@ -158,9 +152,7 @@ void Transformer::Draw(wxPoint2DDouble translation, double scale) const if(m_pointList.size() > 0) { glColor4dv(elementColour.GetRGBA()); DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON); - if(m_inserted) { - DrawCircle(m_pointList[m_pointList.size() - 1], 5.0, 10, GL_POLYGON); - } + if(m_inserted) { DrawCircle(m_pointList[m_pointList.size() - 1], 5.0, 10, GL_POLYGON); } } DrawSwitches(); @@ -214,13 +206,9 @@ void Transformer::Move(wxPoint2DDouble position) SetPosition(m_movePos + position - m_moveStartPt); // Move all the points, except the switches and buses points. - for(int i = 2; i < (int)m_pointList.size() - 2; i++) { - m_pointList[i] = m_movePts[i] + position - m_moveStartPt; - } + for(int i = 2; i < (int)m_pointList.size() - 2; i++) { m_pointList[i] = m_movePts[i] + position - m_moveStartPt; } - if(!m_parentList[0]) { - m_pointList[0] = m_movePts[0] + position - m_moveStartPt; - } + if(!m_parentList[0]) { m_pointList[0] = m_movePts[0] + position - m_moveStartPt; } if(!m_parentList[1]) { m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt; } @@ -309,14 +297,10 @@ void Transformer::UpdatePowerFlowArrowsPosition() m_powerFlowArrow.clear(); } break; case PF_BUS1_TO_BUS2: { - for(int i = 1; i < (int)m_pointList.size() - 1; i++) { - edges.push_back(m_pointList[i]); - } + for(int i = 1; i < (int)m_pointList.size() - 1; i++) { edges.push_back(m_pointList[i]); } } break; case PF_BUS2_TO_BUS1: { - for(int i = (int)m_pointList.size() - 2; i > 0; i--) { - edges.push_back(m_pointList[i]); - } + for(int i = (int)m_pointList.size() - 2; i > 0; i--) { edges.push_back(m_pointList[i]); } } break; default: break; @@ -532,3 +516,205 @@ TransformerElectricalData Transformer::GetPUElectricalData(double systemBasePowe return data; } + +rapidxml::xml_node<>* Transformer::SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode) +{ + auto elementNode = XMLParser::AppendNode(doc, elementListNode, "Transfomer"); + XMLParser::SetNodeAttribute(doc, elementNode, "ID", m_elementID); + auto cadProp = XMLParser::AppendNode(doc, elementNode, "CADProperties"); + auto position = XMLParser::AppendNode(doc, cadProp, "Position"); + auto posX = XMLParser::AppendNode(doc, position, "X"); + XMLParser::SetNodeValue(doc, posX, m_position.m_x); + auto posY = XMLParser::AppendNode(doc, position, "Y"); + XMLParser::SetNodeValue(doc, posY, m_position.m_y); + auto size = XMLParser::AppendNode(doc, cadProp, "Size"); + auto width = XMLParser::AppendNode(doc, size, "Width"); + XMLParser::SetNodeValue(doc, width, m_width); + auto height = XMLParser::AppendNode(doc, size, "Height"); + XMLParser::SetNodeValue(doc, height, m_height); + auto angle = XMLParser::AppendNode(doc, cadProp, "Angle"); + XMLParser::SetNodeValue(doc, angle, m_angle); + auto nodeList = XMLParser::AppendNode(doc, cadProp, "NodeList"); + auto nodePos1 = XMLParser::AppendNode(doc, nodeList, "Node"); + XMLParser::SetNodeAttribute(doc, nodePos1, "ID", 0); + auto nodePosX1 = XMLParser::AppendNode(doc, nodePos1, "X"); + XMLParser::SetNodeValue(doc, nodePosX1, m_pointList[0].m_x); + auto nodePosY1 = XMLParser::AppendNode(doc, nodePos1, "Y"); + XMLParser::SetNodeValue(doc, nodePosY1, m_pointList[0].m_y); + auto nodePos2 = XMLParser::AppendNode(doc, nodeList, "Node"); + XMLParser::SetNodeAttribute(doc, nodePos2, "ID", 1); + auto nodePosX2 = XMLParser::AppendNode(doc, nodePos2, "X"); + XMLParser::SetNodeValue(doc, nodePosX2, m_pointList[m_pointList.size() - 1].m_x); + auto nodePosY2 = XMLParser::AppendNode(doc, nodePos2, "Y"); + XMLParser::SetNodeValue(doc, nodePosY2, m_pointList[m_pointList.size() - 1].m_y); + + auto parentIDList = XMLParser::AppendNode(doc, cadProp, "ParentIDList"); + for(unsigned int i = 0; i < m_parentList.size(); i++) { + Element* parent = m_parentList[i]; + if(parent) { + auto parentID = XMLParser::AppendNode(doc, parentIDList, "ParentID"); + XMLParser::SetNodeAttribute(doc, parentID, "ID", static_cast<int>(i)); + XMLParser::SetNodeValue(doc, parentID, parent->GetID()); + } + } + + auto electricalProp = XMLParser::AppendNode(doc, elementNode, "ElectricalProperties"); + auto isOnline = XMLParser::AppendNode(doc, electricalProp, "IsOnline"); + XMLParser::SetNodeValue(doc, isOnline, m_online); + auto name = XMLParser::AppendNode(doc, electricalProp, "Name"); + XMLParser::SetNodeValue(doc, name, m_electricalData.name); + auto primaryNominalVoltage = XMLParser::AppendNode(doc, electricalProp, "PrimaryNominalVoltage"); + XMLParser::SetNodeValue(doc, primaryNominalVoltage, m_electricalData.primaryNominalVoltage); + XMLParser::SetNodeAttribute(doc, primaryNominalVoltage, "UnitID", m_electricalData.primaryNominalVoltageUnit); + auto secondaryNominalVoltage = XMLParser::AppendNode(doc, electricalProp, "SecondaryNominalVoltage"); + XMLParser::SetNodeValue(doc, secondaryNominalVoltage, m_electricalData.secondaryNominalVoltage); + XMLParser::SetNodeAttribute(doc, secondaryNominalVoltage, "UnitID", m_electricalData.secondaryNominalVoltageUnit); + auto nominalPower = XMLParser::AppendNode(doc, electricalProp, "NominalPower"); + XMLParser::SetNodeValue(doc, nominalPower, m_electricalData.nominalPower); + XMLParser::SetNodeAttribute(doc, nominalPower, "UnitID", m_electricalData.nominalPowerUnit); + auto resistance = XMLParser::AppendNode(doc, electricalProp, "Resistance"); + XMLParser::SetNodeValue(doc, resistance, m_electricalData.resistance); + XMLParser::SetNodeAttribute(doc, resistance, "UnitID", m_electricalData.resistanceUnit); + auto indReactance = XMLParser::AppendNode(doc, electricalProp, "IndReactance"); + XMLParser::SetNodeValue(doc, indReactance, m_electricalData.indReactance); + XMLParser::SetNodeAttribute(doc, indReactance, "UnitID", m_electricalData.indReactanceUnit); + auto connection = XMLParser::AppendNode(doc, electricalProp, "Connection"); + XMLParser::SetNodeValue(doc, connection, m_electricalData.connection); + auto turnsRatio = XMLParser::AppendNode(doc, electricalProp, "TurnsRatio"); + XMLParser::SetNodeValue(doc, turnsRatio, m_electricalData.turnsRatio); + auto phaseShift = XMLParser::AppendNode(doc, electricalProp, "PhaseShift"); + XMLParser::SetNodeValue(doc, phaseShift, m_electricalData.phaseShift); + auto useTransformerPower = XMLParser::AppendNode(doc, electricalProp, "UseTransfomerPower"); + XMLParser::SetNodeValue(doc, useTransformerPower, m_electricalData.useTransformerPower); + + auto fault = XMLParser::AppendNode(doc, electricalProp, "Fault"); + auto zeroResistance = XMLParser::AppendNode(doc, fault, "ZeroResistance"); + XMLParser::SetNodeValue(doc, zeroResistance, m_electricalData.zeroResistance); + auto zeroIndReactance = XMLParser::AppendNode(doc, fault, "ZeroIndReactance"); + XMLParser::SetNodeValue(doc, zeroIndReactance, m_electricalData.zeroIndReactance); + auto primaryGrndResistance = XMLParser::AppendNode(doc, fault, "PrimaryGrndResistance"); + XMLParser::SetNodeValue(doc, primaryGrndResistance, m_electricalData.primaryGrndResistance); + auto primaryGrndReactance = XMLParser::AppendNode(doc, fault, "PrimaryGrndReactance"); + XMLParser::SetNodeValue(doc, primaryGrndReactance, m_electricalData.primaryGrndReactance); + auto secondaryGrndResistance = XMLParser::AppendNode(doc, fault, "SecondaryGrndResistance"); + XMLParser::SetNodeValue(doc, secondaryGrndResistance, m_electricalData.secondaryGrndResistance); + auto secondaryGrndReactance = XMLParser::AppendNode(doc, fault, "SecondaryGrndReactance"); + XMLParser::SetNodeValue(doc, secondaryGrndReactance, m_electricalData.secondaryGrndReactance); + + SaveSwitchingData(doc, electricalProp); + + return elementNode; +} + +bool Transformer::OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) +{ + auto cadPropNode = elementNode->first_node("CADProperties"); + if(!cadPropNode) return false; + + auto position = cadPropNode->first_node("Position"); + double posX = XMLParser::GetNodeValueDouble(position, "X"); + double posY = XMLParser::GetNodeValueDouble(position, "Y"); + auto size = cadPropNode->first_node("Size"); + m_width = XMLParser::GetNodeValueDouble(size, "Width"); + m_height = XMLParser::GetNodeValueDouble(size, "Height"); + double angle = XMLParser::GetNodeValueDouble(cadPropNode, "Angle"); + + // Get nodes points + std::vector<wxPoint2DDouble> ptsList; + auto nodePosList = cadPropNode->first_node("NodeList"); + if(!nodePosList) return false; + auto nodePos = nodePosList->first_node("Node"); + while(nodePos) { + double nodePosX = XMLParser::GetNodeValueDouble(nodePos, "X"); + double nodePosY = XMLParser::GetNodeValueDouble(nodePos, "Y"); + ptsList.push_back(wxPoint2DDouble(nodePosX, nodePosY)); + nodePos = nodePos->next_sibling("Node"); + } + + // Get parents IDs + auto parentIDList = cadPropNode->first_node("ParentIDList"); + if(!parentIDList) return false; + auto parentNode = parentIDList->first_node("ParentID"); + long parentID[2] = {-1, -1}; + while(parentNode) { + long index = 0; + wxString(parentNode->first_attribute("ID")->value()).ToLong(&index); + wxString(parentNode->value()).ToCLong(&parentID[index]); + parentNode = parentNode->next_sibling("ParentID"); + } + + std::vector<wxPoint2DDouble> nodePtsList; // List of node points + nodePtsList.push_back(ptsList[0]); // First point on the list + nodePtsList.push_back(ptsList[ptsList.size() - 1]); // Last point on the list + + // List of dummy buses to set not connected nodes properly + std::vector<Bus*> dummyBusList; + // Set parents (if have) + for(unsigned int i = 0; i < 2; ++i) { + if(parentID[i] == -1) // No parent connected + { + Bus* dummyBus = new Bus(nodePtsList[i]); + dummyBusList.push_back(dummyBus); + AddParent(dummyBus, nodePtsList[i]); + } else { // Parent connected (necessarily a bus, get from bus list) + AddParent(parentList[parentID[i]], nodePtsList[i]); + } + } + + StartMove(m_position); + Move(wxPoint2DDouble(posX, posY)); + + // Remove dummy buses + for(auto it = dummyBusList.begin(), itEnd = dummyBusList.end(); it != itEnd; ++it) { + RemoveParent(*it); + delete *it; + } + dummyBusList.clear(); + + // Set rotation properly. + int numRot = angle / GetRotationAngle(); + bool clockwise = true; + if(numRot < 0) { + numRot = std::abs(numRot); + clockwise = false; + } + for(int i = 0; i < numRot; i++) Rotate(clockwise); + + auto electricalProp = elementNode->first_node("ElectricalProperties"); + if(!electricalProp) return false; + + SetOnline(XMLParser::GetNodeValueInt(electricalProp, "IsOnline")); + m_electricalData.name = electricalProp->first_node("Name")->value(); + m_electricalData.primaryNominalVoltage = XMLParser::GetNodeValueDouble(electricalProp, "PrimaryNominalVoltage"); + m_electricalData.primaryNominalVoltageUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "PrimaryNominalVoltage", "UnitID")); + m_electricalData.secondaryNominalVoltage = XMLParser::GetNodeValueDouble(electricalProp, "SecondaryNominalVoltage"); + m_electricalData.secondaryNominalVoltageUnit = static_cast<ElectricalUnit>( + XMLParser::GetAttributeValueInt(electricalProp, "SecondaryNominalVoltage", "UnitID")); + m_electricalData.nominalPower = XMLParser::GetNodeValueDouble(electricalProp, "NominalPower"); + m_electricalData.nominalPowerUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "NominalPower", "UnitID")); + m_electricalData.resistance = XMLParser::GetNodeValueDouble(electricalProp, "Resistance"); + m_electricalData.resistanceUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "Resistance", "UnitID")); + m_electricalData.indReactance = XMLParser::GetNodeValueDouble(electricalProp, "IndReactance"); + m_electricalData.indReactanceUnit = + static_cast<ElectricalUnit>(XMLParser::GetAttributeValueInt(electricalProp, "IndReactance", "UnitID")); + m_electricalData.connection = (TransformerConnection)XMLParser::GetNodeValueInt(electricalProp, "Connection"); + m_electricalData.turnsRatio = XMLParser::GetNodeValueDouble(electricalProp, "TurnsRatio"); + m_electricalData.phaseShift = XMLParser::GetNodeValueDouble(electricalProp, "PhaseShift"); + m_electricalData.useTransformerPower = XMLParser::GetNodeValueInt(electricalProp, "UseTransfomerPower"); + + auto fault = electricalProp->first_node("Fault"); + m_electricalData.zeroResistance = XMLParser::GetNodeValueDouble(fault, "ZeroResistance"); + m_electricalData.zeroIndReactance = XMLParser::GetNodeValueDouble(fault, "ZeroIndReactance"); + m_electricalData.primaryGrndResistance = XMLParser::GetNodeValueDouble(fault, "PrimaryGrndResistance"); + m_electricalData.primaryGrndReactance = XMLParser::GetNodeValueDouble(fault, "PrimaryGrndReactance"); + m_electricalData.secondaryGrndResistance = XMLParser::GetNodeValueDouble(fault, "SecondaryGrndResistance"); + m_electricalData.secondaryGrndReactance = XMLParser::GetNodeValueDouble(fault, "SecondaryGrndReactance"); + + if(!OpenSwitchingData(electricalProp)) return false; + if(m_swData.swTime.size() != 0) SetDynamicEvent(true); + + return true; +} diff --git a/Project/Transformer.h b/Project/Transformer.h index 3b0d314..9a5d3d4 100644 --- a/Project/Transformer.h +++ b/Project/Transformer.h @@ -102,6 +102,9 @@ class Transformer : public Branch virtual void SetElectricaData(TransformerElectricalData electricalData) { m_electricalData = electricalData; } virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit); + virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode); + virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList); + protected: void UpdatePowerFlowArrowsPosition(); TransformerElectricalData m_electricalData; diff --git a/Project/XMLParser.cpp b/Project/XMLParser.cpp new file mode 100644 index 0000000..0d1588e --- /dev/null +++ b/Project/XMLParser.cpp @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2018 Thales Lima Oliveira <thales@ufu.br> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "XMLParser.h" + +XMLParser::XMLParser() {} + +XMLParser::~XMLParser() {} + +rapidxml::xml_node<>* XMLParser::AppendNode(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* parentNode, + const char* name, + rapidxml::node_type nodeType) +{ + rapidxml::xml_node<>* node = doc.allocate_node(nodeType, name); + parentNode->append_node(node); + return node; +} + +void XMLParser::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, wxString value) +{ + node->value(doc.allocate_string(value.mb_str())); +} + +void XMLParser::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, int value) +{ + node->value(doc.allocate_string(wxString::Format("%d", value).mb_str())); +} + +void XMLParser::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, double value) +{ + node->value(doc.allocate_string(wxString::FromCDouble(value, 13).mb_str())); +} + +void XMLParser::SetNodeAttribute(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* node, + const char* atrName, + wxString value) +{ + node->append_attribute(doc.allocate_attribute(atrName, doc.allocate_string(value.mb_str()))); +} + +void XMLParser::SetNodeAttribute(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* node, + const char* atrName, + int value) +{ + node->append_attribute( + doc.allocate_attribute(atrName, doc.allocate_string(wxString::Format("%d", value).mb_str()))); +} + +void XMLParser::SetNodeAttribute(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* node, + const char* atrName, + double value) +{ + node->append_attribute( + doc.allocate_attribute(atrName, doc.allocate_string(wxString::FromCDouble(value, 13).mb_str()))); +} + +double XMLParser::GetNodeValueDouble(rapidxml::xml_node<>* parent, const char* nodeName) +{ + double dValue = 0.0; + if(parent) { + auto node = parent->first_node(nodeName); + if(node) wxString(node->value()).ToCDouble(&dValue); + } + return dValue; +} + +int XMLParser::GetNodeValueInt(rapidxml::xml_node<>* parent, const char* nodeName) +{ + long iValue = -1; + if(parent) { + auto node = parent->first_node(nodeName); + if(node) wxString(node->value()).ToCLong(&iValue); + } + return (int)iValue; +} + +int XMLParser::GetAttributeValueInt(rapidxml::xml_node<>* parent, const char* nodeName, const char* atrName) +{ + long iValue = -1; + if(parent) { + auto node = parent->first_node(nodeName); + if(node) { + auto atr = node->first_attribute(atrName); + if(atr) wxString(atr->value()).ToCLong(&iValue); + } + } + return (int)iValue; +} + +int XMLParser::GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName) +{ + long intValue; + auto atr = node->first_attribute(atrName); + if(!atr) return false; + wxString(atr->value()).ToCLong(&intValue); + return (int)intValue; +} diff --git a/Project/XMLParser.h b/Project/XMLParser.h new file mode 100644 index 0000000..b66fe74 --- /dev/null +++ b/Project/XMLParser.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2018 Thales Lima Oliveira <thales@ufu.br> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +#ifndef XMLPARSER_H +#define XMLPARSER_H + +#include "rapidXML/rapidxml.hpp" +// Modified: http://stackoverflow.com/questions/14113923/rapidxml-print-header-has-undefined-methods +#include "rapidXML/rapidxml_print.hpp" +#include "rapidXML/rapidxml_utils.hpp" + +#include <wx/string.h> + +/** + * @class XMLParser + * @author Thales Lima Oliveira <thales@ufu.br> + * @date 08/01/2018 + * @brief XML parser to save and open project and control files. + * @file XMLParser.h + */ +class XMLParser +{ + public: + XMLParser(); + ~XMLParser(); + + static rapidxml::xml_node<>* AppendNode(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* parentNode, + const char* name, + rapidxml::node_type nodeType = rapidxml::node_element); + static void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, wxString value); + static void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, int value); + static void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, double value); + static void SetNodeAttribute(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* node, + const char* atrName, + wxString value); + static void SetNodeAttribute(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* node, + const char* atrName, + int value); + static void SetNodeAttribute(rapidxml::xml_document<>& doc, + rapidxml::xml_node<>* node, + const char* atrName, + double value); + static double GetNodeValueDouble(rapidxml::xml_node<>* parent, const char* nodeName); + static int GetNodeValueInt(rapidxml::xml_node<>* parent, const char* nodeName); + static int GetAttributeValueInt(rapidxml::xml_node<>* parent, const char* nodeName, const char* atrName); + static int GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName); +}; + +#endif // XMLPARSER_H |