wxArt2D
Classes | Macros | Typedefs | Enumerations | Functions | Variables
gen.h File Reference

fundamental classes used by all other modules. More...

#include "wx/general/generaldef.h"
#include "wx/filename.h"
#include "wx/colour.h"
#include <wx/mstream.h>
#include "wx/general/smrtptr.h"
#include "wx/general/a2dmemmgr.h"
#include "wx/general/id.h"
#include "wx/wfstream.h"
#include <wx/sstream.h>
#include <wx/txtstrm.h>
#include "wx/xrc/xmlres.h"
#include <map>
#include <vector>
#include <wx/listimpl.cpp>
#include <wx/hashmap.h>
#include "wx/general/id.inl"
Include dependency graph for gen.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  a2dVersNo
 
class  a2dVersionInfo
 
class  a2dEvent
 
class  a2dComEvent
 see a2dComEvent More...
 
class  a2dError
 holds one error report. More...
 
class  a2dResolveIdInfo
 class used in a2dResolveIdList to resolve references to other objects while readin in a file. More...
 
class  a2dNamedPropertyList
 list of a2dNamedProperty objects More...
 
struct  a2dDynamicEventTableEntry
 
class  a2dObject
 Ref Counted base object. More...
 
class  a2dRefCount
 simple ref counted class to maintain a wxObject* as if it is a smart pointer More...
 
class  a2dRefCountList
 list for a2dRefCount Smart pointers More...
 
class  a2dNamedProperty
 (In) Visible property that can be added to Docview Objects. More...
 
class  a2dBoolProperty
 property to hold a bool type variable to be associated with a a2dObject More...
 
class  a2dStringProperty
 property to hold a wxString type variable to be associated with a a2dObject More...
 
class  a2dVoidPtrProperty
 property to hold a void pointer type variable to be associated with a a2dObject More...
 
class  a2dObjectProperty
 property to hold a wxObject variable to be associated with a a2dObject More...
 
class  a2dProperty
 property to hold a a2dObjectPtr smart pointer type variable to be associated with a a2dObject More...
 
class  a2dAutoZeroProperty
 property to hold a a2dObject pointer type variable to be associated with a a2dObject More...
 
class  a2dInt16Property
 property to hold a 2 byte integer type variable to be associated with a a2dObject More...
 
class  a2dUint16Property
 property to hold an unsigned 2 byte integer type variable to be associated with a a2dObject More...
 
class  a2dInt32Property
 property to hold a 2 byte integer type variable to be associated with a a2dObject More...
 
class  a2dUint32Property
 property to hold an unsigned 4 byte integer type variable to be associated with a a2dObject More...
 
class  a2dDoubleProperty
 property to hold a double type variable to be associated with a a2dObject More...
 
class  a2dFloatProperty
 property to hold a float type variable to be associated with a a2dObject More...
 
class  a2dArrayStringProperty
 property to hold a wxArrayString type variable to be associated with a a2dObject More...
 
class  a2dFileNameProperty
 property to hold a FileName type variable to be associated with a a2dObject More...
 
class  a2dDateTimeProperty
 property to hold a wxDateTime type variable to be associated with a a2dObject More...
 
class  a2dMenuProperty
 property to hold a Menu type variable to be associated with a a2dObject More...
 
class  a2dWindowProperty
 property to hold a window type variable (for example wxTipWindow) to be associated with a a2dObject More...
 
class  a2dTipWindowProperty
 property to hold a tip window type variable to be associated with a a2dObject More...
 
class  a2dPathList
 Path searching. More...
 
class  a2dPathListProperty
 property to hold a FileName type variable to be associated with a a2dObject More...
 
class  a2dColourProperty
 property to hold a FileName type variable to be associated with a a2dObject More...
 
class  a2dUriProperty
 property to hold a wxURI type variable to be associated with a a2dObject More...
 
class  a2dObjectList
 list of a2dObject's More...
 
class  a2dVariablesHash
 Holds internal variables to be used whereever needed. More...
 
