ACE 8.0.5
Loading...
Searching...
No Matches
ACE_Auto_String_Free Class Reference

Simple class to automatically de-allocate strings. More...

#include <SString.h>

Public Member Functions

 ACE_Auto_String_Free (char *p=nullptr)
 ACE_Auto_String_Free (ACE_Auto_String_Free &rhs)
ACE_Auto_String_Freeoperator= (ACE_Auto_String_Free &rhs)
 ~ACE_Auto_String_Free ()
char * operator* () const
char operator[] (size_t i) const
 operator bool () const
char * get () const
char * release ()
void reset (char *p=nullptr)

Private Attributes

char * p_

Detailed Description

Simple class to automatically de-allocate strings.

Keeps a pointer to a string and deallocates it (using <ACE_OS::free>) on its destructor. If you need to delete using "delete[]" the std::unique_ptr<char[]> is your choice. The class plays the same role as unique_ptr<>

Constructor & Destructor Documentation

◆ ACE_Auto_String_Free() [1/2]

ACE_Auto_String_Free::ACE_Auto_String_Free ( char * p = nullptr)
inlineexplicit

◆ ACE_Auto_String_Free() [2/2]

ACE_Auto_String_Free::ACE_Auto_String_Free ( ACE_Auto_String_Free & rhs)
inline

◆ ~ACE_Auto_String_Free()

ACE_Auto_String_Free::~ACE_Auto_String_Free ( )
inline

Member Function Documentation

◆ get()

char * ACE_Auto_String_Free::get ( ) const
inline

◆ operator bool()

ACE_Auto_String_Free::operator bool ( ) const
inlineexplicit

◆ operator*()

char * ACE_Auto_String_Free::operator* ( ) const
inline

◆ operator=()

ACE_Auto_String_Free & ACE_Auto_String_Free::operator= ( ACE_Auto_String_Free & rhs)
inline

◆ operator[]()

char ACE_Auto_String_Free::operator[] ( size_t i) const
inline

◆ release()

char * ACE_Auto_String_Free::release ( )
inline

◆ reset()

void ACE_Auto_String_Free::reset ( char * p = nullptr)
inline

Member Data Documentation

◆ p_

char* ACE_Auto_String_Free::p_
private

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