|
Ocean
|
This class implements a helper class to simplify the mapping between internal object ids (of the actual tracking implementation) and extern object ids (of the device system). More...
#include <Measurement.h>
Public Member Functions | |
| ObjectMapper (Measurement &owner) | |
| Default constructor. | |
| bool | hasInternalObject (const TInternalId &internalObjectId) const |
| Returns whether this mapping object holds a specific internal object. | |
| bool | hasExternalObject (const Measurement::ObjectId &externalObjectId) const |
| Returns whether this mapping object holds a specific external object. | |
| ObjectId | newInternalObjectId (const TInternalId &internalObjectId, const std::string &description) |
| Adds a new internal pattern id. | |
| void | removeInternalObject (const TInternalId &internalObjectId) |
| Removes a mapping between internal and external object. | |
| ObjectId | externalObjectIdFromInternalObjectId (const TInternalId &internalObjectId) const |
| Converts the tracker's internal object id to an external object id. | |
| TInternalId | internalObjectIdFromExternalObjectId (const ObjectId externalObjectId, const TInternalId &invalidInternalId) const |
| Converts an external object id to the tracker tracker's internal object id. | |
Protected Types | |
| using | InternalObjectIdMap = std::unordered_map< TInternalId, ObjectId > |
| Definition of an unordered map mapping internal object ids to external object ids. | |
| using | ExternalObjectIdMap = std::unordered_map< ObjectId, TInternalId > |
| Definition of an unordered map mapping external object ids to internal object ids. | |
Protected Member Functions | |
| ObjectMapper (const ObjectMapper &objectMapper)=delete | |
| Disabled copy constructor. | |
| ObjectMapper & | operator= (const ObjectMapper &objectMapper)=delete |
| Disabled copy operator. | |
Protected Attributes | |
| Measurement & | owner_ |
| The owner of this mapper. | |
| InternalObjectIdMap | internalObjectIdMap_ |
| The map mapping internal object ids to external object ids. | |
| ExternalObjectIdMap | externalObjectIdMap_ |
| The map mapping external object ids to internal object ids. | |
This class implements a helper class to simplify the mapping between internal object ids (of the actual tracking implementation) and extern object ids (of the device system).
| TInternalId | The data type of the internal object id. |
|
protected |
Definition of an unordered map mapping external object ids to internal object ids.
|
protected |
Definition of an unordered map mapping internal object ids to external object ids.
|
inlineexplicit |
Default constructor.
|
protecteddelete |
Disabled copy constructor.
| objectMapper | Object which would be copied |
| Measurement::ObjectId Ocean::Devices::Measurement::ObjectMapper< TInternalId >::externalObjectIdFromInternalObjectId | ( | const TInternalId & | internalObjectId | ) | const |
Converts the tracker's internal object id to an external object id.
| internalObjectId | The internal object id to translate |
| bool Ocean::Devices::Measurement::ObjectMapper< TInternalId >::hasExternalObject | ( | const Measurement::ObjectId & | externalObjectId | ) | const |
Returns whether this mapping object holds a specific external object.
| externalObjectId | The id of the external object to be checked, must be valid |
| bool Ocean::Devices::Measurement::ObjectMapper< TInternalId >::hasInternalObject | ( | const TInternalId & | internalObjectId | ) | const |
Returns whether this mapping object holds a specific internal object.
| internalObjectId | The id of the internal object to be checked |
| TInternalId Ocean::Devices::Measurement::ObjectMapper< TInternalId >::internalObjectIdFromExternalObjectId | ( | const ObjectId | externalObjectId, |
| const TInternalId & | invalidInternalId | ||
| ) | const |
Converts an external object id to the tracker tracker's internal object id.
| externalObjectId | The external object id to translate |
| invalidInternalId | An invalid internal id |
| Measurement::ObjectId Ocean::Devices::Measurement::ObjectMapper< TInternalId >::newInternalObjectId | ( | const TInternalId & | internalObjectId, |
| const std::string & | description | ||
| ) |
Adds a new internal pattern id.
| internalObjectId | The new internal object id to add |
| description | The description of the new pattern |
|
protecteddelete |
Disabled copy operator.
| objectMapper | Object which would be copied |
| void Ocean::Devices::Measurement::ObjectMapper< TInternalId >::removeInternalObject | ( | const TInternalId & | internalObjectId | ) |
Removes a mapping between internal and external object.
| internalObjectId | The id of the internal object for which the mapping will be removed |
|
protected |
The map mapping external object ids to internal object ids.
|
protected |
The map mapping internal object ids to external object ids.
|
protected |
The owner of this mapper.