Interface ICWFGM WeatherStation. More...
import "WeatherCom.idl";
Public Member Functions | |
HRESULT | MT_Lock ([in] unsigned short exclusive, [in] unsigned short obtain) |
HRESULT | Clone ([out]ICWFGM_WeatherStation **newWeatherStation) |
HRESULT | GetStreamCount ([out, retval]unsigned long *count) |
HRESULT | AddStream ([in]ICWFGM_WeatherStream *stream, [in]unsigned long index) |
HRESULT | RemoveStream ([in]ICWFGM_WeatherStream *stream) |
HRESULT | StreamAtIndex ([in]unsigned long index, [out, retval]ICWFGM_WeatherStream **stream) |
HRESULT | IndexOfStream ([in]ICWFGM_WeatherStream *stream, [out, retval]unsigned long *index) |
HRESULT | GetAttribute ([in]unsigned short option, [out, retval] VARIANT *value) |
HRESULT | SetAttribute ([in]unsigned short option, [in] VARIANT value) |
Properties | |
VARIANT | UserData [get, set] |
Interface ICWFGM WeatherStation.
This object maintains a collection of weather streams. A variety of streams may co-exist to provide a useful comparison of results in different scenarios. It also supports the standard COM IPersistStream, IPersistStreamInit, and IPersistStorage interfaces. Any weather stream is automatically saved with the station in order to simplify serialization operations in the client application.
ICWFGM_WeatherStation::AddStream | ( | [in] ICWFGM_WeatherStream * | stream, |
[in] unsigned long | index | ||
) |
Adds a weather stream to this weather station. This stream may be in any state (initialized, newly created, or containing data). Any calculated data in the weather stream will be marked invalid to use the location and time zone of this weather station.
stream | A weather stream object. |
index | Index (0-based) for where to insert the stream into the set. |
ICWFGM_WeatherStation::Clone | ( | [out] ICWFGM_WeatherStation ** | newWeatherStation | ) |
Creates a new weather station with all the same properties of the object being called, returns a handle to the new object in 'newWeatherStation'. Any weather streams associated with this object are also duplicated for the new station.
newWeatherStation | A weather station object. |
ICWFGM_WeatherStation::GetAttribute | ( | [in] unsigned short | option, |
[out, retval] VARIANT * | value | ||
) |
Gets the value of an "option" and saves it in the "value" variable provided.
option | The option that you want the value of (Longitude, Latitude or Elevation). Valid values are:
|
value | A pointer to a variable that you want the value to be saved in. |
ICWFGM_WeatherStation::GetStreamCount | ( | [out, retval] unsigned long * | count | ) |
Returns the number of streams associated with this weather station. Any number of streams can be associated with a given weather station and be assigned different values, options, and time ranges. However, only one stream from a station can be associated with a scenario at a given time.
count | Number of streams. |
ICWFGM_WeatherStation::IndexOfStream | ( | [in] ICWFGM_WeatherStream * | stream, |
[out, retval] unsigned long * | index | ||
) |
Returns the index of 'stream' in this station's set of streams.
stream | A weather stream object. |
index | The index of stream. |
ICWFGM_WeatherStation::MT_Lock | ( | [in] unsigned short | exclusive, |
[in] unsigned short | obtain | ||
) |
Changes the state of the object with respect to access rights. When the object is used by an active simulation, it must not be modified. When the object is somehow modified, it must be done so in an atomic action to prevent concerns with arising from multithreading. Note that these locks are primarily needed to ensure a simulation dependency is not changed while it occurs. All routines are otherwise multi-thread safe.
exclusive | TRUE if the requester wants a write lock, FALSE for read/shared access |
obtain | TRUE to obtain the lock, FALSE to release the lock. If this is FALSE, then the 'exclusive' parameter must match the initial call used to obtain the lock. |
ICWFGM_WeatherStation::RemoveStream | ( | [in] ICWFGM_WeatherStream * | stream | ) |
Removes an association between a weather stream and this weather station.
stream | A weather stream object. |
ICWFGM_WeatherStation::SetAttribute | ( | [in] unsigned short | option, |
[in] VARIANT | value | ||
) |
Sets the value of an "option" to the value of the "value" variable provided.
option | The option that you want the value of (Longitude, Latitude or Default Elevation). Valid values are:
|
value | The new value for the "option" |
ICWFGM_WeatherStation::StreamAtIndex | ( | [in] unsigned long | index, |
[out,retval] ICWFGM_WeatherStream ** | stream | ||
) |
Given an index value, returns a pointer to a specific stream associated with this station.
index | Index to a weather stream |
stream | Address to contain the specific requested weather stream. |
|
getsetproperty |
This property is unused by this object, and is available for exclusive use by the client code. It is a VARIANT value to ensure that the client code can store a pointer value (if it chooses) for use in manual subclassing this object. This value is not loaded or saved during serialization operations, and it is the responsibility of the client code to manage any value or object stored here. Access to this property is not thread-safe.
pVal | Value of UserData. |
newVal | Replacement value for UserData. |