Rogue Wave Views |
Rogue Wave Views Documentation Home |
User interface class. More...
#include <ilviews/dataccess/reposit.h>
Static Public Member Functions | |
static IliDataSource * | FindDataSource (const char *dataSourceName, IlvGraphicHolder *holder) |
Attempts to find a registered data source. More... | |
static IliDataSource * | GetDataSource (IlInt index) |
Returns a registered data source. More... | |
static IlInt | GetDataSourcesCount () |
Returns the number of data sources that are currently registered. More... | |
static IlvSymbol * | GetScopeClass (IlvContainer *cont) |
Returns the scope class assigned to the container. More... | |
static IlBoolean | IsBadLicense () |
Returns IlTrue if the license is invalid. More... | |
static void | SetScopeClass (IlvContainer *cont, IlvSymbol *scopeClass) |
Sets the scope class of one container. More... | |
static void | SubscribeToDataSource (const char *dataSourceName, IliDataSourceCallback cb, IlvGraphic *subscriber, IlAny userData) |
Subscribes the graphic object to a data source. More... | |
static void | UnSubscribeToDataSource (const char *dataSourceName, IliDataSourceCallback cb, IlvGraphic *subscriber, IlAny userData) |
Unsubscribes the graphic object from a data source. More... | |
User interface class.
Library: dataccess
The repository keeps track of all available data-sources. It can be used to find a data-source given its name or to enumerate all data-sources. For a more advanced usage, it can be used to subscribe a graphic object to a data-source. This may be useful when designing new graphic classes that need to be data-source aware.
About subscription A graphic object can subscribe itself to a data source name so that when a data source with that name becomes available, the graphic object will be notified. Similarly, if or when the data source is no longer available the graphic object will also be notified.
|
static |
Attempts to find a registered data source.
Attempts to find a registered data source according to the following rules:
name
exists in the given holder, this data source is returned. The data-source scope can be local or global. IlvContainer
and the container has been assigned a scope class (see the setScopeClass
static member function), all containers with the same scope class are considered. If a data source named name
exists in any of the containers, this data source is returned. The data-source scope can be local or global. If more than one data source matches, one is picked at random and is returned. IlvNotebook
gadget. Each notebook page contains a container.) If a data source named name
exists in any of these containers, this data source is returned. The data-source scope can be local or global. If more than one data source matches, one is picked at random and is returned. name
exists, this data source is returned. The data-source scope must be global. If more than one data source matches, one is picked at random and is returned. FindDataSource
static member function returns NULL
. dataSourceName | The data source name. |
holder | The holder. |
|
static |
Returns a registered data source.
index | The data source index. |
NULL
if the index is out of bounds.
|
static |
Returns the number of data sources that are currently registered.
|
static |
Returns the scope class assigned to the container.
Initially, the scope class of a container is NULL
.
cont | The container. |
|
static |
Returns IlTrue
if the license is invalid.
IlTrue
if the license is invalid.
|
static |
Sets the scope class of one container.
This static member function should be called before any gadgets are added to the container or else the repository subscription mechanism may not function properly.
cont | The container. |
scopeClass | The scope class, if NULL , the container is cleared from the previously set scope class. |
|
static |
Subscribes the graphic object to a data source.
When such a data source becomes available, the callback function will be invoked with the following parameters:
If the data source later goes out of scope, the callback function will be called again in the following way:
dataSourceName | The data source name. |
cb | The callback. |
subscriber | The graphic object which subscribes. |
userData | The user data. |
|
static |
Unsubscribes the graphic object from a data source.
The cb
and userData
parameter must match those that were given at subscription time. Note that if the subscriber has previously been notified of the presence of the data source then this member function will make the following call:
dataSourceName | The data source name. |
cb | The callback. |
subscriber | The graphic object which subscribes. |
userData | The user data. |
© Copyright 2015, 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.