Main Page Alphabetical List Compound List File List Compound Members File Members
GATTimePeriod.c File ReferenceMain file for the GATTimePeriod class.
More...
#include <string.h>
#include <stdlib.h>
#include "GATErrors.h"
#include "GATInternal.h"
#include "GATTime.h"
#include "GATTimePeriod.h"
#include "GATXdsWrapper.h"
Include dependency graph for GATTimePeriod.c:
Go to the source code of this file.
|
Compounds |
| struct | GATTimePeriod_S |
Functions |
| | GATOBJECT_DEFINE_VTABLE (GATTimePeriod) |
| | GATSERIALISABLE_DEFINE_VTABLE (GATTimePeriod) |
| | GATOBJECT_DEFINE_CONVERTERS (GATTimePeriod) |
| GATResult | GATTimePeriod_DeSerialise_Create (GATContext context, GATObject stream, GATdouble64 duration, GATTimePeriod *new_object) |
| | GATTimePeriod_DeSerialise_Create.
|
| GATResult | GATTimePeriod_Register_GATSerialisable (void) |
| | GATTimePeriod_Register_GATSerialisable The GATTimePeriod_Register_GATSerialisable function registers the serialization vtable with the GAT engine to allow generic object creation.
|
| GATTimePeriod | GATTimePeriod_Create (GATdouble64 duration) |
| | GATTimePeriod_Create Create a new GATTimePeriod object.
|
| GATTimePeriod | GATTimePeriod_Create_Difference (GATTime start, GATTime end) |
| | GATTimePeriod_Create_Difference Create a new GATTimePeriod object.
|
| void | GATTimePeriod_Destroy (GATTimePeriod *object) |
| | void GATTimePeriod_Destroy(GATTimePeriod *resource)
|
| GATResult | GATTimePeriod_Equals (GATTimePeriod_const lhs, GATTimePeriod_const that, GATBool *isequal) |
| | GATTimePeriod_Equals Compare two GATTimePeriod objects.
|
| GATType | GATTimePeriod_GetType (GATTimePeriod_const this) |
| | GATType GATTimePeriod_GetType(GATTimePeriod_const resource) Return the type of the GATTimePeriod.
|
| GATResult | GATTimePeriod_Clone (GATTimePeriod_const object, GATTimePeriod *thisClone) |
| | GATTimePeriod_Clone Clone the given GATTimePeriod.
|
| GATResult | GATTimePeriod_GetInterface (GATTimePeriod_const object, GATInterface iftype, void const **ifp) |
| | GATResult GATTimePeriod_GetInterface(GATTimePeriod_const file, GATInterface iftype, void const **ifp) Get an interface supported by a GATObject.
|
| GATResult | GATTimePeriod_Serialise (GATTimePeriod object, GATObject stream, GATBool clear_dirty) |
| | GATResult GATTimePeriod_Serialise(GATTimePeriod file, GATObject stream, GATBool clear_dirty) Serialise a GATTimePeriod object.
|
| GATBool | GATTimePeriod_VersionCallback (GATuint32 version) |
| | GATTimePeriod_VersionCallback.
|
| GATResult | GATTimePeriod_DeSerialiseCallback (GATContext context, GATObject stream, GATObject *new_object, GATuint32 version, va_list args) |
| | GATTimePeriod_DeSerialiseCallback.
|
| GATTimePeriod | GATTimePeriod_DeSerialise (GATContext context, GATObject stream, GATResult *result) |
| | GATTimePeriod GATTimePeriod_DeSerialise(GATContext context, GATObject stream, GATBool clear_dirty) De-serialise a GATTimePeriod object.
|
| GATResult | GATTimePeriod_GetIsDirty (GATTimePeriod_const object, GATBool *isdirty) |
| | GATTimePeriod_GetIsDirty.
|
| GATdouble64 | GATTimePeriod_GetDuration (GATTimePeriod_const object) |
| | This operation returns the number of seconds this time period lasts.
|
Variables |
| const char * | rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATTimePeriod.c,v 1.19 2004/04/02 12:31:58 hartmutkaiser Exp $" |
| GATTimePeriod_vtable | GATTimePeriod__vtable |
| GATTimePeriod_ISerialisable_vtable | GATTimePeriod_ISerialisable__vtable |
Detailed Description
Main file for the GATTimePeriod class.
An instance of this class represents a time duration, a length of time with uncertain start point.
- Date:
-
- Date:
-
2004/04/02 12:31:58
- Version:
-
- Header:
-
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATTimePeriod.c,v 1.19 2004/04/02 12:31:58 hartmutkaiser Exp
Copyright (C) Kelly Davis This file is part of the GAT Engine. Contributed by Kelly Davis <kdavis@aei.mpg.de>.
Use, modification and distribution is subject to the Gridlab Software License. (See accompanying file GLlicense.txt or copy at http://www.gridlab.org/GLlicense.txt)
Definition in file GATTimePeriod.c.
Function Documentation
|
|
GATTimePeriod_DeSerialise_Create.
The function GATTimePeriod_DeSerialise_Create creates a new GATTimePeriod object. - Parameters:
-
| context |
The GAT context to use for creation of the GATTimePeriod object. |
| stream |
The object from which the adaptor should read the streamed instance data. |
| duration |
The time duration to be used for the construction of the new GATTimePeriod object |
| new_object |
The pointer to the variable, which should receive the newly constructed GATTimePeriod object. |
- Returns:
-
An error code.
Definition at line 494 of file GATTimePeriod.c.
References GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_SUCCEEDED, GAT_UNUSED_PARAMETER, GAT_USES_STATUS, GATdouble64, GATTimePeriod_S::GATObject__vtable, GATTimePeriod_S::GATSerialisable__vtable, GATTimePeriod__vtable, GATTimePeriod_Destroy(), GATTimePeriod_ISerialisable__vtable, and GATTimePeriod_S::internalDuration.
Referenced by GATTimePeriod_DeSerialiseCallback(). |
| GATResult GATTimePeriod_Register_GATSerialisable |
( |
void |
|
) |
|
|
|
|
GATTimePeriod_Clone Clone the given GATTimePeriod.
This "deep clone" is returned in the variable thisClone. Furthermore, this function returns its completion status, through its return value. - Parameters:
-
- Returns:
-
The completion status of this function
Definition at line 210 of file GATTimePeriod.c.
References GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_SUCCESS, GATTimePeriod_S::GATObject__vtable, GATResult, GATTimePeriod_S::GATSerialisable__vtable, GATTimePeriod_const, GATTimePeriod_Destroy(), GATTimePeriod_ISerialisable__vtable, and GATTimePeriod_S::internalDuration. |
|
|
GATTimePeriod_VersionCallback.
The function GATTimePeriod_VersionCallback is used as a callback function during the de-serialisation of a GATTimePeriod. It should be provided to test, whether the de-serialised version matches the expected version. - Parameters:
-
| version |
The version number, which was de-serialised from the stream. |
- Returns:
-
This function should return GATTrue, if the version matches the expected value (version is valid), GATFalse otherwise.
- Remarks:
-
This function is called from the GAT engine, there is no need to call it directly.
Definition at line 323 of file GATTimePeriod.c.
References GATBool, GATFalse, GATTIMEPERIOD_LASTVERSION, GATTIMEPERIOD_MINOR_MASK, GATTrue, and GATuint32.
Referenced by GATTimePeriod_DeSerialise(). |
|
|
GATTimePeriod_DeSerialiseCallback.
The function GATTimePeriod_DeSerialiseCallback is used as a callback function during the de-serialisation of a GATTimePeriod. It should be provided for the instantiation of the new GATTimePeriod object based on the already de-serialised data items and the de-serialisation of the associated CPI provider data for the given object. - Parameters:
-
| context |
The GAT context to be used for object construction. |
| stream |
The stream interface to use for the serialisation. |
| object |
The pointer to the variable, which should receive the newly constructed object. |
| version |
The version of the saved data read from the input stream. |
| args |
This parameter is the pointer to the va_list containing pointers to the already de-serialised data items accordingly to the format string, provided during the call to the GATTimePeriod_DeSerialise function. |
- Returns:
-
An error code.
- Remarks:
-
This function is called from the GAT engine, there is no need to call it directly.
Definition at line 357 of file GATTimePeriod.c.
References GAT_INVALID_PARAMETER, GAT_SUCCESS, GAT_UNUSED_PARAMETER, GATdouble64, GATResult, GATTimePeriod_DeSerialise_Create(), GATTimePeriod_Destroy(), and GATuint32.
Referenced by GATTimePeriod_DeSerialise(). |
|
|
GATTimePeriod GATTimePeriod_DeSerialise(GATContext context, GATObject stream, GATBool clear_dirty) De-serialise a GATTimePeriod object.
The function GATTimePeriod_DeSerialise de-serialises a streamed GATTimePeriod object from the given stream It constructs a new instance of the de-serialised object. - Parameters:
-
| context |
The GAT context to be used for object construction. |
| stream |
The stream interface to use for the serialisation. |
| result |
The pointer to a variable, which receives the status code of the operation. |
- Returns:
-
The newly constructed GATTimePeriod object.
Definition at line 400 of file GATTimePeriod.c.
References GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_STORE_STATUS, GAT_USES_STATUS, GATdouble64, GATResult, GATTimePeriod_DeSerialiseCallback(), GATTimePeriod_VersionCallback(), GATuint32, and GATXds_DeSerialiseObject().
Referenced by verify_direct_serialisation(). |
|
|
This operation returns the number of seconds this time period lasts.
- Parameters:
-
| this |
The GATTimePeriod to query |
- Returns:
-
Number of seconds this time period lasts
Definition at line 466 of file GATTimePeriod.c.
References GATdouble64, and GATTimePeriod_const. |
Variable Documentation
const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATTimePeriod.c,v 1.19 2004/04/02 12:31:58 hartmutkaiser Exp $" [static]
|
|
GATTimePeriod_vtable GATTimePeriod__vtable [static]
|
|
GATTimePeriod_ISerialisable_vtable GATTimePeriod_ISerialisable__vtable [static]
|
|
|