MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLOWCOffering Class Referenceabstract
Inheritance diagram for TSLOWCOffering:

Detailed Description

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 TSLOWCStylestyle (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 TSLDataLayerListvisualizeOffering (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 TSLOWCOfferingcreate ()=0
 

Member Enumeration Documentation

◆ OfferingTypeEnum

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.

Constructor & Destructor Documentation

◆ TSLOWCOffering()

TSLOWCOffering::TSLOWCOffering ( )

◆ ~TSLOWCOffering()

virtual TSLOWCOffering::~TSLOWCOffering ( )
virtual

Member Function Documentation

◆ activeStyle() [1/2]

virtual unsigned int TSLOWCOffering::activeStyle ( ) const
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.

◆ activeStyle() [2/2]

virtual bool TSLOWCOffering::activeStyle ( unsigned int index)
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.

◆ addStyle()

virtual void TSLOWCOffering::addStyle ( TSLOWCStyle * style)
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.

◆ clearStyles()

virtual void TSLOWCOffering::clearStyles ( )
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.

◆ create()

virtual TSLOWCOffering * TSLOWCOffering::create ( )
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.

◆ dataExtent()

virtual bool TSLOWCOffering::dataExtent ( TSLEnvelope & extent,
TSLCoordinateSystem *& coordinateSystem ) const
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.

Parameters
extentThis should be set to the full extent of the data represented by the offering.
coordinateSystemThis 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.

◆ freeMemory()

virtual void TSLOWCOffering::freeMemory ( char * ptr)
pure virtual

This method will be invoked to delete memory previously returned from write ExtensionData().

Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.

◆ numStyles()

virtual unsigned int TSLOWCOffering::numStyles ( ) const
virtual

Returns the number of available portrayal styles defined for this offering.

◆ readExtensionData()

virtual bool TSLOWCOffering::readExtensionData ( const char * data,
unsigned int dataSize )
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.

◆ readInlineContent()

virtual bool TSLOWCOffering::readInlineContent ( TSLOWCContent * content)
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.

◆ readOperation()

virtual bool TSLOWCOffering::readOperation ( TSLOWCOperation * operation)
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.

◆ style()

virtual const TSLOWCStyle * TSLOWCOffering::style ( unsigned int index) const
virtual

Returns the portrayal style for the offering at the given index.

◆ type()

virtual OfferingTypeEnum TSLOWCOffering::type ( ) const
pure virtual

Returns the type of offering this represents.

Implemented in TSLOWCGMLOffering, TSLOWCRasterOffering, TSLOWCWMSOffering, and TSLOWCWMTSOffering.

◆ visualizeOffering()

virtual TSLDataLayerList * TSLOWCOffering::visualizeOffering ( const TSLOWSContext * context,
const TSLCoordinateSystem * coordSys ) const
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.

◆ writeExtensionData()

virtual char * TSLOWCOffering::writeExtensionData ( TSLOWSContext::FormatEnum format,
unsigned int & length )
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.

◆ writeOperations()

virtual TSLOWSOperationList * TSLOWCOffering::writeOperations ( TSLOWSContext::FormatEnum format)
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.