Rogue Wave Views
Prototypes Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvProtoMediator Class Reference

Self-instantiating link between a 'Business Graphic Object' and its corresponding object in the application. More...

#include <ilviews/protos/grouplin.h>

Inheritance diagram for IlvProtoMediator:
IlvGroupMediator IlvAccessible IlvValueInterface

Public Member Functions

 IlvProtoMediator (IlvDisplay *d, const char *protoName, IlAny object=0)
 See below.
 
 IlvProtoMediator (IlvDisplay *display, IlvPrototype *proto, IlAny object=0)
 Constructors. More...
 
void install (IlvContainer *holder)
 See below. More...
 
void install (IlvManager *holder)
 See below. More...
 
virtual void install (IlvGraphicHolder *holder)
 Place the prototype instance in a scene. More...
 
void setPresentation (IlvGroup *g, IlBoolean refresh=IlTrue)
 Sets the presentation that will allow the user to edit the object. More...
 
- Public Member Functions inherited from IlvGroupMediator
 IlvGroupMediator (IlvGroup *presentation, IlAny object=0)
 Links an object of the application domain with its representation. More...
 
IlBoolean changeValue (const IlvValue &val)
 Changes the object's value. Both the name and the new value are contained in val. More...
 
IlBoolean changeValues (const IlvValue *values, IlUShort count)
 Updates the object when the user has changed the presentation. More...
 
void getAccessors (const IlSymbol *const **, const IlvValueTypeClass *const **, IlUInt &) const
 Returns the names of all the accessors known by this object. More...
 
const char * getName () const
 Returns the object name. More...
 
IlAny getObject () const
 Returns the object linked to the current presentation. More...
 
IlvGroupgetPresentation () const
 Returns the presentation currently linked to the object. More...
 
void lock ()
 Locks the mediator. More...
 
IlBoolean locked ()
 Guard against update loops that could occur if the representation attribute does not match the attribute of the object it represents. More...
 
IlvValuequeryValue (IlvValue &val) const
 Queries the value designated by value from the object. Both the value and the value type are stored in value. More...
 
void queryValues (IlvValue *values, IlUShort count) const
 Updates the presentation from the object values. More...
 
virtual void setObject (IlAny arg, IlBoolean refresh=IlTrue)
 Sets the object to link to the presentation. More...
 
void unlock ()
 Releases the lock. More...
 
virtual void update (const IlSymbol *const *symbs=0, IlUInt count=0)
 Synchronizes the presentation with the object values. More...
 
- Public Member Functions inherited from IlvAccessible
virtual IlUInt compareAllValues (const IlvAccessible *ref, IlvValueArray &diffs, IlBoolean any=IlFalse) const
 Compares two objects and returns the differing attributes. More...
 
virtual IlUInt compareValues (const IlvAccessible *ref, IlvValue *values, IlUShort count, IlvValueArray &diffs) const
 Compares two objects and returns the differing attributes. More...
 
virtual IlBoolean convertValues (IlvValue *v, IlUShort c, IlvDisplay *d) const
 Convert values to match the types defined by the object accessors. More...
 
IlUInt getSubscriptions (IlvAccessible *subscriber, IlSymbol **&sourceValue, IlSymbol **&subscriberValue, IlvValueTypeClass **&type, IlvValueSubscriptionMode *&mode, IlvAccessible ***subscribers=0) const
 Returns alls subscriptions made by subscriber. More...
 
virtual const IlvValueTypeClassgetValueType (const IlSymbol *s) const
 Returns the type of a given attribute. More...
 
virtual IlBoolean isOutputValue (const IlSymbol *value) const
 Indicates whether value designates an accessor that can generate notifying values. More...
 
virtual IlvValuepullValue (IlvValue &v) const
 See below.
 
virtual void pullValues (IlvValue *vals, IlUShort c) const
 Propagates value queries to the subscribers to this object. More...
 
virtual IlBoolean pushValue (const IlvValue &v) const
 See below.
 
virtual IlBoolean pushValues (const IlvValue *vals, IlUShort c) const
 Propagates value changes to the subscribers to this object. More...
 
