Views
Data Access Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Static Protected Member Functions
IliRepositoryService Class Reference

Interface class. More...

#include <ilviews/dataccess/gadgets/repview.h>

Inheritance diagram for IliRepositoryService:
IliDataSourcesUsesGadget IliSQLTablesUsesGadget IliTableRepositoryGadget IliTreeRepositoryGadget

Public Member Functions

 IliRepositoryService ()
 Initializes an instance of IliRepositoryService class. More...
 
 IliRepositoryService (IlBoolean autoBuild)
 Initializes an instance of IliRepositoryService class with your auto-build flag value. More...
 
virtual void addDataSource (IliDataSource *ds)
 Called each time a valid data source has been found and must be displayed. More...
 
virtual void build ()
 Manages data source browsing. More...
 
void filterOn (IliRepositFilterOn filter)
 Defines the filter for the holder type. More...
 
void firstBuild ()
 Calls the function build if the auto-build flag is at IlTrue, otherwise it does nothing. More...
 
virtual IlvGraphicHoldergetSelectedHolder ()
 Returns the holder selected into the gadget. More...
 
const char * holderToName (IlvGraphicHolder *holder)
 Returns the holder name. More...
 
IlBoolean isAutoBuild () const
 Returns IlTrue if the auto-build flag is on. More...
 
IlBoolean isFilterOn (IliRepositFilterOn filter) const
 Returns IlTrue, if the filter is on a specific type. More...
 
IlBoolean isValidHolder (IlvGraphicHolder *, IlBoolean=IlTrue) const
 Returns IlTrue if the holder is valid. More...
 
virtual void justAfterBuild ()
 Called just after the data sources have been browsed. More...
 
virtual void justBeforeBuild ()
 Called just before data source browsing begins. More...
 
void read (IlvInputFile &input)
 Reads the data from the input file stream. More...
 
void write (IlvOutputFile &output) const
 Writes the data to an output file stream. More...
 

Static Public Member Functions

static IliHolderToNameCallback GetHolderToNameCallback ()
 Returns the callback function used to get the holder's name. More...
 
static const char * GetUntitledString (IlvDisplay *)
 Returns the string Untitled. More...
 
static void SetHolderToNameCallback (IliHolderToNameCallback cb)
 Sets the callback function used to get the holder's name. More...
 

Static Protected Member Functions

static IlvBitmapGetDataSourceBitmap (IlvDisplay *)
 Returns the bitmap of the data sources that are not global. More...
 
static IlvBitmapGetGlobalDataSourceBitmap (IlvDisplay *)
 Returns the bitmap of the data sources that are global. More...
 
static IlvBitmapGetHolderBitmap (IlvDisplay *)
 Returns the bitmap of the holders. More...
 

Detailed Description

Interface class.

Library: dbgadget

IliRepositoryService The IliRepositoryService class defines a set of functions for the following classes:

These classes are gadgets that browse the list of valid data sources and that will later display information from these data sources. The IliRepositoryService class manages the building of these gadget classes. These high-level functions concern holders, data sources, and browsing data sources.

Constructor & Destructor Documentation

◆ IliRepositoryService() [1/2]

IliRepositoryService::IliRepositoryService ( )

Initializes an instance of IliRepositoryService class.

This constructor sets the auto-build flag to IlTrue. Each gadget that inherits from this class must call the function firstBuild in its constructor code. The function firstBuild calls the functions to browse the data sources and displays the result if the auto-build flag is IlTrue.

◆ IliRepositoryService() [2/2]

IliRepositoryService::IliRepositoryService ( IlBoolean  autoBuild)

Initializes an instance of IliRepositoryService class with your auto-build flag value.

This constructor sets the auto-build flag to autoBuild. Each gadget that inherits from this class must call the function firstBuild in its constructor code. The function firstBuild calls the functions to browse the data sources and displays the result if the auto-build flag is IlTrue.

Parameters
autoBuildIf IlTrue, the auto-build mode is on.

Member Function Documentation

◆ addDataSource()

virtual void IliRepositoryService::addDataSource ( IliDataSource ds)
virtual

Called each time a valid data source has been found and must be displayed.

By default this function does nothing.

Parameters
dsThe data source.

Reimplemented in IliSQLTablesUsesGadget, IliDataSourcesUsesGadget, IliTableRepositoryGadget, and IliTreeRepositoryGadget.

◆ build()

virtual void IliRepositoryService::build ( )
virtual

Manages data source browsing.