class  a2dVariablesArray
 Holds arrayed variables, e.g. parameter lists in a command processor. More...
 
class  a2dRefMap
 class to map references to objects stored in XML, in order to make the connection later on. More...
 
class  a2dIOHandler
 a2dIOHandler takes care of loading and/or saving data. More...
 
class  a2dIOHandlerStrIn
 using a file stream for input, stream the file into a a2dDocument or other object More...
 
class  a2dIOHandlerStrOut
 using a file stream for output, stream a a2dDocument or other wxObject into a stream. More...
 
class  a2dWalkerIOHandler
 Io handler to iterate through a a2dDocument. More...
 
class  a2dMemoryCriticalSectionHelper
 

Macros

#define wxDynamicCast(obj, className)   ((className *) wxCheckDynamicCast(const_cast<className*>(static_cast<const className*>(obj)), &className::sm_class##className))
 Define wxDynamicCast so that it will give a compiler error for unrelated types.
 
#define wxStaticCast(obj, className)   ((className *)(wxObject*)(obj))
 The wxWindows 2.4.2 wxStaticCast is buggy. It evaluates its argument twice.
 
#define wxStaticCastConst(obj, className)   ((const className *)(wxObject*)(obj))
 
#define wxStaticCastNull(obj, className)   ((className *)(wxObject*)(obj))
 
#define wxStaticCastTmpl(obj, className)   ((className *)(wxObject*)(obj))
 
#define wxStaticCastNullTmpl(obj, className)   ((className *)(wxObject*)(obj))
 
#define a2dComEventHandler(func)   (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(a2dComEventFunction, &func)
 
#define EVT_COM_EVENT(func)   wx__DECLARE_EVT0( a2dEVT_COM_EVENT, a2dComEventHandler( func ))
 static wxEvtHandler for communication event
 
#define EVT_COM_EVENT_ID(id, func)   wx__DECLARE_EVT1( a2dEVT_COM_EVENT, id, a2dComEventHandler( func ))
 static wxEvtHandler for communication event with specific id.
 
#define DECLARE_PROPERTIES()
 check if class has the given id as a valid id for this object More...
 
#define INITIALIZE_PROPERTIES_BASE(classname)
 
#define INITIALIZE_PROPERTIES(classname, baseclassname)
 
#define a2dREFOBJECTPTR_KEEPALIVE   a2dObjectPtr keepalive = (this->m_refcount != 0 ? this : NULL )
 

Typedefs

typedef int a2dErrorWarningCode
 error codes generated in docview framework.
 
typedef std::map< wxString,
a2dError * > 
a2dErrorHash
 
typedef std::vector< a2dErrora2dErrorVector
 
typedef int a2dSignal
 
typedef void(wxEvtHandler::* a2dComEventFunction )(a2dComEvent &)
 
typedef a2dSmrtPtr< a2dPropertyIda2dPropertyIdPtr
 
typedef std::map< wxString,
a2dPropertyIdPtr
a2dDynamicIdMap
 
typedef a2dSmrtPtr< a2dObjecta2dObjectPtr
 smart pointer to a2dObject
 
typedef a2dAutoZeroPtr< a2dObjecta2dObjectAutoZeroPtr
 is a a2dAutoZeroPtr<a2dObject>
 
typedef a2dSmrtPtr< a2dRefCounta2dRefCountPtr
 smart pointer for a2dRefCount
 
typedef a2dSmrtPtr
< a2dNamedProperty
a2dNamedPropertyPtr
 smart pointerv to a2dNamedProperty
 
typedef a2dPropertyIdTyped
< a2dPathList,
a2dPathListProperty
a2dPropertyIdPathList
 
typedef wxStringInputStream a2dDocumentStringInputStream
 string input stream based wxStreams
 
typedef wxStringOutputStream a2dDocumentStringOutputStream
 string output stream based wxStreams
 
typedef wxInputStream a2dDocumentInputStream
 input stream based wxStreams
 
