Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::string_base Class Reference

Public Types

typedef size_t size_type
 
- Public Types inherited from etl::private_basic_string::string_base_statics< T >
typedef size_t size_type
 

Public Member Functions

size_type size () const
 
size_type length () const
 
bool empty () const
 
bool full () const
 
size_type capacity () const
 
size_type max_size () const
 
size_type available () const
 
ETL_DEPRECATED bool truncated () const
 
bool is_truncated () const
 
void clear_truncated ()
 Clears the 'truncated' flag.
 
void set_secure ()
 Sets the 'secure' flag to the requested state.
 
bool is_secure () const
 Gets the 'secure' state flag.
 

Protected Member Functions

 string_base (size_type max_size_)
 Constructor.
 
void set_truncated (bool status)
 Sets the 'truncated' flag.
 
 ~string_base ()
 Destructor.
 

Protected Attributes

size_type current_size
 The current number of elements in the string.
 
const size_type CAPACITY
 The maximum number of elements in the string.
 
etl::flags< uint_least8_tflags
 

Additional Inherited Members

- Static Public Attributes inherited from etl::private_basic_string::string_base_statics< T >
static ETL_CONSTANT uint_least8_t IS_TRUNCATED = etl::bit<0>::value
 
static ETL_CONSTANT uint_least8_t CLEAR_AFTER_USE = etl::bit<1>::value
 
static ETL_CONSTANT size_type npos = etl::integral_limits<size_type>::max
 

Member Function Documentation

◆ available()

size_type etl::string_base::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.

◆ capacity()

size_type etl::string_base::capacity ( ) const
inline

Returns the capacity of the string.

Returns
The capacity of the string.

◆ empty()

bool etl::string_base::empty ( ) const
inline

Checks the 'empty' state of the string.

Returns
true if empty.

◆ full()

bool etl::string_base::full ( ) const
inline

Checks the 'full' state of the string.

Returns
true if full.

◆ is_truncated()

bool etl::string_base::is_truncated ( ) const
inline

Returns whether the string was truncated by the last operation.

Returns
Whether the string was truncated by the last operation.

◆ length()

size_type etl::string_base::length ( ) const
inline

Gets the current size of the string.

Returns
The current size of the string.

◆ max_size()

size_type etl::string_base::max_size ( ) const
inline

Returns the maximum possible size of the string.

Returns
The maximum size of the string.

◆ size()

size_type etl::string_base::size ( ) const
inline

Gets the current size of the string.

Returns
The current size of the string.

◆ truncated()

ETL_DEPRECATED bool etl::string_base::truncated ( ) const
inline

Returns whether the string was truncated by the last operation. Deprecated. Use is_truncated()

Returns
Whether the string was truncated by the last operation.

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