![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This abstract class represents a service offering as part of a TSLOWCResource. An offering corresponds to a specific type of remote service or inline data for that resource.
Public Types | |
enum | OfferingTypeEnum { UnknownOffering , UndefinedOffering , WMSOffering , WMTSOffering , GMLOffering } |
Public Member Functions | |
TSLOWCOffering () | |
virtual | ~TSLOWCOffering () |
virtual OfferingTypeEnum | type () const =0 |
virtual unsigned int | numStyles () const |
virtual const TSLOWCStyle * | style (unsigned int index) const |
virtual void | addStyle (TSLOWCStyle *style) |
virtual bool | activeStyle (unsigned int index) |
virtual unsigned int | activeStyle () const |
virtual void | clearStyles () |
virtual bool | readOperation (TSLOWCOperation *operation)=0 |
virtual bool | readInlineContent (TSLOWCContent *content) |
virtual bool | readExtensionData (const char *data, unsigned int dataSize) |
virtual TSLDataLayerList * | visualizeOffering (const TSLOWSContext *context, const TSLCoordinateSystem *coordSys) const =0 |
virtual bool | dataExtent (TSLEnvelope &extent, TSLCoordinateSystem *&coordinateSystem) const =0 |
virtual TSLOWSOperationList * | writeOperations (TSLOWSContext::FormatEnum format)=0 |
virtual char * | writeExtensionData (TSLOWSContext::FormatEnum format, unsigned int &length) |
virtual void | freeMemory (char *ptr)=0 |
virtual TSLOWCOffering * | create ()=0 |
Defines the service type of an offering.
Enumerator | |
---|---|
UnknownOffering | The type of the offering is unknown and not supported directly by this SDK. |
UndefinedOffering | The offering is supported by an external plugin and is not one of the built-in types. Applications can determine the offering type by using dynamic_cast in conjunction with the offering types exposed by the plugins in use. |
WMSOffering | The offering is a TSLOWCWMSOffering. |
WMTSOffering | The offering is a TSLOWCWMTSOffering. |
GMLOffering | The offering is a TSLOWCGMLOffering. |
TSLOWCOffering::TSLOWCOffering | ( | ) |
|
virtual |
|
virtual |
Returns the active style to use when visualizing this offering through a TSLOWSContextVisualizer.
If the returned value is greater than or equal to numStyles() then there is no active style.
By default the active style is determined by the TSLOWCStyle instance on the offering where isDefault() returns true. If no style is set to be the default, none of the styles on this offering will be applied during visualization unless this method is used to set one of the styles to be active.
Only a single style can be active at a time.
|
virtual |
Sets the style at the given index to be the active style when visualizing this offering through a TSLOWSContextVisualizer.
By default the active style is determined by the TSLOWCStyle instance on the offering where isDefault() returns true. If no style is set to be the default, none of the styles on this offering will be applied during visualization unless this method is used to set one of the styles to be active.
Only a single style can be active at a time.
|
virtual |
Adds a new style to the offering. The default implementation takes ownership of the style.
Derived offerings can override this method to recieve notifications of when new styles are added to the offering. Implementations should always call the base method unless the derived offering is reimplementing the storage of styles, in which case the numStyles, style and clearStyles methods must also be reimplemented.
Reimplemented in TSLOWCWMSOffering, and TSLOWCWMTSOffering.
|
virtual |
Removes all styles from the offering.
Derived offerings can override this method to recieve notifications of when styles are removed from the offering. Implementations should always call the base method unless the derived offering is reimplementing the storage of styles, in which case the numStyles, style and addStyle methods must also be reimplemented.
|
pure virtual |
This method should return a new instance of the offering type, initialised to default values.
This method is used by the TSLOWCOfferingRegister when reading context documents to create the appropriate offering class types.
Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.
|
pure virtual |
This method will be invoked as part of visualizing a context document through TSLOWSContextVisualizer::visualizeContextDocument().
Implementations should return the full extent of the data the offering represents and the coordinate system that the extent is in.
extent | This should be set to the full extent of the data represented by the offering. |
coordinateSystem | This should be set to the coordinate system that the extent is defined in. The OWS context SDK will assume ownership of the coordinate system. |
Implementations should return true if they have set the extent, or false if they cannot determine the extent of the data.
Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.
|
pure virtual |
This method will be invoked to delete memory previously returned from write ExtensionData().
Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.
|
virtual |
Returns the number of available portrayal styles defined for this offering.
|
virtual |
This method will be invoked when extension data is present on the offering. The extension data will be passed verbatim to the offering. The default implementation does nothing.
Implementations should return true if they have handled the extension data, or false otherwise.
Reimplemented in TSLOWCRasterOffering.
|
virtual |
This method will be invoked each time inline content is encountered on the offering. The default implementation does nothing.
Implementations should return true if they have taken ownership of the content object, or false if they have not.
Reimplemented in TSLOWCGMLOffering, and TSLOWCRasterOffering.
|
pure virtual |
This method will be invoked by the core parser once for each operation present on the offering. The offering should decode the contents of the operation into an easily consumable form.
Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.
|
virtual |
Returns the portrayal style for the offering at the given index.
|
pure virtual |
Returns the type of offering this represents.
Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.
|
pure virtual |
This method will be invoked by the TSLOWSContextVisualizer when visualizin a context document. Implementations should create and return a set of MapLink data layers configured to match the offering.
The OWS context SDK will assume ownership of the returned layer list and the layers contained within it.
Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.
|
virtual |
This method will be invoked when writing a context document from the information model. The offering implementation should return any extension data for the offering (as opposed to operations which are handled in write Operations) formatted according to the enumeration passed to the function for direct writing to the output stream.
The default implementation returns NULL.
|
pure virtual |
This method will be invoked when writing a context document. The implementation should return a list of populated TSLOWSOperation classes that represent the offering's operations.
Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.