#include <PackString_MultipleLines.h>
Inherits PackString.
Definition at line 19 of file PackString_MultipleLines.h.
Public Types | |
enum | eVedaUpdate { eVedaUpdate_NoUpdate = 0, eVedaUpdate_MemberIsGoingToChange, eVedaUpdate_MemberChanged, eVedaUpdate_MemberChangedBecauseOfUndo, eVedaUpdate_MemberDestroyed, eVedaUpdate_ObjectNew, eVedaUpdate_ObjectDestroyed, eVedaUpdate_ObjectReCreated, eVedaUpdate_ObjectClosed, eVedaUpdate_NewRegisteredClass } |
enum used by BaseContext::NotifyObjectChange() to describe the notification meaning. Used by interfaces to monitor a context. More... | |
Public Member Functions | |
PackString_MultipleLines (void) | |
Constructor. | |
virtual | ~PackString_MultipleLines (void) |
Destructor. | |
virtual const char * | GetClassID () const |
Each BaseType's inherited classes must explicit an ID for their class, or let use one of the super class at least through this virtual method. This is needed by GUIs to detect the types of each sub-members, and shape an interface for each Object according to their member list. | |
virtual const unsigned char * | Serialize_In (const unsigned char *_pDescriptionChunk) |
Read the object description from a byte chunk. Could crash if chunk not valid. | |
virtual unsigned int | GetSerializedDescriptionSize (void) |
get the size of the whole byte chunk that will be written by Serialize_Out(). | |
virtual unsigned char * | Serialize_Out (unsigned char *_pDescriptionChunkToFill) |
write the Current object definition to a Chunk using private packed types, recursively. | |
virtual const char * | ValueToString () |
convert the value of this object to an explicit string. The object manages the string privately, so just read it or copy it. the string would be destroyed with the objects, and changed when using Set() methods. Note: this is not virtual, but each class can manage m_pValueString or not. | |
void | AddInt (int _value) |
add a int value at the end of the current chain. | |
void | AddString (const char *_pstr) |
apend a character string.. | |
virtual void | Set (const char *_pCharacterString) |
set the string value. It reallocates memory. as it is used by serialisation, it returns a pointer on the read memory AFTER the zero for convenience. This "set" is exceptionnaly compiled in non-editable mode, because it is used by serialization. | |
const char * | Get () const |
set the string value. | |
unsigned int | length () |
like strlen() | |
virtual unsigned int | WriteFile (const char *_pFileName) |
write a serialized form, using GetSerializedDescriptionSize() and Serialize_Out(). | |
virtual unsigned int | ReadFile (const char *_pFileName) |
Try to read a serialized form, using Serialize_In(). | |
virtual void | SetObjectThatManagesThis (BaseObject *_pManager) |
The Object this one belong to as a member. Should only be used at init. | |
void | SetMemberName (const char *_MemberName) |
Explicits the name of an object when used as a class member. It exists only in editable mode, and then can be used by any GUI. A member with an infoString not NULL, should be drawn in a GUI and receive updates. an object member with GetMemberName() returning NULL should not be edited by an interface or undo-managed. Use REGISTER_MEMBER macros family: it registers the members and use SetMemberName() automatically (or not, according to the compilation mode). | |
const char * | GetMemberName () const |
Explicits the name of an object when used as a class member. It exists only in editable mode, and then can be used by any GUI. A member with an infoString not NULL, should be drawn in a GUI and receive updates. an object member with GetMemberName() to NULL should not be edited by an interface or undo-managed. set with SetMemberName(). | |
void | SetMemberInfo (const char *_MemberInfo) |
Explicits the use of an object when used as a class member. It should explain what the member does for the object. It exists only in editable mode,and can be used by any GUI. Don't use html tags , only \n are allowed. Use REGISTER_MEMBER_INFO macro after the REGISTER_MEMBER macro in the constructors. It can be left NULL. | |
const char * | GetMemberInfo () const |
Explicits the use of an object when used as a class member. It exists only in editable mode and can be used by any GUI. It should explain what the member does for the object. | |
BaseObject * | GetObjectThatManagesThis () |
If there is any, get the object that manages this one as a member. | |
void | MakeCloneOf (BaseType &_ModelObject) |
Tool that makes an object take the values of another using serialization. Use with care: You got to clone a PackUlong with a PackULong, a PackString with a PackString: Clone Object of the same type or it will crash . A test is done at the beginning to check that for both types are the sames, if not it does nothing. however it may still crash with 2 objects from unherited classes. Also, some type like PackObjectReference, will not clone its value by copying a pointer.Reference member clonage is done with BaseObject::Clone(). | |
Static Public Member Functions | |
static int | Compare (const char *_pStringToCompare, const char *_pOtherStringToCompare) |
compare a string. looks like strcmp(). | |
Protected Member Functions | |
virtual void | Free () |
delete if was allocated. | |
void | BeginChangeNotification () |
In edition mode, when a member of an object is changed (like in a Set()), you got to use BeginChangeNotification(), make your changes, and then EndChangeNotification(), so that the edition of this object and member is known by the context, and allows it to manage a GUI update and the undo stack. | |
void | EndChangeNotification () |
In edition mode, when a member of an object is changed (like in a Set()), you got to use BeginChangeNotification(), make your changes, and then EndChangeNotification(), so that the edition of this object and member is known by the context, and allows it to manage a GUI update and the undo stack. | |
Static Protected Member Functions | |
static unsigned int | length (const char *_pString) |
private tool. like strlen(), but with +1 for the zero end. | |
static const char * | strcopy (char *_pStringToFill, const char *_pSourceString) |
private tool. like strcpy(), but with +1 for the zero end. as it is used by serialisation, it returns a pointer on the read memory AFTER the zero for convenience. | |
Protected Attributes | |
char * | m_StringBuffer |
the string buffer. | |
unsigned int | m_UsedByteLength |
the current m_StringBuffer used buffer. as it is zero ended, m_StringBuffer[m_UsedByteLength-1]==0 | |
unsigned int | m_TotalByteLength |
current m_StringBuffer total allocation. is multiple of m_GrowByteLength. | |
BaseObject * | m_pObjectThatManagesThis |
an object can belong (or not) to a BaseObject,( and to a BaseContext through it). | |
const char * | m_pMemberName |
If used as a member in an object, the member name, or NULL (not editable member). | |
const char * | m_pMemberInfo |
a short string explaining what's the object for in editable mode. OK if NULL (no info). | |
PackString * | m_pValueString |
a string standing for an expression of the value of the object: | |
unsigned char * | m_pPreviousValueShape |
used as a temp for object change notification in Begin/EndChangeNotification(): | |
unsigned int | m_PreviousValueShapeLength |
Static Protected Attributes | |
static const unsigned int | m_GrowByteLength = 64 |
the re-allocation constant. |
|
enum used by BaseContext::NotifyObjectChange() to describe the notification meaning. Used by interfaces to monitor a context.
Definition at line 194 of file BaseType.h. |
|
Constructor.
|
|
Destructor.
|
|
add a int value at the end of the current chain.
|
|
apend a character string..
|
|
In edition mode, when a member of an object is changed (like in a Set()), you got to use BeginChangeNotification(), make your changes, and then EndChangeNotification(), so that the edition of this object and member is known by the context, and allows it to manage a GUI update and the undo stack.
|
|
compare a string. looks like strcmp().
|
|
In edition mode, when a member of an object is changed (like in a Set()), you got to use BeginChangeNotification(), make your changes, and then EndChangeNotification(), so that the edition of this object and member is known by the context, and allows it to manage a GUI update and the undo stack.
|
|
delete if was allocated.
|
|
set the string value.
Definition at line 105 of file PackString.h. References PackString::m_StringBuffer. Referenced by MediaAccess::GetExportName(), PackResource::GetFileExtension(), PackResource::GetFilePath(), NamedObject::GetName(), and BaseObject::GetObjectInfoLine(). |
|
Each BaseType's inherited classes must explicit an ID for their class, or let use one of the super class at least through this virtual method. This is needed by GUIs to detect the types of each sub-members, and shape an interface for each Object according to their member list.
Reimplemented from PackString. Definition at line 43 of file PackString_MultipleLines.h. |
|
Explicits the use of an object when used as a class member. It exists only in editable mode and can be used by any GUI. It should explain what the member does for the object.
Definition at line 144 of file BaseType.h. References BaseType::m_pMemberInfo. |
|
Explicits the name of an object when used as a class member. It exists only in editable mode, and then can be used by any GUI. A member with an infoString not NULL, should be drawn in a GUI and receive updates. an object member with GetMemberName() to NULL should not be edited by an interface or undo-managed. set with SetMemberName().
Definition at line 123 of file BaseType.h. References BaseType::m_pMemberName. |
|
If there is any, get the object that manages this one as a member.
Definition at line 170 of file BaseType.h. References BaseType::m_pObjectThatManagesThis. |
|
get the size of the whole byte chunk that will be written by Serialize_Out().
Implements BaseType. |
|
private tool. like strlen(), but with +1 for the zero end.
|
|
like strlen()
Definition at line 118 of file PackString.h. |
|
Tool that makes an object take the values of another using serialization. Use with care: You got to clone a PackUlong with a PackULong, a PackString with a PackString: Clone Object of the same type or it will crash . A test is done at the beginning to check that for both types are the sames, if not it does nothing. however it may still crash with 2 objects from unherited classes. Also, some type like PackObjectReference, will not clone its value by copying a pointer.Reference member clonage is done with BaseObject::Clone().
|
|
Try to read a serialized form, using Serialize_In().
|
|
Read the object description from a byte chunk. Could crash if chunk not valid.
Implements BaseType. |
|
write the Current object definition to a Chunk using private packed types, recursively.
Implements BaseType. |
|
set the string value. It reallocates memory. as it is used by serialisation, it returns a pointer on the read memory AFTER the zero for convenience. This "set" is exceptionnaly compiled in non-editable mode, because it is used by serialization.
|
|
Explicits the use of an object when used as a class member. It should explain what the member does for the object. It exists only in editable mode,and can be used by any GUI. Don't use html tags , only \n are allowed. Use REGISTER_MEMBER_INFO macro after the REGISTER_MEMBER macro in the constructors. It can be left NULL.
|
|
Explicits the name of an object when used as a class member. It exists only in editable mode, and then can be used by any GUI. A member with an infoString not NULL, should be drawn in a GUI and receive updates. an object member with GetMemberName() returning NULL should not be edited by an interface or undo-managed. Use REGISTER_MEMBER macros family: it registers the members and use SetMemberName() automatically (or not, according to the compilation mode).
|
|
The Object this one belong to as a member. Should only be used at init.
Reimplemented in PackObjectReference, PackResource, PackStruct, and PackTreeCell. |
|
private tool. like strcpy(), but with +1 for the zero end. as it is used by serialisation, it returns a pointer on the read memory AFTER the zero for convenience.
|
|
convert the value of this object to an explicit string. The object manages the string privately, so just read it or copy it. the string would be destroyed with the objects, and changed when using Set() methods. Note: this is not virtual, but each class can manage m_pValueString or not.
Reimplemented from BaseType. |
|
write a serialized form, using GetSerializedDescriptionSize() and Serialize_Out().
|
|
the re-allocation constant.
Definition at line 129 of file PackString.h. |
|
a short string explaining what's the object for in editable mode. OK if NULL (no info).
Definition at line 259 of file BaseType.h. Referenced by BaseType::GetMemberInfo(). |
|
If used as a member in an object, the member name, or NULL (not editable member).
Definition at line 255 of file BaseType.h. Referenced by BaseType::GetMemberName(). |
|
an object can belong (or not) to a BaseObject,( and to a BaseContext through it).
Definition at line 251 of file BaseType.h. Referenced by BaseType::GetObjectThatManagesThis(). |
|
used as a temp for object change notification in Begin/EndChangeNotification():
Definition at line 269 of file BaseType.h. |
|
a string standing for an expression of the value of the object:
Definition at line 264 of file BaseType.h. |
|
the string buffer.
Definition at line 118 of file PackString.h. Referenced by PackString::Get(). |
|
current m_StringBuffer total allocation. is multiple of m_GrowByteLength.
Definition at line 133 of file PackString.h. |
|
the current m_StringBuffer used buffer. as it is zero ended, m_StringBuffer[m_UsedByteLength-1]==0
Definition at line 131 of file PackString.h. |
/\/\ 4 N k ! N D _______ _ __ ___ _____ ___ _ _ ____ ___________ __//___ /________ |/ / ___________\_______/ \ / _ _ \/ _ / _ / _/_/____/ _ __ / / / / / / / \ \/ / / \ \ / \\___/___/___/ ¯ _____/_____/ ______\___/_____/\________\\ \________/_ ___ __ l____\ /elD! http://www.m4nkind.com \____/