List of ancestors:
Desc. & Idea | Warnings | Methods | Attributes | Operators | Specials |
|
![]() |
![]() |
![]() |
![]() |
![]() |
Methods beginning with Get or Set (get/set) are usually intended to access Attributes of same name (exceptions will be marked). |
TStrList maintain a list of strings (including the order).
Public:
![]() |
uint Append(const char *Line) |
![]() |
BOOL Change(uint pos, const char *Line) |
![]() |
void Clear() |
![]() |
BOOL Delete(uint pos) |
![]() |
uint GetCount() {return Count;} |
![]() |
uint GetSerSize(BOOL subclass=FALSE) |
![]() |
uint Insert(uint pos,const char *Line) |
void Save(char *FileName) | |
void Save(FILE *outf) | |
![]() |
uint Serialize(BYTE **rawbytes,BOOL subclass=FALSE) |
![]() ![]() |
TStrList() |
![]() |
TStrList(BYTE** raw,uint length,BOOL subclass) |
![]() ![]() |
TStrList(TStrList &Pattern) |
![]() |
~TStrList() |
Protected:
BOOL Access(uint pos) |
Private:
Inserts the specified string at the end of the list..
Line....The string to be inserted.
Try to change the string at pos position. The old one is freed. If the pos is out of bounds nothing happens. The file is opened in rewrite mode. After the save the file is closed.
pos.....position, where the string should be changed
Line.....the new string
TRUE if the change was successful
FALSE if the pos was outside the bounds
Deletes all strings in the list.
Deletes the string at the specified position. All strings at higher positions are moved.
pos....the position to be deleted
TRUE....if the deletions was successful
FALSE....if the pos is out of bounds
Inserts the specified string at the specified position. All following strings are
moved. If pos is out of bounds the string is appended.
Append
pos....position the string should be inserted at
Line...the string
the position the string was inserted at
Saves the strings in the list to the specified file. Each string in the list is written
to a separate line in the file.
void Save(FILE *outf)
FileName....the name of the file
Saves the strings in the list into the specified file. Each string in the list is
written to a separate line in the file. The FILE should be opened as a text file.
void Save(char *FileName)
outf.....pointer to the opened file
Constructor. Creates an empty list.
Deserialization.TObj::TObj(BYTE** raw,uint length,BOOL
subclass)
Copy constructor. All strings are copied.
Destructor. All strings in the list are freed.
Try to set the CurIndex and the Cur at the specified position.
pos...position to be accessed
TRUE...if the access was successful
FALSE...otherwise
Public:
Protected:
Private:
Number of strings in the list. (Added empty lines are also counted.)
Pointer to a currently active item. Used to access the string.
Index of the currently selected item..
Pointer to the first item of the list..
Pointer to the last item of the list.
Public:
![]() |
char *operator [] (uint index) |
![]() |
TStrList &operator = (TStrList &Pattern) |
Protected:
Private:
Returns the string form the particular position. If the index is out of bounds empty string is returned.
index....the required position
the string on the particular position
Deletes all the existing strings and adds all strings from the pattern.
Pattern....Pattern to take the strings from.
the modified TStrList
The strings are copied not just the pointer taken.