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...
Public Member Functions | |
ObjectMapper (Measurement &owner) | |
Default constructor. More... | |
bool | hasInternalObject (const TInternalId &internalObjectId) const |
Returns whether this mapping object holds a specific internal object. More... | |
bool | hasExternalObject (const Measurement::ObjectId &externalObjectId) const |
Returns whether this mapping object holds a specific external object. More... | |
ObjectId | newInternalObjectId (const TInternalId &internalObjectId, const std::string &description) |
Adds a new internal pattern id. More... | |
void | removeInternalObject (const TInternalId &internalObjectId) |
Removes a mapping between internal and external object. More... | |
ObjectId | externalObjectIdFromInternalObjectId (const TInternalId &internalObjectId) const |
Converts the tracker's internal object id to an external object id. More... | |
TInternalId | internalObjectIdFromExternalObjectId (const ObjectId externalObjectId, const TInternalId &invalidInternalId) const |
Converts an external object id to the tracker tracker's internal object id. More... | |
Protected Types | |
typedef std::unordered_map< TInternalId, ObjectId > | InternalObjectIdMap |
Definition of an unordered map mapping internal object ids to external object ids. More... | |
typedef std::unordered_map< ObjectId, TInternalId > | ExternalObjectIdMap |
Definition of an unordered map mapping external object ids to internal object ids. More... | |
Protected Member Functions | |
ObjectMapper (const ObjectMapper &objectMapper)=delete | |
Disabled copy constructor. More... | |
ObjectMapper & | operator= (const ObjectMapper &objectMapper)=delete |
Disabled copy operator. More... | |
Protected Attributes | |
Measurement & | owner_ |
The owner of this mapper. More... | |
InternalObjectIdMap | internalObjectIdMap_ |
The map mapping internal object ids to external object ids. More... | |
ExternalObjectIdMap | externalObjectIdMap_ |
The map mapping external object ids to internal object ids. More... | |
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.