typedef wxOutputStream a2dDocumentOutputStream
 output stream based wxStreams
 
typedef const long a2dWalkEvent
 
typedef bool(* a2dObjectIOFn )(wxObject *parent, wxObject *object, a2dWalkEvent)
 a functions to store in a hash table
 
typedef wxUint16 a2dPrintWhat
 defines what to print
 

Enumerations

enum  a2dXmlSer_flag { a2dXmlSer_attrib, a2dXmlSer_Content }
 

Functions

A2DGENERALDLLEXP long wxGenNewId ()
 This function is like wxNewId, but it has its own ID set. More...
 
A2DGENERALDLLEXP void wxGenRegisterId (long id)
 see wxGenNewId(), use this to resrve a specific id More...
 
 WX_DECLARE_HASH_MAP_WITH_DECL (wxString, class a2dObject *, wxStringHash, wxStringEqual, a2dHashMapIntToObject, class A2DGENERALDLLEXP)
 This hash table is used for serialization of multiple referenced object.
 
 WX_DECLARE_HASH_MAP_WITH_DECL (wxString, wxString, wxStringHash, wxStringEqual, a2dHashMapCreateObject, class A2DGENERALDLLEXP)
 This hash table is used for creating object using a symbolic name.
 
 WX_DECLARE_LIST_WITH_DECL (a2dResolveIdInfo, a2dResolveIdList, class A2DGENERALDLLEXP)
 
A2DGENERALDLLEXP wxColour ParseSvgColour (wxString value)
 
 A2DGENERALDLLEXP_DATA (extern a2dObjectList *) wxNullRefObjectList
 define a NON a2dObjectList More...
 
 WX_DECLARE_STRING_HASH_MAP_WITH_DECL (a2dNamedProperty *, a2dVariablesHashBase, class A2DGENERALDLLEXP)
 
 WX_DECLARE_STRING_HASH_MAP (a2dObjectIOFn *, a2dIOHandlerCoupleHash)
 
wxColour A2DGENERALDLLEXP HexToColour (const wxString &hex)
 3-digit hex to wxColour
 
wxString A2DGENERALDLLEXP ColourToHex (const wxColour &colour)
 RGB to 3-digit hex.
 

Variables

class A2DGENERALDLLEXP a2dObjectList
 
class A2DGENERALDLLEXP a2dResolveIdList
 
class A2DGENERALDLLEXP a2dIOHandler
 
class A2DGENERALDLLEXP a2dRefMap
 
class A2DGENERALDLLEXP a2dWalkerIOHandler
 
class A2DGENERALDLLEXP a2dError
 
const a2dError a2dError_NoError
 
const a2dError a2dError_CommandError
 
const a2dError a2dError_NotSpecified
 
const a2dError a2dError_CanceledFileDialog
 
const a2dError a2dError_FileCouldNotOpen
 
const a2dError a2dError_CouldNotCreateDocument
 
const a2dError a2dError_NoDocTemplateRef
 
const a2dError a2dError_DocumentsOpened
 
const a2dError a2dError_SetEnv
 
const a2dError a2dError_GetEnv
 
const a2dError a2dError_GetVar
 
const a2dError a2dError_SaveFile
 
const a2dError a2dError_LoadFile
 
const a2dError a2dError_ExportFile
 
const a2dError a2dError_ImportFile
 
const a2dError a2dError_IOHandler
 
const a2dError a2dError_SaveObject
 
const a2dError a2dError_LoadObject
 
const a2dError a2dError_FileHistory
 
const a2dError a2dError_ImportObject
 
const a2dError a2dError_XMLparse
 
const a2dError a2dError_FileVersion
 
const a2dError a2dError_LoadLayers
 
const a2dError a2dError_property
 
const a2dError a2dError_NoView
 
const a2dError a2dError_NoDocument
 
const a2dError a2dError_NoController
 
const a2dError a2dError_NoTool
 
const a2dError a2dError_LinkRef
 
const a2dError a2dError_NoWrapper
 
