#include <impstr.h>
Inheritance diagram for ImportedString:
Public Member Functions | |
ImportedString () | |
ImportedString (TextChar *pChar, CXaraFileRecord *pRecord) | |
The constructor. | |
~ImportedString () | |
The destructor It frees up the copy of the record it created at construction time. | |
CXaraFileRecord * | GetRecord () |
Returns a ptr to the copy of the string record passed into the constructor. | |
TextChar * | GetFirstChar () |
Returns a ptr to the text char passed into the constructor. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (ImportedString) | |
Private Attributes | |
CXaraFileRecord * | pCopyOfStringRecord |
TextChar * | pFirstChar |
Definition at line 116 of file impstr.h.
|
Definition at line 121 of file impstr.h. 00121 { pCopyOfStringRecord = NULL; pFirstChar = NULL; }
|
|
The constructor.
pRecord should point to the string record imported from the file. This constructor keeps a copy of the pChar address. It makes a copy of pRecord, so it's safe to delete pRecord after this call
Definition at line 136 of file impstr.cpp. 00137 { 00138 ERROR3IF(pChar == NULL,"pChar is NULL"); 00139 ERROR3IF(pRecord == NULL,"pRecord is NULL"); 00140 00141 pFirstChar = pChar; 00142 pCopyOfStringRecord = NULL; 00143 00144 if (pRecord != NULL) 00145 { 00146 pCopyOfStringRecord = pRecord->GetCopy(); 00147 00148 ERROR3IF(pRecord->GetTag() != TAG_TEXT_STRING,"The record is not a string record"); 00149 } 00150 }
|
|
The destructor It frees up the copy of the record it created at construction time.
Definition at line 168 of file impstr.cpp. 00169 { 00170 if (pCopyOfStringRecord != NULL) 00171 delete pCopyOfStringRecord; 00172 }
|
|
|
|
Returns a ptr to the text char passed into the constructor.
Definition at line 207 of file impstr.cpp. 00208 { 00209 return pFirstChar; 00210 }
|
|
Returns a ptr to the copy of the string record passed into the constructor.
Definition at line 188 of file impstr.cpp. 00189 { 00190 return pCopyOfStringRecord; 00191 }
|
|
|
|
|