All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::Observable Class Referenceabstract

Abstract class to represent an observable. "Model" part of MVC component. More...

#include <Observable.h>

Inheritance diagram for te::layout::Observable:
te::layout::ItemModelObservable te::layout::OutsideModelObservable te::layout::ArrowModel te::layout::BalloonModel te::layout::EllipseModel te::layout::GridMapModel te::layout::ImageModel te::layout::ItemGroupModel te::layout::LegendModel te::layout::LineModel te::layout::MapModel te::layout::NorthModel te::layout::PaperModel te::layout::PointModel te::layout::RectangleModel te::layout::ScaleModel te::layout::TextModel te::layout::EditTemplateModel te::layout::GridSettingsModel te::layout::MapLayerChoiceModel te::layout::ObjectInspectorModel te::layout::PageSetupModel te::layout::PropertiesModel te::layout::SystematicScaleModel te::layout::TextGridSettingsModel te::layout::ToolbarModel

Public Member Functions

virtual bool addObserver (Observer *o)=0
 Adds the specified observer to the set of observers for this object. Reimplement this function in a Observable subclass to provide the model's addObserver implementation. More...
 
virtual te::gm::Envelope getBox ()=0
 Returns the bounding rectangle of the component in scene coordinates(millimeters). Starting point is llx, lly. Reimplement this function in a Observable subclass to provide the model's getBox implementation. More...
 
virtual int getHashCode ()=0
 Returns the hashcode of a MVC component. Reimplement this function in a Observable subclass to provide the model's getHashCode implementation. More...
 
virtual int getId ()=0
 Returns the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's getId implementation. More...
 
virtual std::string getName ()=0
 Method that returns the name of the MVC component. Reimplement this function in a Observable subclass to provide the model's getName implementation. More...
 
virtual te::layout::PropertiesgetProperties () const =0
 Returns the model state as properties. Reimplement this function in a Observable subclass to provide the model's getProperties implementation. More...
 
virtual te::layout::PropertiesgetPublicProperties () const =0
 Returns the model state just the public properties. Reimplement this function in a Observable subclass to provide the model's getProperties implementation. More...
 
virtual EnumTypegetType ()=0
 Returns the type of component Reimplement this function in a Observable subclass to provide the model's getType implementation. More...
 
virtual int getZValue ()=0
 Return the Z value. Reimplement this function in a Observable subclass to provide the model's getZValue implementation. More...
 
virtual bool isResizable ()=0
 Returns whether or not the component is resizable. Reimplement this function in a Observable subclass to provide the model's isResizable implementation. More...
 
virtual bool removeObserver (Observer *o)=0
 Removes an observer from the set of observers of this object. Reimplement this function in a Observable subclass to provide the model's removeObserver implementation. More...
 
virtual void setId (int id)=0
 Change the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's setId implementation. More...
 
virtual void setResizable (bool resize)=0
 Change the component state for resizable or not Reimplement this function in a Observable subclass to provide the model's setResizable implementation. More...
 
virtual void setType (EnumType *type)=0
 Change the type of component. Reimplement this function in a Observable subclass to provide the model's setType implementation. More...
 
virtual void setZValue (int zValue)=0
 The Z value decides the stacking order of drawing. Reimplement this function in a Observable subclass to provide the model's addObserver implementation. More...
 
virtual void updateProperties (te::layout::Properties *properties)=0
 Updated model state with properties. Reimplement this function in a Observable subclass to provide the model's updateProperties implementation. More...
 
virtual ~Observable (void)
 Destructor. More...
 

Protected Member Functions

virtual int calculateHashCode ()=0
 Returns a new hashcode. More...
 
virtual void notifyAll (ContextItem context)=0
 Notifies all set of observers that the state of model changed Reimplement this function in a Observable subclass to provide the model's notifyAll implementation. More...
 

Detailed Description

Abstract class to represent an observable. "Model" part of MVC component.

Definition at line 56 of file Observable.h.

