#include "wxstlvec.h"
#include "wx/string.h"
- #if wxUSE_STD_STRING
- using std::string;
- #else
- // FIXME:: dirty!
- typedef wxString string;
- #endif
-
#endif
#ifndef ASSERT
class ScriptStream
{
protected:
- char* mpBuf;
- size_t mSize;
- size_t mCapacity;
+ char* m_pBuf;
+ size_t m_Size;
+ size_t m_Capacity;
public:
ScriptStream();
~ScriptStream();
void WriteBytes( const void* srcBuf, size_t count );
ScriptStream& operator<<( const char* str );
- ScriptStream& operator<<( const string& str );
+ ScriptStream& operator<<( const wxString& str );
ScriptStream& operator<<( char ch );
void endl();
- inline char* GetBuf() { return mpBuf; }
- inline size_t GetBufSize() { return mSize; }
+ inline char* GetBuf() { return m_pBuf; }
+ inline size_t GetBufSize() { return m_Size; }
// clears current contents of the stream
- void Reset() { mSize = 0; }
+ void Reset() { m_Size = 0; }
};
{
public:
const char* m_Name;
- int mType;
- int mOfs;
+ int m_Type;
+ int m_Ofs;
TVarInfo( const char* name, int ofs, int varType )
: m_Name(name),
- mType( varType ),
- mOfs( ofs )
+ m_Type( varType ),
+ m_Ofs( ofs )
{}
};
struct TArrayInfo : public TVarInfo
{
public:
- int mRefOfs;
- int mSizeIntOfs;
- int mObjRefTemplOfs;
+ int m_RefOfs;
+ int m_SizeIntOfs;
+ int m_ObjRefTemplOfs;
TArrayInfo( const char* name )
: TVarInfo( name, 0, TVAR_REF_ARRAY )
class ScriptTemplate
{
protected:
- // do not use string object here - parsing of
+ // do not use wxString object here - parsing of
// C string can be much faster (in debug v.)
- char* mTText;
+ char* m_TText;
- TVarListT mVars;
+ TVarListT m_Vars;
inline void PrintVar( TVarInfo* pInfo,
void* dataObj,
ScriptStream& stm );
public:
- ScriptTemplate( const string& templateText );
+ ScriptTemplate( const wxString& templateText );
virtual ~ScriptTemplate();
bool HasVar( const char* name );
// the below there members are registered to ScriptTemplate,
// GUID within the section tree (numeric)
- ScriptSection* mpParent;
- string mId; // $(ID)
- string m_Name;// $(NAME)
- string mBody; // $(BODY)
+ ScriptSection* m_pParent;
+ wxString m_Id; // $(ID)
+ wxString m_Name;// $(NAME)
+ wxString m_Body; // $(BODY)
// NULL, if this section is not aggregated anywhere
- SectListT mSubsections; // aggregated sectons
- SectListT mReferences; // registered as $(REFLIST)
+ SectListT m_Subsections; // aggregated sectons
+ SectListT m_References; // registered as $(REFLIST)
- bool mAutoHide; // see autoHide arg, in constructor
- bool mSortOn; // true, if sort subsectons by naem
+ bool m_AutoHide; // see autoHide arg, in constructor
+ bool m_SortOn; // true, if sort subsectons by naem
// tempalte for this section
- ScriptTemplate* mpSectTempl;
+ ScriptTemplate* m_pSectTempl;
// template used for links (or references) to this section
- ScriptTemplate* mpRefTempl;
+ ScriptTemplate* m_pRefTempl;
// do not call destructor of this object,
// call RemoveRef() instead
- int mRefCount;
+ int m_RefCount;
- static int mIdCounter; // generator of GUIDs
+ static int m_IdCounter; // generator of GUIDs
// fields registered and used by ScriptTemplate object
- void* mRefFirst;
- int mArrSize;
+ void* m_RefFirst;
+ int m_ArrSize;
protected:
virtual void AddRef();
// to other sections (e.g. could be usefull for autoamically
// hiding empty index-sections).
- ScriptSection( const string& name = "",
- const string& body = "",
+ ScriptSection( const wxString& name = wxEmptyString,
+ const wxString& body = wxEmptyString,
ScriptTemplate* pSectionTemplate = NULL,
ScriptTemplate* pReferenceTemplate = NULL,
bool autoHide = false,
class DocGeneratorBase
{
protected:
- MarkupTagsT mTags;
+ MarkupTagsT m_Tags;
// override this method to do some post processing
// after generation of document, or even write some
public:
DocGeneratorBase()
- : mTags(0) // no defaul script
+ : m_Tags(0) // no defaul script
{}
// dectrouctors of polymorphic classes SHOULD be virtual
virtual ~DocGeneratorBase() {}
// returns tags, being used for specific target script
- MarkupTagsT GetScriptMarkupTags() { return mTags; }
+ MarkupTagsT GetScriptMarkupTags() { return m_Tags; }
// sets tag array for specific script
// to generator's tamplates, to match the specific script
virtual void SetScriptMarkupTags( MarkupTagsT tags )
- { mTags = tags; }
+ { m_Tags = tags; }
// seves document to file starting from the root-node of
// the document (provided by GetTopSection() method),
// or from "pFromSection" if it's not NULL.
// fopenOptions arg. is string passed to fopen() method,
- // returns true, if saving was successfull
+ // returns true, if saving was successful
virtual bool SaveDocument( const char* fname,
const char* fopenOptions = "w",