Ignition Gazebo

API Reference

4.6.0
BaseComponent Class Referenceabstract

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 &)
 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 &) 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()

BaseComponent ( )
default

Default constructor.

◆ ~BaseComponent()

virtual ~BaseComponent ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ Deserialize()

virtual void Deserialize ( std::istream )
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]_inIn stream.

Reimplemented in Component< NoData, Identifier, Serializer >, and Component< DataType, Identifier, Serializer >.

References std::endl(), and ignwarn.

◆ Serialize()

virtual void Serialize ( std::ostream ) const
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]_outOut stream.

Reimplemented in Component< NoData, Identifier, Serializer >, and Component< DataType, Identifier, Serializer >.

References std::endl(), and ignwarn.

◆ TypeId()

virtual ComponentTypeId TypeId ( ) const
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 >.


The documentation for this class was generated from the following file: