OMSimulatorLib The OMSimulator project is a FMI-based co-simulation environment.

Loading...
Searching...
No Matches
Element.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenModelica.
3 *
4 * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC),
5 * c/o Linköpings universitet, Department of Computer and Information Science,
6 * SE-58183 Linköping, Sweden.
7 *
8 * All rights reserved.
9 *
10 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR
11 * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8.
12 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
13 * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL
14 * VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
15 *
16 * The OpenModelica software and the OSMC (Open Source Modelica Consortium)
17 * Public License (OSMC-PL) are obtained from OSMC, either from the above
18 * address, from the URLs:
19 * http://www.openmodelica.org or
20 * https://github.com/OpenModelica/ or
21 * http://www.ida.liu.se/projects/OpenModelica,
22 * and in the OpenModelica distribution.
23 *
24 * GNU AGPL version 3 is obtained from:
25 * https://www.gnu.org/licenses/licenses.html#GPL
26 *
27 * This program is distributed WITHOUT ANY WARRANTY; without
28 * even the implied warranty of MERCHANTABILITY or FITNESS
29 * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
30 * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
31 *
32 * See the full OSMC Public License conditions for more details.
33 *
34 */
35
36#ifndef _OMS_ELEMENT_H_
37#define _OMS_ELEMENT_H_
38
39#include "BusConnector.h"
40#include "ComRef.h"
41#include "Connector.h"
42#include "ssd/ElementGeometry.h"
43#include "OMSimulator/Types.h"
44
45 namespace oms
46{
50 class Element : protected oms_element_t
51 {
52 public:
53 Element(oms_element_enu_t type, const ComRef& name);
54 ~Element();
55
56 const oms_element_enu_t getType() const {return type;}
57 const oms::ComRef getName() const {return oms::ComRef(name);}
58 oms::Connector** getConnectors() const {return reinterpret_cast<oms::Connector**>(connectors);}
59 const oms::ssd::ElementGeometry* getGeometry() const {return reinterpret_cast<oms::ssd::ElementGeometry*>(geometry);}
60
61 void setName(const ComRef& name);
62 void setGeometry(const oms::ssd::ElementGeometry* newGeometry);
63 void setConnectors(oms::Connector** newConnectors);
64 void setBusConnectors(oms::BusConnector **newBusConnectors);
65 void setSubElements(oms_element_t** subelements);
66
67 private:
68 // methods to copy the object
69 Element(const Element& rhs);
70 Element& operator=(const Element& rhs);
71 };
72}
73
74#endif
BusConnector.h
ComRef.h
Connector.h
ElementGeometry.h
oms::BusConnector
BusConnector.
Definition BusConnector.h:56
oms::ComRef
ComRef - component reference.
Definition ComRef.h:51
oms::Connector
Connector.
Definition Connector.h:54
oms::Element
Element.
Definition Element.h:51
oms::Element::setGeometry
void setGeometry(const oms::ssd::ElementGeometry *newGeometry)
Definition Element.cpp:70
oms::Element::setSubElements
void setSubElements(oms_element_t **subelements)
Definition Element.cpp:92
oms::Element::getName
const oms::ComRef getName() const
Definition Element.h:57
oms::Element::setName
void setName(const ComRef &name)
Definition Element.cpp:62
oms::Element::setConnectors
void setConnectors(oms::Connector **newConnectors)
Definition Element.cpp:82
oms::Element::operator=
Element & operator=(const Element &rhs)
not implemented
oms::Element::~Element
~Element()
Definition Element.cpp:51
oms::Element::getConnectors
oms::Connector ** getConnectors() const
Definition Element.h:58
oms::Element::Element
Element(const Element &rhs)
not implemented
oms::Element::getType
const oms_element_enu_t getType() const
Definition Element.h:56
oms::Element::getGeometry
const oms::ssd::ElementGeometry * getGeometry() const
Definition Element.h:59
oms::Element::setBusConnectors
void setBusConnectors(oms::BusConnector **newBusConnectors)
Definition Element.cpp:87
oms::ssd::ElementGeometry
Definition ElementGeometry.h:50
oms
Definition AlgLoop.h:49