IlsSwDataSourceFactory
Category
Dynamic view-related class (Sever/Views integration)
Inheritance Path
IlsSwDataSourceFactory
Description
This class allows you to use subtypes of the class IliMemoryDataSource. You have to derive the IlsSwDataSourceFactory and implement the member function newInstance to return the appropriate subtype. Use the member function IlsSwDataSourceFactory::SetSingleton to set a factory.
Library
Synopsis
class IlsSwDataSourceFactory
{
public:
(IlvDisplay* d,
const IlvPoint& at,
IlvUShort thickness,
IlvPalette* palette,
const IlsString& viewName,
const IlsString& repTypeName,
const IlsString& repName);
};
Member Functions
[virtual] IliMemoryDataSource& newInstance(IlvDisplay* d,
const IlvPoint& at,
IlvUShort thickness,
IlvPalette* palette,
const IlsString& viewName,
const IlsString& repTypeName,
const IlsString& repName);
This virtual member function creates a new instance of a memory data source. The name of the view, as well as the name and type of the representation, are provided so that the type of memory data source can be chosen depending on the view that will use it.
[static] IlsSwDataSourceFactory& GetSingleton();
This static member function returns a reference to the IlsSwDataSource singleton. It creates a default factory if none was set.
[static] IlsSwDataSourceFactory* GetSingletonPtr();
This static member function returns a pointer to the current IlsSwDataSource singleton. If no singleton has been yet declared, it returns the null pointer.
[static] void SetSingleton(IlsSwDataSourceFactory* f);
This static member function sets the IlsSwDataSourceFactory to the supplied parameter. If you do not set any instances of IlsSwDataSourceFactory, the instances of IliDataSource that were read from the .ilv file are used. Otherwise, they are replaced with the ones generated by your factory.
See Also
IliDataSource (in the Rogue Wave Views/Data Access documentation)
Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.