Files
essim/doc/api/classes/SystemElementContainer.md
François 66460262af Auto-generated API doc: doxygen → custom Python emitter → doc/api/.
`cmake --build build --target doc` runs Doxygen to produce XML, then
`doc/gen_api_md.py` (~330 lines, stdlib-only) emits a Markdown tree
under `doc/api/` that gitea renders directly in its file browser.

- 24 class/struct pages + 51 source-file pages + indices, with source
  links of the form `../../../../src/...#L42` that gitea turns into
  clickable line-anchored links.
- Doxyfile.in templated by CMake (XML-only output to build/doc/xml/).
- Pure Python emitter, zero external deps — no doxybook2 (not packaged
  on Arch) and no moxygen (avoids Node).
- Target gracefully disabled if Doxygen or Python 3 is missing at
  configure time; regular build target unaffected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 08:13:15 +02:00

196 lines
4.3 KiB
Markdown

# SystemElementContainer
`class SystemElementContainer` — inherits [SystemElement](../classes/SystemElement.md)
Defined in [syselmts.hpp:32](../../../../src/system/syselmts.hpp#L32)
A container for managing system elements of type T.
## Public Types
### `using SystemElementContainer< T >::MapType = unordered_map<string, T *>`
📍 [syselmts.hpp:35](../../../../src/system/syselmts.hpp#L35)
### `using SystemElementContainer< T >::iterator = typename MapType::iterator`
📍 [syselmts.hpp:36](../../../../src/system/syselmts.hpp#L36)
### `using SystemElementContainer< T >::const_iterator = typename MapType::const_iterator`
📍 [syselmts.hpp:37](../../../../src/system/syselmts.hpp#L37)
## Protected Attributes
### `unsigned int iter_count`
📍 [syselmts.hpp:40](../../../../src/system/syselmts.hpp#L40)
### `MapType content`
📍 [syselmts.hpp:41](../../../../src/system/syselmts.hpp#L41)
## Protected Functions
### `void add(MapType el_content)`
📍 [syselmts.hpp:47](../../../../src/system/syselmts.hpp#L47)
Adds elements from a map to the container.
**Parameters**
- `el_content` — Map of elements to add.
## Public Functions
### `SystemElementContainer(string name)`
📍 [syselmts.hpp:60](../../../../src/system/syselmts.hpp#L60)
Constructor for an empty container.
**Parameters**
- `` — Name of the container.
### `SystemElementContainer(string name, vector< T * > elements)`
📍 [syselmts.hpp:67](../../../../src/system/syselmts.hpp#L67)
Constructor with initial elements.
**Parameters**
- `` — Name of the container.
- `elements` — Vector of elements to add.
### `void add(string name, T *element)`
📍 [syselmts.hpp:78](../../../../src/system/syselmts.hpp#L78)
Adds a single element to the container with a given name.
**Parameters**
- `` — Name of the element to add.
- `element` — Pointer to the element to add.
**Throws**
- `runtime_error` — If the element's name is empty or already exists.
### `void add(T *element)`
📍 [syselmts.hpp:96](../../../../src/system/syselmts.hpp#L96)
Adds a single element to the container.
**Parameters**
- `element` — Pointer to the element to add.
**Throws**
- `runtime_error` — If the element's name is empty or already exists.
### `bool exists(string name)`
📍 [syselmts.hpp:106](../../../../src/system/syselmts.hpp#L106)
Checks if an element exists in the container.
**Parameters**
- `` — Name of the element to check.
**Returns** True if the element exists, false otherwise.
### `void add(SystemElementContainer< T > *elements)`
📍 [syselmts.hpp:123](../../../../src/system/syselmts.hpp#L123)
Adds elements from another container.
**Parameters**
- `elements` — Pointer to another container.
### `void add(vector< T * > elements)`
📍 [syselmts.hpp:132](../../../../src/system/syselmts.hpp#L132)
Adds multiple elements from a vector.
**Parameters**
- `elements` — Vector of elements to add.
### `T * get(string name)`
📍 [syselmts.hpp:146](../../../../src/system/syselmts.hpp#L146)
Retrieves an element by its name.
**Parameters**
- `` — Name of the element to retrieve.
**Returns** Pointer to the element.
**Throws**
- `runtime_error` — If the element is not found.
### `T * merge(string name)`
📍 [syselmts.hpp:164](../../../../src/system/syselmts.hpp#L164)
Merges an element by retrieving it or creating a new one if it doesn't exist.
**Parameters**
- `` — Name of the element.
**Returns** Pointer to the merged or newly created element.
### `size_t size() const`
📍 [syselmts.hpp:178](../../../../src/system/syselmts.hpp#L178)
### `iterator begin()`
📍 [syselmts.hpp:184](../../../../src/system/syselmts.hpp#L184)
Returns an iterator to the beginning of the container.
**Returns** Iterator to the beginning.
### `iterator end()`
📍 [syselmts.hpp:190](../../../../src/system/syselmts.hpp#L190)
Returns an iterator to the end of the container.
**Returns** Iterator to the end.
### `const_iterator begin() const`
📍 [syselmts.hpp:196](../../../../src/system/syselmts.hpp#L196)
Returns a constant iterator to the beginning of the container.
**Returns** Constant iterator to the beginning.
### `const_iterator end() const`
📍 [syselmts.hpp:202](../../../../src/system/syselmts.hpp#L202)
Returns a constant iterator to the end of the container.
**Returns** Constant iterator to the end.
---
← [Back to classes](index.md) · [Top](../index.md)