ACE  6.1.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 (void)
 
char * operator* () const
 
char operator[] (size_t i) const
 
char * get (void) const
 
char * release (void)
 
void reset (char *p=0)
 

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 ACE_Auto_Array_Ptr<char> is your choice. The class plays the same role as auto_ptr<>

Constructor & Destructor Documentation

ACE_Auto_String_Free::ACE_Auto_String_Free ( char *  p = 0)
inlineexplicit
ACE_Auto_String_Free::ACE_Auto_String_Free ( ACE_Auto_String_Free rhs)
inline
ACE_Auto_String_Free::~ACE_Auto_String_Free ( void  )
inline

Member Function Documentation

char * ACE_Auto_String_Free::get ( void  ) const
inline
char * ACE_Auto_String_Free::operator* ( void  ) const
inline
ACE_Auto_String_Free & ACE_Auto_String_Free::operator= ( ACE_Auto_String_Free rhs)
inline
char ACE_Auto_String_Free::operator[] ( size_t  i) const
inline
char * ACE_Auto_String_Free::release ( void  )
inline
void ACE_Auto_String_Free::reset ( char *  p = 0)
inline

Member Data Documentation

char* ACE_Auto_String_Free::p_
private

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