#include <idep_namearray.h>
Public Member Functions | |
| idep_NameArray (int maxEntriesHint=0) | |
| ~idep_NameArray () | |
| int | append (const char *newName) |
| const char * | operator[] (int index) const |
| int | length () const |
Private Member Functions | |
| idep_NameArray (const idep_NameArray &) | |
| idep_NameArray & | operator= (const idep_NameArray &) |
Private Attributes | |
| char ** | d_array_p |
| int | d_size |
| int | d_length |
|
|
|
|
|
Definition at line 24 of file idep_namea.cxx. References d_array_p, and START_SIZE. 00025 : d_size(maxEntriesHint > 0 ? maxEntriesHint : START_SIZE) 00026 , d_length(0) 00027 { 00028 d_array_p = new char *[d_size]; 00029 }
|
|
|
Definition at line 31 of file idep_namea.cxx. References d_array_p. 00032 {
00033 for (int i = 0; i < d_length; ++i) {
00034 delete [] d_array_p[i];
00035 }
00036 delete [] d_array_p;
00037 }
|
|
|
Definition at line 39 of file idep_namea.cxx. References d_array_p, d_length, d_size, and newStrCpy(). Referenced by idep_LinkDep::addDependencyFile(), idep_CompileDep::addIncludeDirectory(), idep_CompileDep::addRootFile(), idep_NameIndexMap_i::insert(), and operator<<(). 00040 {
00041 if (d_length >= d_size) {
00042 int oldSize = d_size;
00043 d_size *= GROW_FACTOR;
00044 char **tmp = d_array_p;
00045 d_array_p = new char *[d_size];
00046 assert (d_array_p);
00047 memcpy (d_array_p, tmp, oldSize * sizeof *d_array_p);
00048 delete [] tmp;
00049 }
00050 assert(d_length < d_size);
00051 d_array_p[d_length++] = newStrCpy(name);
00052 return d_length - 1;
00053 }
|
|
|
Definition at line 60 of file idep_namea.cxx. Referenced by idep_LinkDep_i::calculate(), idep_CompileDep::calculate(), idep_NameIndexMap::length(), operator<<(), and search(). 00061 {
00062 return d_length;
00063 }
|
|
|
|
|
|
Definition at line 55 of file idep_namea.cxx. References d_array_p. 00056 {
00057 return i < d_length && i >= 0 ? d_array_p[i] : 0;
00058 }
|
|
|
Definition at line 11 of file idep_namearray.h. Referenced by append(), idep_NameArray(), operator[](), and ~idep_NameArray(). |
|
|
Definition at line 13 of file idep_namearray.h. Referenced by append(). |
|
|
Definition at line 12 of file idep_namearray.h. Referenced by append(). |
1.3.9.1