torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::architecture::Tiles::CharStringWrapper Class Reference

Wrapper around char* for use with the Array template. More...

#include <Tiles.hpp>

Public Member Functions

 CharStringWrapper (void)
 Null constructor. More...
 
 CharStringWrapper (const char *inString)
 Public constructor. More...
 
 ~CharStringWrapper (void)
 Non-virtual destructor. More...
 
 operator const char * (void) const
 Cast operator. More...
 
CharStringWrapperoperator= (const char *inString)
 Assignment operator. More...
 

Private Attributes

char * mString
 The char* string. More...
 

Detailed Description

Wrapper around char* for use with the Array template.

Definition at line 59 of file Tiles.hpp.

Constructor & Destructor Documentation

torc::architecture::Tiles::CharStringWrapper::CharStringWrapper ( void  )
inline

Null constructor.

Definition at line 66 of file Tiles.hpp.

66 : mString(0) {}
char * mString
The char* string.
Definition: Tiles.hpp:62
torc::architecture::Tiles::CharStringWrapper::CharStringWrapper ( const char *  inString)
inline

Public constructor.

Definition at line 68 of file Tiles.hpp.

68 : mString(strdup(inString)) {}
char * mString
The char* string.
Definition: Tiles.hpp:62
torc::architecture::Tiles::CharStringWrapper::~CharStringWrapper ( void  )
inline

Non-virtual destructor.

Definition at line 70 of file Tiles.hpp.

70 { if(mString != 0) { free(mString); mString = 0; } }
char * mString
The char* string.
Definition: Tiles.hpp:62

Member Function Documentation

torc::architecture::Tiles::CharStringWrapper::operator const char * ( void  ) const
inline

Cast operator.

Definition at line 73 of file Tiles.hpp.

73 { return mString; }
char * mString
The char* string.
Definition: Tiles.hpp:62
CharStringWrapper& torc::architecture::Tiles::CharStringWrapper::operator= ( const char *  inString)
inline

Assignment operator.

Definition at line 76 of file Tiles.hpp.

76  {
77  if(mString != 0) free(mString);
78  mString = strdup(inString);
79  return *this;
80  }
char * mString
The char* string.
Definition: Tiles.hpp:62

Field Documentation

char* torc::architecture::Tiles::CharStringWrapper::mString
private

The char* string.

Definition at line 62 of file Tiles.hpp.


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