rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliRepositoryService Class Reference

Interface class. More...

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

Inheritance diagram for IliRepositoryService:
IliDataSourcesUsesGadget IliSQLTablesUsesGadget IliTableRepositoryGadget IliTreeRepositoryGadget

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Static Protected Member Functions

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

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::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::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:
autoBuild If IlTrue, the auto-build mode is on.

Member Function Documentation

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:
ds The data source.

Reimplemented in IliTreeRepositoryGadget, IliTableRepositoryGadget, IliDataSourcesUsesGadget, and IliSQLTablesUsesGadget.

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.
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:
filter The filter type.
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.

static IlvBitmap* IliRepositoryService::GetDataSourceBitmap ( IlvDisplay  )  [static, protected]

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

Returns:
The bitmap.
static IlvBitmap* IliRepositoryService::GetGlobalDataSourceBitmap ( IlvDisplay  )  [static, protected]

Returns the bitmap of the data sources that are global.

Returns:
The bitmap.
static IlvBitmap* IliRepositoryService::GetHolderBitmap ( IlvDisplay  )  [static, protected]

Returns the bitmap of the holders.

Returns:
The bitmap.
static IliHolderToNameCallback IliRepositoryService::GetHolderToNameCallback (  )  [static]

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

Returns:
The callback.
virtual IlvGraphicHolder* IliRepositoryService::getSelectedHolder (  )  [virtual]

Returns the holder selected into the gadget.

By default, this function returns 0.

Returns:
The holder.

Reimplemented in IliTreeRepositoryGadget, IliTableRepositoryGadget, IliDataSourcesUsesGadget, and IliSQLTablesUsesGadget.

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

Returns the string Untitled.

Returns:
The string.
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:
holder The holder.
Returns:
The name.
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.
IlBoolean IliRepositoryService::isFilterOn ( IliRepositFilterOn  filter  )  const

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

Parameters:
filter The filter type.
Returns:
IlTrue if the filter is on filter. Otherwise this function returns IlFalse.
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.
virtual void IliRepositoryService::justAfterBuild (  )  [virtual]

Called just after the data sources have been browsed.

By default this function does nothing.

Reimplemented in IliTreeRepositoryGadget, IliTableRepositoryGadget, IliDataSourcesUsesGadget, and IliSQLTablesUsesGadget.

virtual void IliRepositoryService::justBeforeBuild (  )  [virtual]

Called just before data source browsing begins.

By default this function does nothing.

Reimplemented in IliTreeRepositoryGadget, IliTableRepositoryGadget, IliDataSourcesUsesGadget, and IliSQLTablesUsesGadget.

void IliRepositoryService::read ( IlvInputFile input  ) 

Reads the data from the input file stream.

Parameters:
input The input file stream.
static void IliRepositoryService::SetHolderToNameCallback ( IliHolderToNameCallback  cb  )  [static]

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

Parameters:
cb The callback.
void IliRepositoryService::write ( IlvOutputFile output  )  const

Writes the data to an output file stream.

Parameters:
output The output file stream.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright 2012, 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.