ImportedString Class Reference

Encapsulates an imported string that's come from the a v2 format file. More...

#include <impstr.h>

Inheritance diagram for ImportedString:

ListItem CCObject SimpleCCObject List of all members.

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.
CXaraFileRecordGetRecord ()
 Returns a ptr to the copy of the string record passed into the constructor.
TextCharGetFirstChar ()
 Returns a ptr to the text char passed into the constructor.

Private Member Functions

 CC_DECLARE_DYNCREATE (ImportedString)

Private Attributes

CXaraFileRecordpCopyOfStringRecord
TextCharpFirstChar

Detailed Description

Encapsulates an imported string that's come from the a v2 format file.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/8/96

Definition at line 116 of file impstr.h.


Constructor & Destructor Documentation

ImportedString::ImportedString  )  [inline]
 

Definition at line 121 of file impstr.h.

ImportedString::ImportedString TextChar pChar,
CXaraFileRecord pRecord
 

The constructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/8/96
Parameters:
pChar = ptr to a char node in the tree [INPUTS] pRecord = ptr to string record that's been imported
Returns:
-
pChar should point to a TextChar that's been inserted into the tree that contains the first character in the string.

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

Returns:
Errors: -
See also:
-

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 }

ImportedString::~ImportedString  ) 
 

The destructor It frees up the copy of the record it created at construction time.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/8/96
Parameters:
- [INPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 168 of file impstr.cpp.

00169 {
00170     if (pCopyOfStringRecord != NULL)
00171         delete pCopyOfStringRecord;
00172 }


Member Function Documentation

ImportedString::CC_DECLARE_DYNCREATE ImportedString   )  [private]
 

TextChar * ImportedString::GetFirstChar  ) 
 

Returns a ptr to the text char passed into the constructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/8/96
Parameters:
- [INPUTS]
Returns:
ptr to the text char

Errors: -

See also:
-

Definition at line 207 of file impstr.cpp.

00208 {
00209     return pFirstChar;
00210 }

CXaraFileRecord * ImportedString::GetRecord  ) 
 

Returns a ptr to the copy of the string record passed into the constructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/8/96
Parameters:
- [INPUTS]
Returns:
ptr to the string record

Errors: -

See also:
-

Definition at line 188 of file impstr.cpp.

00189 {
00190     return pCopyOfStringRecord;
00191 }


Member Data Documentation

CXaraFileRecord* ImportedString::pCopyOfStringRecord [private]
 

Definition at line 129 of file impstr.h.

TextChar* ImportedString::pFirstChar [private]
 

Definition at line 130 of file impstr.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:25 2007 for Camelot by  doxygen 1.4.4