Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SafeAny::SimpleString Class Reference

#include <simple_string.hpp>

Classes

struct  String
 

Public Member Functions

const char * data () const
 
bool isSOO () const
 
bool operator!= (const SimpleString &other) const
 
bool operator< (const SimpleString &other) const
 
bool operator<= (const SimpleString &other) const
 
SimpleStringoperator= (const SimpleString &other)
 
SimpleStringoperator= (SimpleString &&other)
 
bool operator== (const SimpleString &other) const
 
bool operator> (const SimpleString &other) const
 
bool operator>= (const SimpleString &other) const
 
 SimpleString (const char *input_data)
 
 SimpleString (const char *input_data, std::size_t size)
 
 SimpleString (const SimpleString &other)
 
 SimpleString (const std::string &str)
 
 SimpleString (const std::string_view &str)
 
 SimpleString (SimpleString &&other)
 
std::size_t size () const
 
std::string toStdString () const
 
std::string_view toStdStringView () const
 
 ~SimpleString ()
 

Private Member Functions

void createImpl (const char *input_data, std::size_t size)
 

Private Attributes

union {
   struct SOO {
      uint8_t   capacity_left
 
      char   data [CAPACITY]
 
   }   soo
 
   String   str
 
_storage
 

Static Private Attributes

constexpr static std::size_t CAPACITY = 15
 
constexpr static std::size_t IS_LONG_BIT = 1 << 7
 
constexpr static std::size_t LONG_MASK = (~std::size_t(0)) >> 1
 
constexpr static std::size_t MAX_SIZE = 100UL * 1024UL * 1024UL
 

Detailed Description

Definition at line 18 of file simple_string.hpp.

Constructor & Destructor Documentation

◆ SimpleString() [1/6]

SafeAny::SimpleString::SimpleString ( const std::string &  str)
inline

Definition at line 21 of file simple_string.hpp.

◆ SimpleString() [2/6]

SafeAny::SimpleString::SimpleString ( const std::string_view &  str)
inline

Definition at line 24 of file simple_string.hpp.

◆ SimpleString() [3/6]

SafeAny::SimpleString::SimpleString ( const SimpleString other)
inline

Definition at line 27 of file simple_string.hpp.

◆ SimpleString() [4/6]

SafeAny::SimpleString::SimpleString ( SimpleString &&  other)
inline

Definition at line 37 of file simple_string.hpp.

◆ SimpleString() [5/6]

SafeAny::SimpleString::SimpleString ( const char *  input_data)
inline

Definition at line 50 of file simple_string.hpp.

◆ SimpleString() [6/6]

SafeAny::SimpleString::SimpleString ( const char *  input_data,
std::size_t  size 
)
inline

Definition at line 53 of file simple_string.hpp.

◆ ~SimpleString()

SafeAny::SimpleString::~SimpleString ( )
inline

Definition at line 58 of file simple_string.hpp.

Member Function Documentation

◆ createImpl()

void SafeAny::SimpleString::createImpl ( const char *  input_data,
std::size_t  size 
)
inlineprivate

Definition at line 161 of file simple_string.hpp.

◆ data()

const char* SafeAny::SimpleString::data ( ) const
inline

Definition at line 76 of file simple_string.hpp.

◆ isSOO()

bool SafeAny::SimpleString::isSOO ( ) const
inline

Definition at line 132 of file simple_string.hpp.

◆ operator!=()

bool SafeAny::SimpleString::operator!= ( const SimpleString other) const
inline

Definition at line 106 of file simple_string.hpp.

◆ operator<()

bool SafeAny::SimpleString::operator< ( const SimpleString other) const
inline

Definition at line 122 of file simple_string.hpp.

◆ operator<=()

bool SafeAny::SimpleString::operator<= ( const SimpleString other) const
inline

Definition at line 112 of file simple_string.hpp.

◆ operator=() [1/2]

SimpleString& SafeAny::SimpleString::operator= ( const SimpleString other)
inline

Definition at line 30 of file simple_string.hpp.

◆ operator=() [2/2]

SimpleString& SafeAny::SimpleString::operator= ( SimpleString &&  other)
inline

Definition at line 42 of file simple_string.hpp.

◆ operator==()

bool SafeAny::SimpleString::operator== ( const SimpleString other) const
inline

Definition at line 100 of file simple_string.hpp.

◆ operator>()

bool SafeAny::SimpleString::operator> ( const SimpleString other) const
inline

Definition at line 127 of file simple_string.hpp.

◆ operator>=()

bool SafeAny::SimpleString::operator>= ( const SimpleString other) const
inline

Definition at line 117 of file simple_string.hpp.

◆ size()

std::size_t SafeAny::SimpleString::size ( ) const
inline

Definition at line 88 of file simple_string.hpp.

◆ toStdString()

std::string SafeAny::SimpleString::toStdString ( ) const
inline

Definition at line 67 of file simple_string.hpp.

◆ toStdStringView()

std::string_view SafeAny::SimpleString::toStdStringView ( ) const
inline

Definition at line 71 of file simple_string.hpp.

Member Data Documentation

◆ _storage

union { ... } SafeAny::SimpleString::_storage

◆ CAPACITY

constexpr static std::size_t SafeAny::SimpleString::CAPACITY = 15
staticconstexprprivate

Definition at line 144 of file simple_string.hpp.

◆ capacity_left

uint8_t SafeAny::SimpleString::capacity_left

Definition at line 156 of file simple_string.hpp.

◆ data

char SafeAny::SimpleString::data[CAPACITY]

Definition at line 155 of file simple_string.hpp.

◆ IS_LONG_BIT

constexpr static std::size_t SafeAny::SimpleString::IS_LONG_BIT = 1 << 7
staticconstexprprivate

Definition at line 145 of file simple_string.hpp.

◆ LONG_MASK

constexpr static std::size_t SafeAny::SimpleString::LONG_MASK = (~std::size_t(0)) >> 1
staticconstexprprivate

Definition at line 146 of file simple_string.hpp.

◆ MAX_SIZE

constexpr static std::size_t SafeAny::SimpleString::MAX_SIZE = 100UL * 1024UL * 1024UL
staticconstexprprivate

Definition at line 147 of file simple_string.hpp.

◆ soo

struct { ... } ::SOO SafeAny::SimpleString::soo

◆ str

String SafeAny::SimpleString::str

Definition at line 151 of file simple_string.hpp.


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


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:19