CharArrayArrayBeautifier Class Reference
#include <CharArrayArrayBeautifier.hpp>
List of all members.
Detailed Description
CharArrayArrayBeautifier :-)
"Arrays are evil" is an old? saying. However, in some situations we still need them. This class safely allocates a char ** array, allows one to add C-like strings to it, and so on, encapsulating problems related to direct array manipulation.
Special thanks to the author who contributed with this class.
- Author:
- Wagner Cesar Bruna (C++ & all-around Guru (in constant training))
Constructor & Destructor Documentation
CharArrayArrayBeautifier::CharArrayArrayBeautifier |
( |
int |
num_ |
) |
|
|
|
Constructs a CharArrayArrayBeautifier.
- Parameters:
-
num_ | - size of the array that will be allocated. |
|
Member Function Documentation
void CharArrayArrayBeautifier::add |
( |
const char * |
cstr |
) |
[inline] |
|
char ** CharArrayArrayBeautifier::getArray |
( |
|
) |
|
|
|
Returns the resulting array. |
char * CharArrayArrayBeautifier::newCopy |
( |
const char * |
cstr |
) |
[private] |
|
|
Copies an array.
- Parameters:
-
cstr | - The source array to be copied. |
- Returns:
- a pointer to the new allocated array/
|
void CharArrayArrayBeautifier::set |
( |
int |
i, |
|
|
const char * |
cstr |
|
) |
|
|
|
Adds another cstring to our char ** array.
- Parameters:
-
i | - the index where the string should be added. |
cstr | - the string to be added |
|
Member Data Documentation
|
number of tokens already added to the beautifier |
The documentation for this class was generated from the following files:
Generated on Mon Sep 6 16:13:10 2004 by
1.3.3