const a2dError a2dError_LinkPin
 
const a2dError a2dError_NoPinClass
 
const a2dError a2dError_CouldNotEvaluatePath
 
const a2dError a2dError_Canceled
 
const a2dError a2dError_CouldNotLoad
 
const a2dError a2dError_NoSelection
 
const a2dError a2dError_ToManyOpen
 
const a2dError a2dError_canvasObjectRelease
 
class A2DGENERALDLLEXP a2dObject
 
class A2DGENERALDLLEXP a2dHashMapIntToObject
 
class A2DGENERALDLLEXP a2dHashMapIntToObject_wxImplementation_HashTable
 
class A2DGENERALDLLEXP a2dHashMapIntToObject_wxImplementation_KeyEx
 
class A2DGENERALDLLEXP a2dHashMapCreateObject
 
class A2DGENERALDLLEXP a2dHashMapCreateObject_wxImplementation_HashTable
 
class A2DGENERALDLLEXP a2dHashMapCreateObject_wxImplementation_KeyEx
 
class A2DGENERALDLLEXP a2dNamedProperty
 
class A2DGENERALDLLEXP a2dNamedPropertyList
 
class A2DGENERALDLLEXP a2dPathListProperty
 
class A2DGENERALDLLEXP a2dVariablesHashBase
 wxString keys plus a2dObject pointers More...
 
class A2DGENERALDLLEXP a2dVariablesHashBase_wxImplementation_HashTable
 
class A2DGENERALDLLEXP a2dVariablesHashBase_wxImplementation_KeyEx
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dObjectStart
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dObjectEnd
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dPropertyStart
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dPropertyEnd
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyListStart
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyListEnd
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyStart
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyEnd
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectStart
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectProperties
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectPreChild
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectPostChild
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectEnd
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dDerivedCanvasObjectStart
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dDerivedCanvasObjectEnd
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
 
class A2DGENERALDLLEXP a2dIOHandlerCoupleHash
 
class A2DGENERALDLLEXP a2dIOHandlerCoupleHash_wxImplementation_HashTable
 
class A2DGENERALDLLEXP a2dIOHandlerCoupleHash_wxImplementation_KeyEx
 

Detailed Description

fundamental classes used by all other modules.

In here the reference counted a2dObject and a derived object which can have properties attached to it. Save and Load for serialisation is part of this object. The basic type properties classes are here. The a2dComEvent for communicating events in between classes using an event. At last base classes for the serialisation of documents to files or just algorithms performed on documents. For all in and output of a document a2dIOHandler is the base.

Author
Klaas Holwerda

Copyright: 2001-2004 (c) Klaas Holwerda

Licence: wxWidgets Licence

RCS-ID:

Id:
gen.h,v 1.81 2009/07/15 21:23:43 titato Exp

Definition in file gen.h.

Macro Definition Documentation

#define a2dREFOBJECTPTR_KEEPALIVE   a2dObjectPtr keepalive = (this->m_refcount != 0 ? this : NULL )

we must check this->m_refcount != 0 before keepalive = this keepalive used in ProcessEvent, maybe in destuctor a2dObject where m_refcount already 0, so destructor is called second time when is destroing keepalive

Definition at line 1631 of file gen.h.

#define DECLARE_PROPERTIES ( )
Value:
static bool InitializePropertyIds();\
static a2dDynamicIdMap& GetPropertyIdMap();\
static bool AddPropertyId( a2dPropertyId *dynproperty );\
virtual bool HasPropertyId( const a2dPropertyId* id ) const;\
virtual a2dPropertyId* HasPropertyId( const wxString& name );\
virtual const a2dNamedProperty* FindProperty( const wxString &idName ) const;\
virtual void CollectProperties2( a2dNamedPropertyList *total, const a2dPropertyId *id = NULL, a2dPropertyId::Flags flags = a2dPropertyId::flag_none ) const;\
private:\
static a2dDynamicIdMap sm_dymPropIds;
(In) Visible property that can be added to Docview Objects.
Definition: gen.h:1785
Flags
Flags for property ids.
Definition: id.h:158
list of a2dNamedProperty objects
Definition: gen.h:804
no special flags set
Definition: id.h:161
This is the base class for all kinds of property id&#39;s for a2dObject.
Definition: id.h:154

