ucommon  7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
  Fossies Dox: ucommon-7.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
ucommon::stringref< R > Class Template Reference

#include <typeref.h>

Inheritance diagram for ucommon::stringref< R >:
[legend]
Collaboration diagram for ucommon::stringref< R >:
[legend]

Public Member Functions

 stringref ()
 
 stringref (const stringref &copy)
 
 stringref (const char *str)
 
 stringref (size_t size)
 
 stringref (Counted *object)
 
void set (const char *str)
 
- Public Member Functions inherited from ucommon::typeref< const char * >
 typeref ()
 
 typeref (const typeref &copy)
 
 typeref (const char *str, TypeRelease *ar=&auto_release)
 
 typeref (size_t size, TypeRelease *ar=&auto_release)
 
 typeref (const typeref_guard &global)
 
 typeref (Counted *object)
 
 typeref (value *value)
 
const char * operator* () const
 
 operator const char * () const
 
size_t len () const
 
bool operator== (const typeref &ptr) const
 
bool operator== (const char *obj) const
 
bool operator== (value *chars) const
 
bool operator!= (const typeref &ptr) const
 
bool operator!= (value *chars) const
 
bool operator!= (const char *obj) const
 
bool operator< (const typeref &ptr) const
 
bool operator> (const typeref &ptr) const
 
bool operator<= (const typeref &ptr) const
 
bool operator>= (const typeref &ptr) const
 
typerefoperator= (const typeref &objref)
 
typerefoperator= (const char *str)
 
typerefoperator= (value *chars)
 
const typeref operator+ (const char *str) const
 
const typeref operator+ (const typeref &ptr) const
 
const char * operator() (ssize_t offset) const
 
void set (const char *str, TypeRelease *ar=&auto_release)
 
void hex (const uint8_t *mem, size_t size, TypeRelease *ar=&auto_release)
 
void b64 (const uint8_t *mem, size_t size, TypeRelease *ar=&auto_release)
 
void assign (value *chars)
 
- Public Member Functions inherited from ucommon::TypeRef
virtual ~TypeRef ()
 Destroy pointer when falling out of scope. More...
 
void set (const TypeRef &pointer)
 Set our smart pointer based on another pointer instance. More...
 
void clear (void)
 Manually release the current container. More...
 
size_t size (void) const
 Get size of referenced heap object. More...
 
unsigned copies () const
 Get number of references to container. More...
 
 operator bool () const
 Check if pointer currently has a heap container. More...
 
bool operator! () const
 Check if we are currently not pointing to anything. More...
 
bool is_released (void)
 

Static Public Member Functions

static value * create (size_t size)
 
static stringref promote (typeref< const char * > &str)
 
- Static Public Member Functions inherited from ucommon::typeref< const char * >
static void expand (value **handle, size_t size)
 
static value * create (size_t size, TypeRelease *ar=&auto_release)
 
static void destroy (value *bytes)
 
- Static Public Member Functions inherited from ucommon::TypeRef
static void put (TypeRef &target, Counted *object)
 Special weak-public means to copy a container reference. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ucommon::TypeRef
 TypeRef (Counted *object)
 Create a smart pointer referencing an existing heap object. More...
 
 TypeRef (const TypeRef &pointer)
 Create a smart pointer based on another pointer. More...
 
 TypeRef ()
 Create a smart pointer referencing nothing. More...
 
void set (Counted *object)
 Set our smart pointer to a specific heap container. More...
 
void assign (const typeref_guard &ref)
 Assign from a guarded typeref. More...
 
- Static Protected Member Functions inherited from ucommon::TypeRef
static caddr_t mem (caddr_t address)
 Adjust memory pointer to atomic boundry. More...
 
- Protected Attributes inherited from ucommon::TypeRef
Countedref
 

Detailed Description

template<TypeRelease & R>
class ucommon::stringref< R >

Definition at line 656 of file typeref.h.

Constructor & Destructor Documentation

◆ stringref() [1/5]

template<TypeRelease & R>
ucommon::stringref< R >::stringref ( )
inline

Definition at line 659 of file typeref.h.

◆ stringref() [2/5]

template<TypeRelease & R>
ucommon::stringref< R >::stringref ( const stringref< R > &  copy)
inline

Definition at line 661 of file typeref.h.

◆ stringref() [3/5]

template<TypeRelease & R>
ucommon::stringref< R >::stringref ( const char *  str)
inline

Definition at line 663 of file typeref.h.

◆ stringref() [4/5]

template<TypeRelease & R>
ucommon::stringref< R >::stringref ( size_t  size)
inline

Definition at line 665 of file typeref.h.

◆ stringref() [5/5]

template<TypeRelease & R>
ucommon::stringref< R >::stringref ( Counted object)
inlineexplicit

Definition at line 667 of file typeref.h.

Member Function Documentation

◆ create()

template<TypeRelease & R>
static value * ucommon::stringref< R >::create ( size_t  size)
inlinestatic

Definition at line 673 of file typeref.h.

References ucommon::TypeRef::size().

Referenced by ucommon::fsys::prefix(), and ucommon::Socket::readline().

Here is the call graph for this function:

◆ promote()

template<TypeRelease & R>
static stringref ucommon::stringref< R >::promote ( typeref< const char * > &  str)
inlinestatic

Definition at line 677 of file typeref.h.

References result(), and ucommon::str().

Here is the call graph for this function:

◆ set()

template<TypeRelease & R>
void ucommon::stringref< R >::set ( const char *  str)
inline

Definition at line 669 of file typeref.h.

References ucommon::typeref< T, R >::set(), and ucommon::str().

Here is the call graph for this function:

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