|
Open Model Railroad Network (OpenMRN)
|
Public Member Functions | |
| CDINodeRep () | |
| Default constructor. | |
| CDINodeRep (const XMLNode *node, std::nullptr_t) | |
| Initializes a group rep from an arbitrary XML element (e.g. | |
| CDINodeRep (const XMLNode *segment) | |
| Initializes a group rep from a segment root. | |
| CDINodeRep (const CDINodeRep *parent, const XMLNode *child) | |
| Initializes a group rep which has no replication or an entry rep. | |
| CDINodeRep (const CDINodeRep *parent, const XMLNode *group, unsigned replica) | |
| Initializes a group rep for a given replica. | |
| template<typename... Args> | |
| void | reset (Args &&... args) |
| Resets the current representation. | |
| unsigned | get_child_address (const XMLNode *child) const |
| Gets the absolute address of a given child in the current segment. | |
| unsigned | get_child_size (const XMLNode *child) const |
| Gets the size of a child (number of bytes occupied). | |
Public Attributes | |
| const XMLNode * | node_ |
| Element in the XML where we are. This is a segment or a group node. | |
| unsigned | address_ |
| address in the current space of the beginning of the current node. | |
Definition at line 398 of file CDIUtils.hxx.
|
inline |
Default constructor.
Probably should not be used; maybe only for the root of the CDI which is not inside any segment.
Definition at line 411 of file CDIUtils.hxx.
|
inline |
Initializes a group rep from an arbitrary XML element (e.g.
the cdi root). Tihs does not allow child computations.
| node | is the XML element. |
Definition at line 420 of file CDIUtils.hxx.
|
inline |
Initializes a group rep from a segment root.
| segment | is the XML element representing the segment root. |
Definition at line 428 of file CDIUtils.hxx.
|
inline |
Initializes a group rep which has no replication or an entry rep.
| parent | is the Node representation of the parent group or segment. |
| child | is the XML element for the current (child). If it is a group, it must have no replication. |
Definition at line 442 of file CDIUtils.hxx.
|
inline |
Initializes a group rep for a given replica.
| parent | is the Node representation of the parent group or segment. |
| group | is the XML element for the current (child) group. it must have replication. |
| replica | is the number of the replication (zero to replication - 1). |
Definition at line 460 of file CDIUtils.hxx.
|
inline |
Gets the absolute address of a given child in the current segment.
| child | an element which is a child of node_ |
Definition at line 484 of file CDIUtils.hxx.
|
inline |
Gets the size of a child (number of bytes occupied).
Definition at line 494 of file CDIUtils.hxx.
|
inline |
Resets the current representation.
Use any constructor argument set.
Definition at line 476 of file CDIUtils.hxx.
| unsigned openlcb::CDIUtils::CDINodeRep::address_ |
address in the current space of the beginning of the current node.
For segments, this is the origin; for groups this is the address of the virtual zero-length data element at the beginning of the group. For repeated groups this is meaningful only with a given repetition of a group.
Definition at line 407 of file CDIUtils.hxx.
| const XMLNode* openlcb::CDIUtils::CDINodeRep::node_ |
Element in the XML where we are. This is a segment or a group node.
Definition at line 401 of file CDIUtils.hxx.