GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

GATResourceCPIInstanceData.c File Reference

Source file for the GATResourceCPIInstance_Data class, which represents the internal data stored by the ResourceCPI provider for the resource broker adaptor. More...

#include <string.h>
#include "GATResourceCPIInstanceData.h"

Include dependency graph for GATResourceCPIInstanceData.c:

Include dependency graph

Go to the source code of this file.

Functions

GATResourceCPIInstance_DataGATResourceCPIInstance_Data_Create (GATResourceDescription_const rd)
 GATResourceCPIInstance_Data_Create.

void GATResourceCPIInstance_Data_Destroy (GATResourceCPIInstance_Data **instance_data)
 GATResourceCPIInstance_Data_Destroy.

GATResult GATResourceCPIInstance_Data_Clone (GATResourceCPIInstance_Data const *instance_data, GATResourceCPIInstance_Data **new_instance_data)
 GATResourceCPIInstance_Data_Clone.

GATResult GATResourceCPIInstance_Data_Equals (GATResourceCPIInstance_Data const *lhs, GATResourceCPIInstance_Data const *rhs, GATBool *isequal)
 GATResourceCPIInstance_Data_Equals.

GATResult GATResourceCPIInstance_Data_GetResourceDescription (GATResourceCPIInstance_Data const *instance_data, GATResourceDescription_const *description)
 GATResourceCPIInstance_Data_GetResourceDescription.

GATResult GATResourceCPIInstance_Data_Serialize (GATResourceCPIInstance_Data const *instance_data, GATObject stream, GATBool clear_dirty)
 GATResourceCPIInstance_Data_Serialize.

GATResult GATResourceCPIInstance_Data_DeSerialize (GATContext context, GATObject stream, GATResourceCPIInstance_Data **instance_data)
 GATResourceCPIInstance_Data_DeSerialize.


Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/GATResourceCPIInstanceData.c,v 1.5 2004/04/02 12:31:57 hartmutkaiser Exp $"


Detailed Description

Source file for the GATResourceCPIInstance_Data class, which represents the internal data stored by the ResourceCPI provider for the resource broker adaptor.

Date:
Thu Nov 27 2003
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/GATResourceCPIInstanceData.c,v 1.5 2004/04/02 12:31:57 hartmutkaiser Exp

Copyright (C) Hartmut Kaiser This file is part of the GAT Engine. Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] 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 GATResourceCPIInstanceData.c.


Function Documentation

GATResourceCPIInstance_Data* GATResourceCPIInstance_Data_Create GATResourceDescription_const    rd
 

GATResourceCPIInstance_Data_Create.

The function GATResourceCPIInstance_Data_Create creates a new instance of the internal GATResource data.

Parameters:
rd  The description of the GATResource to create.
Returns:
The pointer to the newly created and initialised data structure.

Definition at line 47 of file GATResourceCPIInstanceData.c.

References GAT_FAILED, GAT_SUCCESS, GATResourceDescription_Clone(), GATResourceDescription_const, GATResourceDescription_GetType(), GATResult, GATType, and GATResourceCPIInstance_Data::rd.

Referenced by resourcebroker_adaptor_CreateResource().

void GATResourceCPIInstance_Data_Destroy GATResourceCPIInstance_Data **    instance_data
 

GATResourceCPIInstance_Data_Destroy.

The function GATResourceCPIInstance_Data_Destroy is called to free all the memory associated with the given instance data item.

Parameters:
instance_data  The pointer to a variable holding the old instance data item, this is set to zero on exit.

Definition at line 77 of file GATResourceCPIInstanceData.c.

References GATResourceDescription_Destroy().

Referenced by GATResourceCPIInstance_Data_DeSerialize(), resourcebroker_adaptor_CreateResource(), and resourcebroker_adaptor_GATResourceCPI_DestroyInstance().

GATResult GATResourceCPIInstance_Data_Clone GATResourceCPIInstance_Data const *    instance_data,
GATResourceCPIInstance_Data **    new_instance_data
 

GATResourceCPIInstance_Data_Clone.

The function GATResourceCPIInstance_Data_Clone is called to make a copy of the given instance data item.

Parameters:
instance_data  The instance data item to copy.
new_instance_Data  The pointer to a variable, which receives the newly created copy of the instance data item.
Returns:
An error code.

