ConOpSys V2970  P004.07
ANVILEX control operating system
String_List.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Description : Strings object declaration
3 // Filename : Strings.h
4 //------------------------------------------------------------------------------
5 
6 #pragma once
7 
8 //--- Include files ------------------------------------------------------------
9 
10 #include "Define.h"
11 #include "AnsiString.h"
12 #include "List.h"
13 
14 //--- Class TStrings -----------------------------------------------------------
15 
16 class TStrings
17 {
18 
19  public:
20 
21  TStrings(); // Constructor
22  TStrings( TAnsiString &Text ); // Constructor
23  ~TStrings(); // Destructor
24  VOID Clear(); // Clear strings
25  VOID SetText( TAnsiString &Text ); // Set text from TAnsiString object
26  VOID SetText( CHAR *Text ); // Set text from buffer
27  VOID SetCommaText( TAnsiString &CommaText ); // Set comma separated text
28  I32 GetCount(); // Count of the strings
29  VOID Add( TAnsiString String ); // Add string and NULL object to list
30  VOID Add( TAnsiString String, VOID *Object ); // Add string and object to list
31  TAnsiString GetString( I32 Index ); // Get string by index
32  VOID *GetObject( I32 Index ); // Get object by index
33  I32 GetIndexByStringValue( TAnsiString Value ); // Get index of string by value
34  VOID Remove( I32 Index ); // Remove string and object from list
35  BOOL IsStringExists( TAnsiString Value ); // Test for string exists
36 
37  protected:
38 
39  private:
40 
41  TList *StringStorage; // Storage of the strings
42  TList *ObjectStorage; // Storage of objects
43 
44 };
45 
46 //------------------------------------------------------------------------------
47 // End of file
48 //------------------------------------------------------------------------------
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
long I32
2s Compliment 32-Bit signed integer datatype defenition
Definition: Defines.h:206
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
Definition: List.h:15
Definition: String_List.h:17
BOOL IsStringExists(TAnsiString Value)
Definition: String_List.cpp:302
~TStrings()
Definition: String_List.cpp:42
I32 GetIndexByStringValue(TAnsiString Value)
Definition: String_List.cpp:254
VOID Clear()
Definition: String_List.cpp:66
VOID SetCommaText(TAnsiString &CommaText)
Definition: String_List.cpp:155
TStrings()
Definition: String_List.cpp:18
VOID Add(TAnsiString String)
Definition: String_List.cpp:202
TList * StringStorage
Definition: String_List.h:41
I32 GetCount()
Definition: String_List.cpp:56
TAnsiString GetString(I32 Index)
Definition: String_List.cpp:228
TList * ObjectStorage
Definition: String_List.h:42
VOID * GetObject(I32 Index)
Definition: String_List.cpp:241
VOID SetText(TAnsiString &Text)
Definition: String_List.cpp:89
VOID Remove(I32 Index)
Definition: String_List.cpp:282