Browsing involves the following three steps:

  • Before: calls the function justBeforeBuild.
  • During: calls the function addDataSource for each valid data source which has a valid holder.
  • After: calls the function justAfterBuild.

◆ filterOn()

void IliRepositoryService::filterOn ( IliRepositFilterOn  filter)

Defines the filter for the holder type.

There are three types of holders: Container, Composite, and Manager. This filter goes through data sources by holder type.

Parameters
filterThe filter type.

◆ firstBuild()

void IliRepositoryService::firstBuild ( )

Calls the function build if the auto-build flag is at IlTrue, otherwise it does nothing.

All gadgets inheriting from this class must call this function from its constructor.

◆ GetDataSourceBitmap()

static IlvBitmap* IliRepositoryService::GetDataSourceBitmap ( IlvDisplay )
staticprotected

Returns the bitmap of the data sources that are not global.

Returns
The bitmap.

◆ GetGlobalDataSourceBitmap()

static IlvBitmap* IliRepositoryService::GetGlobalDataSourceBitmap ( IlvDisplay )
staticprotected

Returns the bitmap of the data sources that are global.

Returns
The bitmap.

◆ GetHolderBitmap()

static IlvBitmap* IliRepositoryService::GetHolderBitmap ( IlvDisplay )
staticprotected

Returns the bitmap of the holders.

Returns
The bitmap.

◆ GetHolderToNameCallback()

static IliHolderToNameCallback IliRepositoryService::GetHolderToNameCallback ( )
static

Returns the callback function used to get the holder's name.

Returns
The callback.

◆ getSelectedHolder()

virtual IlvGraphicHolder* IliRepositoryService::getSelectedHolder ( )
virtual

Returns the holder selected into the gadget.

By default, this function returns 0.

Returns
The holder.

Reimplemented in IliSQLTablesUsesGadget, IliDataSourcesUsesGadget, IliTableRepositoryGadget, and IliTreeRepositoryGadget.

◆ GetUntitledString()

static const char* IliRepositoryService::GetUntitledString ( IlvDisplay )
static

Returns the string Untitled.

Returns
The string.

◆ holderToName()

const char* IliRepositoryService::holderToName ( IlvGraphicHolder holder)

Returns the holder name.

If a callback has been defined with the function SetHolderToNameCallback this function returns the result of the callback function.

Parameters
holderThe holder.
Returns
The name.

◆ isAutoBuild()

IlBoolean IliRepositoryService::isAutoBuild ( ) const

Returns IlTrue if the auto-build flag is on.

Returns
IlTrue if the auto-build flag is at IlTrue, otherwise returns IlFalse.

◆ isFilterOn()

IlBoolean IliRepositoryService::isFilterOn ( IliRepositFilterOn  filter) const

Returns IlTrue, if the filter is on a specific type.

Parameters
filterThe filter type.
Returns
IlTrue if the filter is on filter. Otherwise this function returns IlFalse.

◆ isValidHolder()

IlBoolean IliRepositoryService::isValidHolder ( IlvGraphicHolder ,
IlBoolean  = IlTrue 
) const

Returns IlTrue if the holder is valid.

A holder is valid if these conditions are met:

  • The holder is not null.
  • The holder and filter type are the same.
Returns
IlTrue if the holder is valid.

◆ justAfterBuild()

virtual void IliRepositoryService::justAfterBuild ( )
virtual

Called just after the data sources have been browsed.

By default this function does nothing.

Reimplemented in IliSQLTablesUsesGadget, IliDataSourcesUsesGadget, IliTableRepositoryGadget, and IliTreeRepositoryGadget.

◆ justBeforeBuild()

virtual void IliRepositoryService::justBeforeBuild ( )
virtual

Called just before data source browsing begins.

By default this function does nothing.

Reimplemented in IliSQLTablesUsesGadget, IliDataSourcesUsesGadget, IliTableRepositoryGadget, and IliTreeRepositoryGadget.

◆ read()

void IliRepositoryService::read ( IlvInputFile input)

Reads the data from the input file stream.

Parameters
inputThe input file stream.

◆ SetHolderToNameCallback()

static void IliRepositoryService::SetHolderToNameCallback ( IliHolderToNameCallback  cb)
static

Sets the callback function used to get the holder's name.

Parameters
cbThe callback.

◆ write()

void IliRepositoryService::write ( IlvOutputFile output) const

Writes the data to an output file stream.

Parameters
outputThe output file stream.