GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

GATSoftwareDescription.h

Go to the documentation of this file.
00001 /** @file GATSoftwareDescription.h
00002  *  Header file for the GATSoftwareDescription class.
00003  *
00004  *  An instance of this class is a description of a piece of software 
00005  *  (component) which is to be submitted as a job. It currently takes a table 
00006  *  describing this piece of software’s attributes to any underlying job 
00007  *  submission system.
00008  *
00009  *  @date Wed Oct 22 2003
00010  *
00011  *  @version $Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATSoftwareDescription.h,v 1.7 2004/03/24 19:30:58 hartmutkaiser Exp $
00012  *
00013  *  Copyright (C) Hartmut Kaiser
00014  *  This file is part of the GAT Engine.
00015  *  Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.
00016  *
00017  *  Use, modification and distribution is subject to the Gridlab Software
00018  *  License. (See accompanying file GLlicense.txt or copy at
00019  *  http://www.gridlab.org/GLlicense.txt)
00020  */
00021  
00022 #if !defined(_GATSOFTWAREDESCRIPTION_H_)
00023 #define  _GATSOFTWAREDESCRIPTION_H_
00024 
00025 /* GAT Header Files */
00026 #include "GATObject.h"
00027 #include "GATType.h"
00028 #include "GATTable.h"
00029 
00030 /* Structures, unions and enums */
00031 
00032 /* Declare the converters to/from GATObject */
00033 GATOBJECT_DECLARE_CONVERTERS(GATSoftwareDescription);
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 /** GATSoftwareDescription_Create
00040  *  @brief Create a new GATSoftwareDescription object
00041  *
00042  *  The function @c GATSoftwareDescription_Create creates a new 
00043  *  GATSoftwareDescription object
00044  *
00045  *  @param attributes The attributes to initially use while initialising the 
00046  *        new GATSoftwareDescription. This parameter may be ommitted (zero).
00047  *
00048  *  @return Returns a handle to the newly created GATSoftwareDescription object.
00049  *        Returns 0 (zero) if an error occurs.
00050  */
00051 GATSoftwareDescription 
00052   GATSoftwareDescription_Create(GATTable_const attributes);
00053 
00054 /** void GATSoftwareDescription_Destroy(GATSoftwareDescription *resource)
00055  *
00056  *  The function GATSoftwareDescription_Destroy is the destructor used to
00057  *  free all the memory allocated by an GATSoftwareDescription instance.
00058  *
00059  *  @param description The pointer to the GATSoftwareDescription to destroy
00060  */
00061 void
00062   GATSoftwareDescription_Destroy(GATSoftwareDescription *object);
00063 
00064 /** GATSoftwareDescription_Equals
00065  *  @brief Compare two GATSoftwareDescription objects
00066  *
00067  *  The function @c GATSoftwareDescription_Equals compares two objects of the
00068  *  @c GATSoftwareDescription type.
00069  *
00070  *  @param lhs The first list to compare
00071  *  @param rhs The second list to compare
00072  *  @param isequal The pointer to the location, where the outcome of the 
00073  *        function has to be stored.
00074  *
00075  *  @return An error code.
00076  */
00077 GATResult
00078   GATSoftwareDescription_Equals(GATSoftwareDescription_const lhs,
00079     GATSoftwareDescription_const rhs, GATBool *isequal);
00080 
00081 /** GATSoftwareDescription_Clone
00082  *  @brief Clone the given GATSoftwareDescription
00083  *
00084  *  The function @c GATSoftwareDescription_Clone generates a (deep) copy of 
00085  *  the given GATSoftwareDescription. 
00086  *
00087  *  @param description The object to clone
00088  *  @param new_object The pointer, through which the result is to be 
00089  *        returned.
00090  *
00091  *  @return An error type.
00092  */
00093 GATResult
00094   GATSoftwareDescription_Clone(GATSoftwareDescription_const object, 
00095     GATSoftwareDescription *new_object);
00096 
00097 /** GATType GATSoftwareDescription_GetType(GATSoftwareDescription_const resource)
00098  *  @brief Return the type of the GATSoftwareDescription
00099  *
00100  *  The function @c GATSoftwareDescription_GetType always returns 
00101  *  @c #GATType_GATSoftwareDescription. 
00102  *
00103  *  @param object The object to inspect
00104  *
00105  *  @return Returns always @c #GATType_GATSoftwareDescription. 
00106  */
00107 GATType
00108   GATSoftwareDescription_GetType(GATSoftwareDescription_const object);
00109 
00110 /** GATResult GATSoftwareDescription_GetInterface(GATSoftwareDescription_const file, GATInterface iftype, void const **ifp)
00111  *  @brief Get an interface supported by a GATObject
00112  *
00113  *  The function GATSoftwareDescription_GetInterface allows to get a pointer to an 
00114  *  additional interface supported by this GATSoftwareDescription.
00115  *
00116  *  @param object The object to be asked for the new interface.
00117  *  @param iftype The interface the object is to be asked for.
00118  *  @param ifp The pointer, through which the result is to be returned.
00119  *
00120  *  @return An error type.
00121  */
00122 GATResult  
00123   GATSoftwareDescription_GetInterface(GATSoftwareDescription_const object, 
00124     GATInterface iftype, void const **ifp);
00125 
00126 
00127 /* GATSoftwareDescription API */
00128 
00129 /** GATSoftwareDescription_GetAttributes
00130  *  @brief Access the stored set of attributes 
00131  *
00132  *  The function @c GATSoftwareDescription_getAttributes allows to access the
00133  *  attributes stored insoide the given GATSoftwareDescription instance.
00134  */
00135 GATTable_const
00136   GATSoftwareDescription_GetAttributes(GATSoftwareDescription_const object);
00137   
00138 /* Change the stored set of attributes */
00139 GATResult 
00140   GATSoftwareDescription_SetAttributes(GATSoftwareDescription object, 
00141     GATTable_const attributes);
00142     
00143 
00144 /* GATAdvertiseable API */
00145 #define GATSOFTWAREDESCRIPTION_VERSION1    0x0100
00146 #define GATSOFTWAREDESCRIPTION_LASTVERSION GATSOFTWAREDESCRIPTION_VERSION1
00147 #define GATSOFTWAREDESCRIPTION_MINOR_MASK  0x00ff
00148 
00149 /** GATResult  GATSoftwareDescription_Serialise(GATSoftwareDescription file, GATObject stream, GATBool clear_dirty)
00150  *  @brief Serialise a GATSoftwareDescription object
00151  *
00152  *  The function GATSoftwareDescription_Serialise serialises the given 
00153  *  GATSoftwareDescription object into the given stream. 
00154  *
00155  *  @param object The GATSoftwareDescription object to serialise.
00156  *  @param stream The stream interface to use for the serialisation.
00157  *  @param clear_dirty If the clear_dirty parameter is set to GATTrue, the 
00158  *        internal dirty flag of this object is to be reset (no used here)
00159  *
00160  *  @return An error code.
00161  */
00162 GATResult  
00163   GATSoftwareDescription_Serialise(GATSoftwareDescription object, GATObject stream, 
00164     GATBool clear_dirty);
00165 
00166 /** GATSoftwareDescription GATSoftwareDescription_DeSerialise(GATContext context, GATObject stream, GATBool clear_dirty)
00167  *  @brief De-serialise a GATSoftwareDescription object
00168  *
00169  *  The function GATSoftwareDescription_DeSerialise de-serialises a streamed 
00170  *  GATSoftwareDescription object from the given stream  It constructs a new 
00171  *  instance of the de-serialised object.
00172  *
00173  *  @param context The GAT context to be used for object construction.
00174  *  @param stream The stream interface to use for the serialisation.
00175  *  @param result The pointer to a variable, which receives the status code of
00176  *        the operation.
00177  *
00178  *  @return The newly constructed GATSoftwareDescription object.
00179  */
00180 GATSoftwareDescription 
00181   GATSoftwareDescription_DeSerialise(GATContext context, GATObject stream, 
00182     GATResult *result);
00183 
00184 /** GATSoftwareDescription_GetIsDirty
00185  *  
00186  *  The function GATSoftwareDescription_GetIsDirty retrieves the status of the 
00187  *  dirty flag of this GATSoftwareDescription object.
00188  *
00189  *  @param object The GATSoftwareDescription object to inspect for its dirty 
00190  *        status.
00191  *  @param isdirty The pointer to a variable, which receives the dirty status.
00192  *
00193  *  @return An error code.
00194  */
00195 GATResult  
00196   GATSoftwareDescription_GetIsDirty(GATSoftwareDescription_const object, GATBool *isdirty);
00197 
00198 #ifdef __cplusplus
00199 } /* extern "C" */
00200 #endif
00201 
00202 #endif /* !defined(_GATSOFTWAREDESCRIPTION_H_) */