Definition at line 100 of file GATResourceCPIInstanceData.c.

References GAT_FAILED, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GATResourceDescription_Clone(), GATResourceDescription_GetType(), GATResult, GATType, and GATResourceCPIInstance_Data::rd.

Referenced by resourcebroker_adaptor_GATResourceCPI_CloneInstance(), and resourcebroker_adaptor_GATResourceCPI_CreateInstance().

GATResult GATResourceCPIInstance_Data_Equals GATResourceCPIInstance_Data const *    lhs,
GATResourceCPIInstance_Data const *    rhs,
GATBool   isequal
 

GATResourceCPIInstance_Data_Equals.

The function GATResourceCPIInstance_Data_Equals is called, whenever the engine needs to compare for equality two different instance data items.

Parameters:
lhs  The first instance data item to compare.
rhs  The second instance data item to compare.
isequal  The pointer to a variable, which receives the result of the compare operation.
Returns:
An error code.

Definition at line 147 of file GATResourceCPIInstanceData.c.

References GAT_INVALID_HANDLE, GATBool, GATResourceDescription_Equals(), GATResult, and GATResourceCPIInstance_Data::rd.

Referenced by resourcebroker_adaptor_GATResourceCPI_EqualsInstance().

GATResult GATResourceCPIInstance_Data_GetResourceDescription GATResourceCPIInstance_Data const *    instance_data,
GATResourceDescription_const   description
 

GATResourceCPIInstance_Data_GetResourceDescription.

The function GATResourceCPIInstance_Data_GetResourceDescription may be used to access the associated resource description of the target resource.

Parameters:
instance_data  The instance data item, for which the resource description is to be retrieved.
description  The pointer to a variable, which receives the resulting resource description.
Returns:
An error code.

Definition at line 172 of file GATResourceCPIInstanceData.c.

References GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_SUCCESS, GATResourceDescription_const, GATResult, and GATResourceCPIInstance_Data::rd.

Referenced by resourcebroker_adaptor_GATResourceCPI_GetResourceDescription().

GATResult GATResourceCPIInstance_Data_Serialize GATResourceCPIInstance_Data const *    instance_data,
GATObject    stream,
GATBool    clear_dirty
 

GATResourceCPIInstance_Data_Serialize.

The function GATResourceCPIInstance_Data_Serialize is called by the engine, whenever the instance specific data has to be serialised. The function should serialise into the given stream all the instance specific data of the object.

Parameters:
instance_data  The instance data item to serialise.
stream  The stream to be used for serialisation of the instance data.
clear_dirty  If the clear_dirty parameter is set to GATTrue, the internal dirty flag of this object is to be reset.
Returns:
An error code.

Definition at line 207 of file GATResourceCPIInstanceData.c.

References GAT_INVALID_HANDLE, GATBool, GATResourceDescription_Serialise(), GATResult, and GATResourceCPIInstance_Data::rd.

Referenced by resourcebroker_adaptor_GATResourceCPI_Serialise().

GATResult GATResourceCPIInstance_Data_DeSerialize GATContext    context,
GATObject    stream,
GATResourceCPIInstance_Data **    instance_data
 

GATResourceCPIInstance_Data_DeSerialize.

The function GATResourceCPIInstance_Data_DeSerialize is called by the engine, whenever the client requested a DeSerialise operation for a corresponding object. The function should deserialise all the instance specific data of the object from the given stream.

Parameters:
context  The GATContext to use to instantiate new GAT objects.
stream  The stream to use to get the serialised data from.
instance_data  The pointer to a variable, which receives the new instance data deserialised from the given steam.
Returns:
An error code.

Definition at line 235 of file GATResourceCPIInstanceData.c.

References GAT_INVALID_HANDLE, GAT_MEMORYFAILURE, GAT_SUCCEEDED, GATResourceCPIInstance_Data_Destroy(), GATResourceDescription_DeSerialise(), GATResult, and GATResourceCPIInstance_Data::rd.

Referenced by resourcebroker_adaptor_GATResourceCPI_DeSerialise().


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/GATResourceCPIInstanceData.c,v 1.5 2004/04/02 12:31:57 hartmutkaiser Exp $" [static]
 

Definition at line 19 of file GATResourceCPIInstanceData.c.