ACE 8.0.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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=0)
 
 ACE_Auto_String_Free (ACE_Auto_String_Free &rhs)
 
ACE_Auto_String_Freeoperator= (ACE_Auto_String_Free &rhs)
 
 ~ACE_Auto_String_Free ()
 
charoperator* () const
 
char operator[] (size_t i) const
 
charget () const
 
charrelease ()
 
void reset (char *p=0)
 

Private Attributes

charp_
 

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 = 0)
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*()

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 = 0)
inline

Member Data Documentation

◆ p_

char* ACE_Auto_String_Free::p_
private

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