virtual void subscribe (IlvAccessible *subscriber, IlSymbol *sourceValue, IlSymbol *subscriberValue, IlvValueTypeClass *type, IlvValueSubscriptionMode mode=IlvValueSubscriptionChange)
 Subscribes the subscriber object to the value sourceValue of this object. More...
 
virtual void unSubscribe (IlvAccessible *subscriber, IlSymbol *sourceValue=0, IlSymbol *subscriberValue=0)
 Cancels subscriptions previously made. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvAccessible
static void DeclareAccessor (const IlSymbol *attr, IlvValueTypeClass *type, const IlSymbol *const **accessors, const IlvValueTypeClass *const **types, IlUInt &count, IlBoolean checkDuplicates=IlFalse, IlAny accessorList=0)
 
static const IlvValueTypeClassGetType (IlSymbol *name)
 Returns the type instance from a name. More...
 
static IlBoolean StringToValue (const char *s, IlSymbol *type, IlvValue &v, IlvDisplay *display)
 Converts the character string s to an IlvValue with the type type. More...
 
static IlBoolean StringToValue (const char *s, const IlvValueTypeClass *typeClass, IlvValue &v, IlvDisplay *d)
 Converts the character string s to an IlvValue with the type type. More...
 
static IlBoolean ValuesAreEqual (IlvValue &v1, IlvValue &v2, IlBoolean compareNames=IlTrue)
 Compares two values. More...
 

Detailed Description

Self-instantiating link between a 'Business Graphic Object' and its corresponding object in the application.

Library: ilvproto
The IlvProtoMediator class is an IlvGroupMediator that clones a given prototype at creation. This allows you to create graphical user interfaces (GUIs) for application objects created at run time. You can create multiple graphical representations of objects of the same class, each having its own values, but sharing the same behavior.

See the samples in the views directory: samples/protos/interact_synoptic and samples/protos/synoptic for examples of use.

See also
IlvGroup, IlvGroupMediator.

Constructor & Destructor Documentation

§ IlvProtoMediator()

IlvProtoMediator::IlvProtoMediator ( IlvDisplay display,
IlvPrototype proto,
IlAny  object = 0 
)

Constructors.

These constructors create a new instance of IlvProtoMediator by instantiating the prototype proto passed as an argument and linking its clone to object, in order to represent the specific values of object in the user interface. The prototype instance implements the presentation in the user interface while object is an object of the application domain. The first constructor expects its proto argument to be of the form prlibrary.prname. It looks for a library named prlibrary in the display path, as explained in IlvPrototype and IlvLoadPrototype, then looks for a prototype named prname in that library. The second constructor instantiates the argument proto instead of searching for a library.

Parameters
displayDisplay used to initialize the presentation.
protoPrototype to be cloned.
objectReference to any kind of object of the application represented by the prototype instance.
See also
IlvProtoGraphic.

Member Function Documentation

§ install() [1/3]

void IlvProtoMediator::install ( IlvContainer holder)

See below.

Parameters
holderIlvContainer to install the group into.

§ install() [2/3]

void IlvProtoMediator::install ( IlvManager holder)

See below.

Parameters
holderIlvManager to install the group into.

§ install() [3/3]

virtual void IlvProtoMediator::install ( IlvGraphicHolder holder)
virtual

Place the prototype instance in a scene.

These methods place the prototype instance in a scene. When you add a prototype instance to a scene, you may want to change the x and y values of the prototype instance to place it in a particular place in the scene. Alternatively, you may set the centerX and centerY values, to ensure that the prototype instance is centered correctly.

Parameters
holderGraphic holder to install.

§ setPresentation()

void IlvProtoMediator::setPresentation ( IlvGroup g,
IlBoolean  refresh = IlTrue 
)
virtual

Sets the presentation that will allow the user to edit the object.

Each IlvProtoMediator instance owns its presentation (the parameter g). Therefore, the presentation is destroyed when the instance is destroyed.

Reimplemented from IlvGroupMediator.


© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.