RVC::GETOBJFILTER Class Reference

Base class for object selection filter. More...

#include <rvc/getobjfilter.h>

Inheritance diagram for RVC::GETOBJFILTER:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GETOBJFILTER ()
void Clear ()
ERRVALUE GetErrValue () const
MISTRING GetMessage (TEXTID TextID=TEXTID__None) const
TEXTID GetTextID () const
bool HasSelectableSubObjects (const RVC::OBJITEM &objitem, GETOBJFILTER *pFilterProxyFor=0)
bool IsSelectable (const RVC::OBJITEM &objitem, int position=-1, GETOBJFILTER *pFilterProxyFor=0)
bool IsValidList (const RVC::OBJITEMLIST &objlist, GETOBJFILTER *pFilterProxyFor=0)
bool IsValidParent (const RVC::OBJITEM &parent, GETOBJFILTER *pFilterProxyFor=0)
void SetErrValue (ERRVALUE err)
void SetTextID (TEXTID TextID)

Private Member Functions

virtual bool v_HasSelectableSubObjects (const RVC::OBJITEM &objitem)
virtual bool v_IsSelectable (const RVC::OBJITEM &objitem, int position)
virtual bool v_IsValidList (const RVC::OBJITEMLIST &objlist)
virtual bool v_IsValidParent (const RVC::OBJITEM &parent)

Detailed Description

Base class for object selection filter.

If a filter is provided to the DlgGetObject... function the IsSelectable() method will be called when the user attempts to select an object. In addition, for the DlgGetObjects() and DlgGetObjectSet() functions, the IsValidList() method will be called when the user presses the 'OK' button. This allows the list to be checked for self-consistency (for example, to make sure all rasters have equal dimensions).


Constructor & Destructor Documentation

RVC::GETOBJFILTER::GETOBJFILTER (  ) 

Default constructor.


Member Function Documentation

void RVC::GETOBJFILTER::Clear (  )  [inline]

Clear current TEXTID and error value settings.

ERRVALUE RVC::GETOBJFILTER::GetErrValue (  )  const [inline]

Get current error value.

MISTRING RVC::GETOBJFILTER::GetMessage ( TEXTID  TextID = TEXTID__None  )  const

Get message based on the stored TEXTID and error value.

If both and error value and a TEXTID are set the error value will take precedence.

Parameters:
TextID Text ID to use for message if none previously set
TEXTID RVC::GETOBJFILTER::GetTextID (  )  const [inline]

Get current TEXTID setting.

bool RVC::GETOBJFILTER::HasSelectableSubObjects ( const RVC::OBJITEM objitem,
GETOBJFILTER pFilterProxyFor = 0 
)

Determine if has selectable subobjects.

Calls v_HasSelectableSubObjects which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.

Parameters:
objitem Object to check
pFilterProxyFor Filter this is a proxy for
bool RVC::GETOBJFILTER::IsSelectable ( const RVC::OBJITEM objitem,
int  position = -1,
GETOBJFILTER pFilterProxyFor = 0 
)

Determine if object is selectable.

Returns:
'true' if selectable, 'false' if not. Calls v_IsSelectable() which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
Parameters:
objitem Object to check
position Position of the object in the set for DlgGetObjectSet() functions.
pFilterProxyFor Filter this is a proxy for
bool RVC::GETOBJFILTER::IsValidList ( const RVC::OBJITEMLIST objlist,
GETOBJFILTER pFilterProxyFor = 0 
)

Determine if list of objects is valid and usable together.

Returns:
'true' if list is valid, 'false' if not. Calls v_IsValidList which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
Parameters:
objlist Object list to check
pFilterProxyFor Filter this is a proxy for
bool RVC::GETOBJFILTER::IsValidParent ( const RVC::OBJITEM parent,
GETOBJFILTER pFilterProxyFor = 0 
)

Determine if the "New Object" button should be enabled.

Returns:
'true' if parent is valid parent for creating object under. Calls v_IsValidPArent which can be overridden. If pFilterProxyFor is not NULL and the virtual method returns false the TextID and ErrValue will be subsequently set in the specified filter.
Parameters:
parent Parent object item
pFilterProxyFor Filter this is a proxy for
void RVC::GETOBJFILTER::SetErrValue ( ERRVALUE  err  )  [inline]

Set error value.

void RVC::GETOBJFILTER::SetTextID ( TEXTID  TextID  )  [inline]

Set the current TEXTID for this filter.

virtual bool RVC::GETOBJFILTER::v_HasSelectableSubObjects ( const RVC::OBJITEM objitem  )  [private, virtual]

Called by HasSelectableSubObjects() to determine if has selectable subobjects.

Default implementation always returns 'false'.

Parameters:
objitem Object to check

Reimplemented in RVC::DBTABLE::GETOBJFILTER_ISSELECTABLE, RVC::DBTABLE_STYLE::GETOBJFILTER_ISSELECTABLE, RVC::DBTABLE_STYLE::GETOBJFILTER_HASSTYLESUBOBJECT, RVC::NULLMASK::GETOBJFILTER_ISVALIDNULLMASK, and RVC::OPACITYMASK::GETOBJFILTER_ISVALIDOPACITYMASK.

virtual bool RVC::GETOBJFILTER::v_IsSelectable ( const RVC::OBJITEM objitem,
int  position 
) [private, virtual]

Called by IsSelectable() to determine if object is selectable.

Returns:
'true' if selectable, 'false' if not. Default implementation always returns 'true'.
Parameters:
objitem Object to check
position Position of the object in the set for DlgGetObjectSet() functions.

Reimplemented in RVC::DBTABLE::GETOBJFILTER_ISSELECTABLE, RVC::DBTABLE_STYLE::GETOBJFILTER_ISSELECTABLE, RVC::DBTABLE_STYLE::GETOBJFILTER_HASSTYLESUBOBJECT, RVC::NULLMASK::GETOBJFILTER_ISVALIDNULLMASK, RVC::OPACITYMASK::GETOBJFILTER_ISVALIDOPACITYMASK, RVC::RASTER::GETOBJFILTER_ISSELECTABLE, and RVC::RASTER::GETOBJFILTER_ISOVERLAPPING.

virtual bool RVC::GETOBJFILTER::v_IsValidList ( const RVC::OBJITEMLIST objlist  )  [private, virtual]

Called by IsValidList() to determine if list of objects is valid and usable together.

Returns:
'true' if list is valid, 'false' if not. Default implementation always returns 'true'.

Reimplemented in RVC::RASTER::GETOBJFILTER_ISSELECTABLE, and RVC::RASTER::GETOBJFILTER_ISOVERLAPPING.

virtual bool RVC::GETOBJFILTER::v_IsValidParent ( const RVC::OBJITEM parent  )  [private, virtual]

Called by IsValidParent() to determine if the "New Object" button should be enabled.

Returns:
'true' if parent is valid parent for creating object under. Default implementation always returns 'true'.

Reimplemented in RVC::DBTABLE::GETOBJFILTER_ISSELECTABLE.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:37:31 2012 for TNTsdk 2012 by  doxygen 1.6.1