check if class has the given id as a valid id for this object

The id hashlist for the class and base class etc. is checked for the given id.

Definition at line 835 of file gen.h.

Function Documentation

A2DGENERALDLLEXP_DATA ( extern a2dObjectList )

define a NON a2dObjectList

Even if a wxDocviewObject has no properties, still its Length can be asked for.

A2DGENERALDLLEXP long wxGenNewId ( )

This function is like wxNewId, but it has its own ID set.

wxNewId is used for menu command ids and frequently the same number space is used for menu ids and control/window ids. As window/control ids are limited to 15 bit in MSW, they should not be used for other stuff (like canvas object IDs)

Definition at line 92 of file gen.cpp.

A2DGENERALDLLEXP void wxGenRegisterId ( long  id)

see wxGenNewId(), use this to resrve a specific id

An id of a specific value is allocated. new wxGenNewId() generated id's after this will be incremented from this id.

Definition at line 97 of file gen.cpp.

Variable Documentation

const a2dError a2dError_Canceled

file dialog was canceled

const a2dError a2dError_CanceledFileDialog

canceled file dialog

const a2dError a2dError_canvasObjectRelease

could not release canvas objects

const a2dError a2dError_CommandError

command syntax

const a2dError a2dError_CouldNotCreateDocument

a document could not be created from the template

const a2dError a2dError_CouldNotEvaluatePath

path containing aliases/variables could not be evaluated correctly

const a2dError a2dError_CouldNotLoad

Could not load

const a2dError a2dError_DocumentsOpened

To many documents open

const a2dError a2dError_ExportFile

ExportFile in a2dDocument

const a2dError a2dError_FileCouldNotOpen

file could not be opened

const a2dError a2dError_FileHistory

File history

const a2dError a2dError_FileVersion

version of file not for this version of application

const a2dError a2dError_GetEnv

GetEnv failed

const a2dError a2dError_GetVar

GetVariable failed wrong name

const a2dError a2dError_ImportFile

ImportFile in a2dDocument

const a2dError a2dError_ImportObject

ImportObject in a2dDocument

const a2dError a2dError_IOHandler

a2dIOHandler In or Out problem

const a2dError a2dError_LinkPin

Linking pins problem

const a2dError a2dError_LinkRef

Linking references problem

const a2dError a2dError_LoadFile

LoadFile in a2dDocument

const a2dError a2dError_LoadLayers

Layer Load problems

const a2dError a2dError_LoadObject

LoadObject in a2dDocument

const a2dError a2dError_NoController

no controller set

const a2dError a2dError_NoDocTemplateRef

a document template was not found

const a2dError a2dError_NoDocument

current document not set

const a2dError a2dError_NoPinClass

a2dPinClass of a2dPin not found

const a2dError a2dError_NoSelection

no selection made

const a2dError a2dError_NoTool

no tool available

const a2dError a2dError_NotSpecified

Not Specified Error

const a2dError a2dError_NoView

current view not set

const a2dError a2dError_NoWrapper

No wrapper with that name

const a2dError a2dError_property

property problems

const a2dError a2dError_SaveFile

SaveFile in a2dDocument

const a2dError a2dError_SaveObject

SaveObject in a2dDocument

const a2dError a2dError_SetEnv

SetEnv failed

const a2dError a2dError_ToManyOpen

to many open documents

const a2dError a2dError_XMLparse

XML parsing error

class A2DGENERALDLLEXP a2dVariablesHashBase

wxString keys plus a2dObject pointers

This holds internal variables.

Definition at line 3205 of file gen.h.

gen.h File Reference -- Sun Oct 12 2014 17:04:27 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation