EventAnalysis
1.3.0
|
Class describing a pointer to an object retrieved from an ObjectMap. More...
#include <ObjPtr.h>
Public Member Functions | |
ObjPtr () | |
Default constructor. More... | |
ObjPtr (const ObjPtr< T > &objPtr) | |
Copy constructor. More... | |
ObjPtr (const ObjPtr< T > &&objPtr) | |
Move constructor. More... | |
ObjPtr (std::nullptr_t) | |
Constructor from nullptr. More... | |
ObjPtr & | operator= (const ObjPtr &rhs) |
Assignment operator. More... | |
ObjPtr & | operator= (std::nullptr_t) |
Assignment operator from nullptr. More... | |
ObjPtr & | operator= (const ObjPtr &&rhs) |
Move assignment operator. More... | |
RetrievalResult | GetRetrievalResult () |
Getter for the result of the retrieve operation that generated this object. More... | |
![]() | |
observer_ptr () | |
Default constructor. More... | |
observer_ptr (std::nullptr_t) | |
Null constructor. More... | |
template<typename W > | |
observer_ptr (const observer_ptr< W > p) | |
Copy constructor. More... | |
template<typename W > | |
observer_ptr & | operator= (const observer_ptr< W > &p) |
Assignment operator. More... | |
template<typename W > | |
observer_ptr (W *p) | |
Constructor from raw pointer. More... | |
template<typename W > | |
observer_ptr & | operator= (W *p) |
Assignment operator from raw pointer. More... | |
template<typename W > | |
observer_ptr (const std::unique_ptr< W > &p) | |
Constructor from std::unique_ptr. More... | |
template<typename W > | |
observer_ptr & | operator= (const std::unique_ptr< W > &p) |
Assignment operator from std::unique_ptr. More... | |
template<typename W > | |
observer_ptr (const std::shared_ptr< W > p) | |
Constructor from std::shared_ptr. More... | |
template<typename W > | |
observer_ptr & | operator= (const std::shared_ptr< W > &p) |
Assignment operator from std::shared_ptr. More... | |
operator bool () const | |
Conversion to boolean. More... | |
operator int () const =delete | |
template<typename W > | |
operator W* () | |
Conversion to raw pointer. More... | |
T * | get () const |
Getter for pointed address. More... | |
T * | operator-> () const |
Arrow operator. More... | |
T & | operator* () const |
Indirection operator. More... | |
Private Member Functions | |
ObjPtr (const observer_ptr< T > &&obsPtr) | |
Allow friend classes to set the observer_ptr. More... | |
Private Attributes | |
RetrievalResult | _result |
Friends | |
class | ObjectMap |
class | DataStore |
class | EventDataStore |
Class describing a pointer to an object retrieved from an ObjectMap.
This class is the return type of #ObjectMap::GetObject. It is a smart pointer to the retrieved object, storing also additional information about the result of the GetObject operation.
ObjPtr objects are constructed only in ObjectMap and derived, from the return value of a call to wrapper_cast. This is why a private move constructor from an observer_ptr is defined. There are public copy/move constructors and assignment operators to allow the user to create an ObjPtr and set it equal to another one.
|
inline |
Default constructor.
Creates a pointer pointing to nothing, with a retrieve result equal to NOTFOUND.
|
inline |
Copy constructor.
objPtr | The ObjPtr to be moved into this one. |
|
inline |
Move constructor.
objPtr | The ObjPtr to be moved into this one. |
|
inline |
Constructor from nullptr.
objPtr | The ObjPtr to be moved into this one. |
|
inlineprivate |
Allow friend classes to set the observer_ptr.
Move constructor from observer_ptr.
The constructed object has a retrieve result equal to NOTFOUND. This constructor is meant to be used for building a ObjPtr from the return value of a wrapper_cast. It is private to avoid the possibility of creating an ObjPtr with an invalid _result.
obsPtr | The observer_ptr to be moved into this one. |
|
inline |
Getter for the result of the retrieve operation that generated this object.
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |
|
private |