Main Page | Class List | Directories | File List | Class Members | File Members

ObitInfoElem.c File Reference

Elements of an ObitInfoList function definition. More...

#include <glib.h>
#include <string.h>
#include "ObitInfoElem.h"
#include "ObitMem.h"

Functions

ObitInfoElemnewObitInfoElem (gchar *label, ObitInfoType type, gint32 *dim, gconstpointer data)
 Constructor.
ObitInfoElemObitInfoElemCopy (ObitInfoElem *in)
 Copy Constructor.
void freeObitInfoElem (ObitInfoElem *me)
 Destructor.
gboolean ObitInfoElemTest (ObitInfoElem *me, char *testname)
 Compare element name with test string.
gboolean ObitInfoElemComp (ObitInfoElem *me, ObitInfoType type, gint32 *dim)
 Compare size and type.
gboolean ObitInfoElemUpdate (ObitInfoElem *me, gint32 type, gint32 *dim, gconstpointer data, gboolean warn)
 Update contents of an info element; returns TRUE if successful.
void ObitInfoElemSave (ObitInfoElem *me, gconstpointer data)
 store data
void ObitInfoElemResize (ObitInfoElem *me, ObitInfoType type, gint32 *dim)
 Change type, resize data.
glong ObitInfoElemSize (ObitInfoType type, gint32 *dim)
 determine the size in bytes of an element
void ObitInfoElemPrint (ObitInfoElem *me, FILE *file)
 Print the contents of an object.


Detailed Description

Elements of an ObitInfoList function definition.

Stores a label, size and type info and a data array. The limit on the number of dimensions is MAXINFOELEMDIM.


Function Documentation

void freeObitInfoElem ObitInfoElem me  ) 
 

Destructor.

Parameters:
me Object to delete

ObitInfoElem* newObitInfoElem gchar *  label,
ObitInfoType  type,
gint32 *  dim,
gconstpointer  data
 

Constructor.

Parameters:
label Name of element, use as key.
type Data type of object
dim Dimension array (max no. dimensions MAXINFOELEMDIM)
data Data array, if NULL only create array and not copy data.
Returns:
the new object.

gboolean ObitInfoElemComp ObitInfoElem me,
ObitInfoType  type,
gint32 *  dim
 

Compare size and type.

Parameters:
me Object to compare
type Type for comparison.
dim Dimension array to compare (max MAXINFOELEMDIM)
Returns:
True if they are the same.

ObitInfoElem* ObitInfoElemCopy ObitInfoElem in  ) 
 

Copy Constructor.

Parameters:
in Object to copy
Returns:
the new object, a byte-for-byte copy.

void ObitInfoElemPrint ObitInfoElem me,
FILE *  file
 

Print the contents of an object.

Parameters:
key pointer to hash key
in ObitInfoElem
file FILE* to write to

void ObitInfoElemResize ObitInfoElem me,
ObitInfoType  type,
gint32 *  dim
 

Change type, resize data.

Any existing values in data will be lost

Parameters:
me Object to modify.
type New data type.
dim dimension of the array.
Returns:
the new object.

void ObitInfoElemSave ObitInfoElem me,
gconstpointer  data
 

store data

Parameters:
me Object to store data to.
data The new data array.
Returns:
the new object.

glong ObitInfoElemSize ObitInfoType  type,
gint32 *  dim
 

determine the size in bytes of an element

Parameters:
type Data type.
dim Dimension of the array.
Returns:
the size in bytes.

gboolean ObitInfoElemTest ObitInfoElem me,
char *  testname
 

Compare element name with test string.

TRUE=match, else no match.

Parameters:
me Object to compare
testname String to compare with
Returns:
True if they are the same.

gboolean ObitInfoElemUpdate ObitInfoElem me,
gint32  type,
gint32 *  dim,
gconstpointer  data,
gboolean  warn
 

Update contents of an info element; returns TRUE if successful.

Parameters:
me Object to update.
type data type
dim Dimension array (max MAXINFOELEMDIM).
data Data array
warn if true, issue detailed warning about mismatches
Returns:
TRUE if OK, FALSE if object incompatable with request.


Generated on Fri Aug 31 22:13:06 2007 for Obit by  doxygen 1.3.9.1