Constructor & Destructor Documentation

virtual te::layout::Observable::~Observable ( void  )
inlinevirtual

Destructor.

Definition at line 63 of file Observable.h.

Member Function Documentation

virtual bool te::layout::Observable::addObserver ( Observer o)
pure virtual

Adds the specified observer to the set of observers for this object. Reimplement this function in a Observable subclass to provide the model's addObserver implementation.

Parameters
ospecified observer
Returns
true if add, false otherwise

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

Referenced by te::layout::ItemObserver::ItemObserver(), and te::layout::OutsideObserver::OutsideObserver().

virtual int te::layout::Observable::calculateHashCode ( )
protectedpure virtual

Returns a new hashcode.

Returns
hashCode

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

virtual te::gm::Envelope te::layout::Observable::getBox ( )
pure virtual

Returns the bounding rectangle of the component in scene coordinates(millimeters). Starting point is llx, lly. Reimplement this function in a Observable subclass to provide the model's getBox implementation.

Returns
bounding rectangle of the component

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

Referenced by te::layout::MapItem::MapItem(), te::layout::ObjectInspectorOutside::ObjectInspectorOutside(), te::layout::ParentItem< T >::ParentItem(), and te::layout::PropertiesOutside::PropertiesOutside().

virtual int te::layout::Observable::getHashCode ( )
pure virtual

Returns the hashcode of a MVC component. Reimplement this function in a Observable subclass to provide the model's getHashCode implementation.

Returns
hashCode

Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.

Referenced by te::layout::ItemModelObservable::addChildren(), te::layout::MenuBuilder::changePropertyValue(), te::layout::PropertiesUtils::equalsHashCode(), and te::layout::ParentItem< T >::itemChange().

virtual int te::layout::Observable::getId ( )
pure virtual

Returns the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's getId implementation.

Returns
hashCode

Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.

virtual te::layout::Properties* te::layout::Observable::getPublicProperties ( ) const
pure virtual

Returns the model state just the public properties. Reimplement this function in a Observable subclass to provide the model's getProperties implementation.

Returns
properties

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

virtual int te::layout::Observable::getZValue ( )
pure virtual

Return the Z value. Reimplement this function in a Observable subclass to provide the model's getZValue implementation.

Returns
Z value

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

virtual bool te::layout::Observable::isResizable ( )
pure virtual

Returns whether or not the component is resizable. Reimplement this function in a Observable subclass to provide the model's isResizable implementation.

Returns
true if resizable, false otherwise

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

virtual void te::layout::Observable::notifyAll ( ContextItem  context)
protectedpure virtual

Notifies all set of observers that the state of model changed Reimplement this function in a Observable subclass to provide the model's notifyAll implementation.

Parameters
contextmaintaining the drawing context of a MVC component.

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

virtual bool te::layout::Observable::removeObserver ( Observer o)
pure virtual

Removes an observer from the set of observers of this object. Reimplement this function in a Observable subclass to provide the model's removeObserver implementation.

Parameters
ospecified observer
Returns
true if remove, false otherwise

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

virtual void te::layout::Observable::setId ( int  id)
pure virtual

Change the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's setId implementation.

Parameters
idhashCode

Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.

virtual void te::layout::Observable::setResizable ( bool  resize)
pure virtual

Change the component state for resizable or not Reimplement this function in a Observable subclass to provide the model's setResizable implementation.

Parameters
resizetrue if resizable, false otherwise

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.

virtual void te::layout::Observable::setType ( EnumType type)
pure virtual

Change the type of component. Reimplement this function in a Observable subclass to provide the model's setType implementation.

Parameters
typeType of component

Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.

Referenced by te::layout::OutsideController::OutsideController().

virtual void te::layout::Observable::setZValue ( int  zValue)
pure virtual

The Z value decides the stacking order of drawing. Reimplement this function in a Observable subclass to provide the model's addObserver implementation.

Parameters
ZValue

Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.


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