Public Types | Public Member Functions | Private Attributes | List of all members
eprosima::fastcdr::external< T > Class Template Reference

This class template manages an external member, a member declared to be external to the storage of a type. More...

#include <external.hpp>

Public Types

using type = T
 

Public Member Functions

 external ()=default
 Default constructor. More...
 
 external (const external< T > &other) noexcept
 Copy constructor. More...
 
 external (std::shared_ptr< T > pointer) noexcept
 Constructor from a shared pointer. More...
 
 external (T *pointer, bool locked=false) noexcept
 Constructor from a pointer. More...
 
const T * get () const noexcept
 Get pointer. More...
 
T * get () noexcept
 Get pointer. More...
 
std::shared_ptr< T > get_shared_ptr () noexcept
 Get shared pointer. More...
 
bool is_locked () const noexcept
 Checks if locked. More...
 
void lock () noexcept
 Locks the managed object. More...
 
 operator bool () const noexcept
 Checks if not null. More...
 
bool operator!= (const external< T > &other) const
 Compares they don't manages the same object. More...
 
const T & operator* () const noexcept
 Dereference object. More...
 
T & operator* () noexcept
 Dereference object. More...
 
const T * operator-> () const noexcept
 Dereference object member. More...
 
T * operator-> () noexcept
 Dereference object member. More...
 
external< T > & operator= (const external< T > &other)
 Assignment. More...
 
bool operator== (const external< T > &other) const
 Compares they manage the same object or empty both. More...
 
 ~external ()=default
 Destructor. More...
 

Private Attributes

bool locked_ {false}
 
std::shared_ptr< T > pointer_
 

Detailed Description

template<class T>
class eprosima::fastcdr::external< T >

This class template manages an external member, a member declared to be external to the storage of a type.

Definition at line 29 of file external.hpp.

Member Typedef Documentation

◆ type

template<class T >
using eprosima::fastcdr::external< T >::type = T

Definition at line 33 of file external.hpp.

Constructor & Destructor Documentation

◆ external() [1/4]

template<class T >
eprosima::fastcdr::external< T >::external ( )
default

Default constructor.

◆ external() [2/4]

template<class T >
eprosima::fastcdr::external< T >::external ( T *  pointer,
bool  locked = false 
)
inlinenoexcept

Constructor from a pointer.

Definition at line 39 of file external.hpp.

◆ external() [3/4]

template<class T >
eprosima::fastcdr::external< T >::external ( std::shared_ptr< T >  pointer)
inlinenoexcept

Constructor from a shared pointer.

Definition at line 48 of file external.hpp.

◆ external() [4/4]

template<class T >
eprosima::fastcdr::external< T >::external ( const external< T > &  other)
inlinenoexcept

Copy constructor.

Definition at line 55 of file external.hpp.

◆ ~external()

template<class T >
eprosima::fastcdr::external< T >::~external ( )
default

Destructor.

Member Function Documentation

◆ get() [1/2]

template<class T >
const T* eprosima::fastcdr::external< T >::get ( ) const
inlinenoexcept

Get pointer.

Definition at line 124 of file external.hpp.

◆ get() [2/2]

template<class T >
T* eprosima::fastcdr::external< T >::get ( )
inlinenoexcept

Get pointer.

Definition at line 118 of file external.hpp.

◆ get_shared_ptr()

template<class T >
std::shared_ptr<T> eprosima::fastcdr::external< T >::get_shared_ptr ( )
inlinenoexcept

Get shared pointer.

Definition at line 130 of file external.hpp.

◆ is_locked()

template<class T >
bool eprosima::fastcdr::external< T >::is_locked ( ) const
inlinenoexcept

Checks if locked.

Definition at line 168 of file external.hpp.

◆ lock()

template<class T >
void eprosima::fastcdr::external< T >::lock ( )
inlinenoexcept

Locks the managed object.

Definition at line 174 of file external.hpp.

◆ operator bool()

template<class T >
eprosima::fastcdr::external< T >::operator bool ( ) const
inlinenoexcept

Checks if not null.

Definition at line 162 of file external.hpp.

◆ operator!=()

template<class T >
bool eprosima::fastcdr::external< T >::operator!= ( const external< T > &  other) const
inline

Compares they don't manages the same object.

Definition at line 155 of file external.hpp.

◆ operator*() [1/2]

template<class T >
const T& eprosima::fastcdr::external< T >::operator* ( ) const
inlinenoexcept

Dereference object.

Definition at line 112 of file external.hpp.

◆ operator*() [2/2]

template<class T >
T& eprosima::fastcdr::external< T >::operator* ( )
inlinenoexcept

Dereference object.

Definition at line 106 of file external.hpp.

◆ operator->() [1/2]

template<class T >
const T* eprosima::fastcdr::external< T >::operator-> ( ) const
inlinenoexcept

Dereference object member.

Definition at line 142 of file external.hpp.

◆ operator->() [2/2]

template<class T >
T* eprosima::fastcdr::external< T >::operator-> ( )
inlinenoexcept

Dereference object member.

Definition at line 136 of file external.hpp.

◆ operator=()

template<class T >
external<T>& eprosima::fastcdr::external< T >::operator= ( const external< T > &  other)
inline

Assignment.

Definition at line 70 of file external.hpp.

◆ operator==()

template<class T >
bool eprosima::fastcdr::external< T >::operator== ( const external< T > &  other) const
inline

Compares they manage the same object or empty both.

Definition at line 148 of file external.hpp.

Member Data Documentation

◆ locked_

template<class T >
bool eprosima::fastcdr::external< T >::locked_ {false}
private

Definition at line 183 of file external.hpp.

◆ pointer_

template<class T >
std::shared_ptr<T> eprosima::fastcdr::external< T >::pointer_
private

Definition at line 181 of file external.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:30