a2dWalker_FilterCanvasObjects Class Reference
[Algorithms on hierarchy in a2dDocument]

document walking to select a2dCanvasObject by filtering against several constraints. More...

#include <algos.h>

Inheritance diagram for a2dWalker_FilterCanvasObjects:

Inheritance graph
[legend]
Collaboration diagram for a2dWalker_FilterCanvasObjects:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dWalker_FilterCanvasObjects (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
 constructor with no a2dPropertyId added yet. For that use AddPropertyId()
 a2dWalker_FilterCanvasObjects (const a2dPropertyId *id, a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
 constructor with a2dPropertyId added to the propertyIsList to search for.
 a2dWalker_FilterCanvasObjects (const a2dPropertyIdList &idList, a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
 constructor with the propertyIdList to search for as input
void AddPropertyId (const a2dPropertyId *id)
 add a a2dPropertyId to the list
void Initialize ()
 used from constructors
bool Start (a2dCanvasObject *object)
void AddClassName (wxString className)
 add to classname to set of classes to be filtered.
void RemoveClassName (wxString className)
 remove this classname from set.
void SetAllowClassList (bool allow)
bool GetAllowClassList ()
void SetObjectName (const wxString &objectname=wxT(""))
 if not empty, objects must have this name
void SetUniqueSerializationId (wxInt64 id)
 if not 0, objects must have this UniqueSerializationId
void SetBoundingBox (const a2dBoundingBox &bbox)
 if valid, objects must fit in this boundingbox
void SetRecursionDepth (int depth=INT_MAX)
 how far we go into nested a2dObject's
void SetCheckLayerVisible (bool check)
 if set, layer which the object is on must be visible
void SetCheckLayerSelectable (bool check)
 if set, layer which the object is on must be selectable
void SetSkipStart (bool skip)
 if set, the start object will be skipped

Public Attributes

a2dPropertyIdList m_propertyList
 if not empty, object must have the properties in this list
a2dCanvasObjectFlagsMask m_mask
 object must fit this mask.
set< wxString > m_classnameMap
 list of classnames to be filtered
wxString m_objectname
 name for object is not empty
wxInt64 m_id
 wanted id
int m_depth
 wanted depth
a2dBoundingBox m_bbox
 object must be in this box if it the box is valid
bool m_layervisible
 if set, the layer must be visible
bool m_layerselectable
 if set, the layer must be selectable
bool m_skipStartObject
 the start object itself is not checked
bool m_allowClassList
 to negate list of classnames to be filtered

Protected Member Functions

a2dCanvasObjectList * ConvertToPolygons (a2dCanvasObject *canvasobject, bool transform)
a2dCanvasObjectList * ConvertToVpath (a2dCanvasObject *canvasobject, bool transform)
bool ObjectOke (a2dCanvasObject *obj)
 return true if object fits the filter
bool ClassOfObjectOke (a2dCanvasObject *obj)
 return true of object fits the classname filter


Detailed Description

document walking to select a2dCanvasObject by filtering against several constraints.

This is often used as base class for other algorithms. Its task is to select object that adhere to the filter properties set for this class.

Definition at line 236 of file algos.h.


Member Function Documentation

bool a2dWalker_FilterCanvasObjects::Start ( a2dCanvasObject object  ) 

start iteration here returns m_result, which value depends on derived class, and defaults to false.

Reimplemented in a2dWalker_MakeTree, a2dWalker_RemoveHierarchy, a2dWalker_LayerGroup, a2dWalker_DetectSmall, a2dWalker_DetectSmallSegments, a2dWalker_AllowedObjects, and a2dBooleanWalkerHandler.

Definition at line 405 of file algos.cpp.

void a2dWalker_FilterCanvasObjects::SetAllowClassList ( bool  allow  )  [inline]

when set, object filtered on classname are written to target ( file or layer ) Else non filtered on classname objects are written to the target.

Definition at line 269 of file algos.h.

bool a2dWalker_FilterCanvasObjects::GetAllowClassList (  )  [inline]

when set, object filtered on classname are written to target ( file or layer ) Else non filtered on classname objects are written to the target.

Definition at line 273 of file algos.h.

a2dCanvasObjectList * a2dWalker_FilterCanvasObjects::ConvertToPolygons ( a2dCanvasObject canvasobject,
bool  transform 
) [protected]

convert canvasobject to a list of polygons. But only for simple primitive objects. first a2dCanvasObject::GetAsCanvasVpaths() is used to convert to vector paths, and next the vector path is translated into polygons.

Definition at line 480 of file algos.cpp.

a2dCanvasObjectList * a2dWalker_FilterCanvasObjects::ConvertToVpath ( a2dCanvasObject canvasobject,
bool  transform 
) [protected]

convert canvasobject to a list of Vpath. But only for simple primitive objects. first a2dCanvasObject::GetAsCanvasVpaths() is used to convert to vector paths,

Definition at line 504 of file algos.cpp.


The documentation for this class was generated from the following files:
a2dWalker_FilterCanvasObjects Class Reference -- Tue Aug 31 18:37:07 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation