Base class for all components. More...
#include <Component.hh>
Public Member Functions | |
BaseComponent ()=default | |
Default constructor. More... | |
virtual | ~BaseComponent ()=default |
Default destructor. More... | |
virtual void | Deserialize (std::istream &_in) |
Fills a component based on a stream with a serialized data. By default, it will do nothing. Derived classes should override this function to support deserialization. More... | |
virtual void | Serialize (std::ostream &_out) const |
Fills a stream with a serialized version of the component. By default, it will leave the stream empty. Derived classes should override this function to support serialization. More... | |
virtual ComponentTypeId | TypeId () const =0 |
Returns the unique ID for the component's type. The ID is derived from the name that is manually chosen during the Factory registration and is guaranteed to be the same across compilers and runs. More... | |
Detailed Description
Base class for all components.
Constructor & Destructor Documentation
◆ BaseComponent()
|
default |
Default constructor.
◆ ~BaseComponent()
|
virtualdefault |
Default destructor.
Member Function Documentation
◆ Deserialize()
|
inlinevirtual |
Fills a component based on a stream with a serialized data. By default, it will do nothing. Derived classes should override this function to support deserialization.
- Parameters
-
[in] _in In stream.
Reimplemented in Component< NoData, Identifier, Serializer >, and Component< DataType, Identifier, Serializer >.
References std::endl(), ignwarn, and BaseComponent::TypeId().
◆ Serialize()
|
inlinevirtual |
Fills a stream with a serialized version of the component. By default, it will leave the stream empty. Derived classes should override this function to support serialization.
- Parameters
-
[in] _out Out stream.
Reimplemented in Component< NoData, Identifier, Serializer >, and Component< DataType, Identifier, Serializer >.
References std::endl(), ignwarn, and BaseComponent::TypeId().
◆ TypeId()
|
pure virtual |
Returns the unique ID for the component's type. The ID is derived from the name that is manually chosen during the Factory registration and is guaranteed to be the same across compilers and runs.
Implemented in Component< NoData, Identifier, Serializer >, and Component< DataType, Identifier, Serializer >.
Referenced by BaseComponent::Deserialize(), and BaseComponent::Serialize().
The documentation for this class was generated from the following file: