gen.h File Reference

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

#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/txtstrm.h>
#include "wx/wfstream.h"
#include <wx/sstream.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  a2dError
 holds one error report. More...
class  a2dResolveIdInfo
 class used in a2dResolveIdList to resolve references to other objects while readin in a file. More...
union  a2dResolveIdInfo::UPtr
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  a2dNamedPropertyList
 list of a2dNamedProperty objects More...
class  a2dPropObject
 Baseclass derived from a2dObject having a a2dObjectList containing dynamic properties. More...
class  a2dBoolProperty
 property to hold a bool type variable to be associated with a a2dPropObject More...
class  a2dStringProperty
 property to hold a wxString type variable to be associated with a a2dPropObject More...
class  a2dVoidPtrProperty
 property to hold a void pointer type variable to be associated with a a2dPropObject More...
class  a2dObjectProperty
 property to hold a wxObject variable to be associated with a a2dPropObject More...
class  a2dProperty
 property to hold a a2dObjectPtr smart pointer type variable to be associated with a a2dPropObject More...
class  a2dAutoZeroProperty
 property to hold a a2dObject pointer type variable to be associated with a a2dPropObject More...
class  a2dInt16Property
 property to hold a 2 byte integer type variable to be associated with a a2dPropObject More...
class  a2dUint16Property
 property to hold an unsigned 2 byte integer type variable to be associated with a a2dPropObject More...
class  a2dInt32Property
 property to hold a 2 byte integer type variable to be associated with a a2dPropObject More...
class  a2dUint32Property
 property to hold an unsigned 4 byte integer type variable to be associated with a a2dPropObject More...
class  a2dDoubleProperty
 property to hold a double type variable to be associated with a a2dPropObject More...
class  a2dFloatProperty
 property to hold a float type variable to be associated with a a2dPropObject More...
class  a2dArrayStringProperty
 property to hold a wxArrayString type variable to be associated with a a2dPropObject More...
class  a2dFileNameProperty
 property to hold a FileName type variable to be associated with a a2dPropObject More...
class  a2dDateTimeProperty
 property to hold a wxDateTime type variable to be associated with a a2dPropObject More...
class  a2dMenuProperty
 property to hold a Menu type variable to be associated with a a2dPropObject More...
class  a2dWindowProperty
 property to hold a window type variable (for example wxTipWindow) to be associated with a a2dPropObject More...
class  a2dTipWindowProperty
 property to hold a tip window type variable to be associated with a a2dPropObject More...
class  a2dPathList
 Path searching. More...
class  a2dPathListProperty
 property to hold a FileName type variable to be associated with a a2dPropObject More...
class  a2dColourProperty
 property to hold a FileName type variable to be associated with a a2dPropObject 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  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

Defines

#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 DECLARE_PROPERTIES()
 check if class has the given id as a valid id for this object
#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 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

Enumerations

enum  a2dXmlSer_flag { a2dXmlSer_attrib, a2dXmlSer_Content }

Functions

A2DGENERALDLLEXP long wxGenNewId ()
 This function is like wxNewId, but it has its own ID set.
A2DGENERALDLLEXP void wxGenRegisterId (long id)
 see wxGenNewId(), use this to resrve a specific id
 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
 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 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_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 a2dPathListProperty
class A2DGENERALDLLEXP a2dVariablesHashBase
 wxString keys plus a2dObject pointers
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_a2dPropObjectStart
 id for a2dWalkEvent issued from within a2dWalkerIOHandler
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dPropObjectEnd
 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 distributer. 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.


Define 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 883 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;
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 378 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 56 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 61 of file gen.cpp.


Variable Documentation

file dialog was canceled

canceled file dialog

could not release canvas objects

command syntax

a document could not be created from the template

path containing aliases/variables could not be evaluated correctly

Could not load

To many documents open

ExportFile in a2dDocument

file could not be opened

File history

GetEnv failed

GetVariable failed wrong name

ImportFile in a2dDocument

ImportObject in a2dDocument

a2dIOHandler In or Out problem

Linking pins problem

Linking references problem

LoadFile in a2dDocument

Layer Load problems

LoadObject in a2dDocument

no controller set

a document template was not found

current document not set

a2dPinClass of a2dPin not found

no selection made

no tool available

Not Specified Error

current view not set

No wrapper with that name

property problems

SaveFile in a2dDocument

SaveObject in a2dDocument

SetEnv failed

to many open documents

XML parsing error

class A2DGENERALDLLEXP a2dVariablesHashBase

wxString keys plus a2dObject pointers

This holds internal variables.

Definition at line 2596 of file gen.h.

gen.h File Reference -- Tue Aug 31 18:03:15 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation