| Fast CDR Version 2.3.5 Fast CDR

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

## 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.

## Member Typedef Documentation

## ◆ type

template<class T>

using type = T

## Constructor & Destructor Documentation

## ◆ external() [1/4]

template<class T>

external | ( |  | ) |

default

Default constructor.

## ◆ external() [2/4]

template<class T>

external | ( | T * | pointer,
|  | bool | locked = false )

inline noexcept

Constructor from a pointer.

## ◆ external() [3/4]

template<class T>

external | ( | std::shared_ptr< T > | pointer | ) |

inline noexcept

Constructor from a shared pointer.

## ◆ external() [4/4]

template<class T>

external | ( | const external< T > & | other | ) |

inline noexcept

Copy constructor.

## ◆ ~external()

template<class T>

~external | ( |  | ) |

default

Destructor.

## Member Function Documentation

## ◆ get() [1/2]

template<class T>

const T * get | ( |  | ) | const

inline noexcept

Get pointer.

## ◆ get() [2/2]

template<class T>

T * get | ( |  | ) |

inline noexcept

Get pointer.

## ◆ get_shared_ptr()

template<class T>

std::shared_ptr< T > get_shared_ptr | ( |  | ) |

inline noexcept

Get shared pointer.

## ◆ is_locked()

template<class T>

bool is_locked | ( |  | ) | const

inline noexcept

Checks if locked.

## ◆ lock()

template<class T>

void lock | ( |  | ) |

inline noexcept

Locks the managed object.

## ◆ operator bool()

template<class T>

operator bool | ( |  | ) | const

inline noexcept

Checks if not null.

## ◆ operator!=()

template<class T>

bool operator!= | ( | const external< T > & | other | ) | const

inline

Compares they don't manages the same object.

## ◆ operator*() [1/2]

template<class T>

const T & operator* | ( |  | ) | const

inline noexcept

Dereference object.

## ◆ operator*() [2/2]

template<class T>

T & operator* | ( |  | ) |

inline noexcept

Dereference object.

## ◆ operator->() [1/2]

template<class T>

const T * operator-> | ( |  | ) | const

inline noexcept

Dereference object member.

## ◆ operator->() [2/2]

template<class T>

T * operator-> | ( |  | ) |

inline noexcept

Dereference object member.

## ◆ operator=()

template<class T>

external< T > & operator= | ( | const external< T > & | other | ) |

inline

Assignment.

## ◆ operator==()

template<class T>

bool operator== | ( | const external< T > & | other | ) | const

inline

Compares they manage the same object or empty both.

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

- include/fastcdr/xcdr/external.hpp