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

ObitTableList.h File Reference

ObitTableList class definition. More...

#include "Obit.h"
#include "ObitErr.h"
#include "ObitTable.h"
#include "ObitDef.h"
#include "ObitClassDef.h"

Go to the source code of this file.

Classes

struct  ObitTableList
 ObitTableList Class. More...
struct  ObitTableListClassInfo
 ClassInfo Structure. More...

Defines

#define ObitTableListUnref(in)   ObitUnref (in)
 Macro to unreference (and possibly destroy) an ObitTableList returns a ObitTableList*.
#define ObitTableListRef(in)   ObitRef (in)
 Macro to reference (update reference count) an ObitTableList.
#define ObitTableListIsA(in)   ObitIsA (in, ObitTableListGetClass())
 Macro to determine if an object is the member of this or a derived class.

Typedefs

typedef void(* ObitTableListPutFP )(ObitTableList *in, gchar *name, glong *version, ObitTable *table, ObitErr *err)
typedef gboolean(* ObitTableListGetFP )(ObitTableList *in, gchar *name, glong version, ObitTable *table, ObitErr *err)
typedef gboolean(* ObitTableListGetNumberFP )(ObitTableList *in, glong number, gchar **name, glong *version, ObitTable **table, ObitErr *err)
typedef glong(* ObitTableListGetHighFP )(ObitTableList *in, gchar *name)
typedef void(* ObitTableListRemoveFP )(ObitTableList *in, gchar *name, glong version)

Functions

void ObitTableListClassInit (void)
 Public: Class initializer.
ObitTableListnewObitTableList (gchar *name)
 Public: Constructor.
gconstpointer ObitTableListGetClass (void)
 Public: ClassInfo pointer.
ObitTableListObitTableListCopy (ObitTableList *in, ObitTableList *out, ObitErr *err)
 Public: Copy constructor.
void ObitTableListPut (ObitTableList *in, gchar *name, glong *version, ObitTable *table, ObitErr *err)
 Public: Store item to TableList.
gboolean ObitTableListGet (ObitTableList *in, gchar *name, glong *version, ObitTable **table, ObitErr *err)
 Public: Retrieve item from TableList by name.
gboolean ObitTableListGetNumber (ObitTableList *in, glong number, gchar **name, glong *version, ObitTable **table, ObitErr *err)
 Public: Retrieve item from TableList by number.
glong ObitTableListGetHigh (ObitTableList *in, gchar *name)
 Public: Return highered numbered table of a given type.
void ObitTableListRemove (ObitTableList *in, gchar *name, glong version)
 Public: Remove item from list.
void ObitTableListPrint (ObitTableList *in, ObitErr *err)
 Public: Print list to stderr.
void ObitTableListCheck (ObitTableList *in, ObitErr *err)
 Public: Check validity.


Detailed Description

ObitTableList class definition.

This class is derived from the Obit class.

This class is a list of associated tables.

Usage

Instances can be obtained using the newObitTableList constructor, the ObitTableListCopy constructor or a pointer duplicated using the ObitTableListRef macro. When an instance is no longer needed, use the ObitTableListUnref macro to release it.

Define Documentation

#define ObitTableListIsA in   )     ObitIsA (in, ObitTableListGetClass())
 

Macro to determine if an object is the member of this or a derived class.

Returns TRUE if a member, else FALSE in = object to reference

#define ObitTableListRef in   )     ObitRef (in)
 

Macro to reference (update reference count) an ObitTableList.

returns a ObitTableList*. in = object to reference

#define ObitTableListUnref in   )     ObitUnref (in)
 

Macro to unreference (and possibly destroy) an ObitTableList returns a ObitTableList*.

in = object to unreference


Typedef Documentation

typedef gboolean(* ObitTableListGetFP)(ObitTableList *in, gchar *name, glong version, ObitTable *table, ObitErr *err)
 

typedef glong(* ObitTableListGetHighFP)(ObitTableList *in, gchar *name)
 

typedef gboolean(* ObitTableListGetNumberFP)(ObitTableList *in, glong number, gchar **name, glong *version, ObitTable **table, ObitErr *err)
 

typedef void(* ObitTableListPutFP)(ObitTableList *in, gchar *name, glong *version, ObitTable *table, ObitErr *err)
 

typedef void(* ObitTableListRemoveFP)(ObitTableList *in, gchar *name, glong version)
 


Function Documentation

ObitTableList* newObitTableList gchar *  name  ) 
 

Public: Constructor.

Initializes class if needed on first call.

Returns:
the new object.

void ObitTableListCheck ObitTableList in,
ObitErr err
 

Public: Check validity.

Parameters:
in Pointer to TableList.to check
err Obit error/message stack, sets error if invalid

void ObitTableListClassInit void   ) 
 

Public: Class initializer.

ObitTableList* ObitTableListCopy ObitTableList in,
ObitTableList out,
ObitErr err
 

Public: Copy constructor.

Parent class members are included but any derived class info is ignored.

Parameters:
in The object to copy
out An existing object pointer for output or NULL if none exists.
err Obit error stack object.
Returns:
pointer to the new object.

gboolean ObitTableListGet ObitTableList in,
gchar *  name,
glong *  version,
ObitTable **  table,
ObitErr err
 

Public: Retrieve item from TableList by name.

Parameters:
in Pointer to TableList.
name The name of the table to enter.
version Version number of table, >= 0 -> highest value found and this value is returned.
table ObitTable to reference, should be Unrefed when done. May be NULL if table but no object exists.
err (output) Obit Error stack for information.
Returns:
TRUE if found, else FALSE.

gconstpointer ObitTableListGetClass void   ) 
 

Public: ClassInfo pointer.

Initializes class if needed on first call.

Returns:
pointer to the class structure.

glong ObitTableListGetHigh ObitTableList in,
gchar *  name
 

Public: Return highered numbered table of a given type.

Parameters:
in Pointer to TableList.
name The name of the table to be searched for;
Returns:
highest version number, 0 if none found

gboolean ObitTableListGetNumber ObitTableList in,
glong  number,
gchar **  name,
glong *  version,
ObitTable **  table,
ObitErr err
 

Public: Retrieve item from TableList by number.

If the TableList contains an actual pointer to the table, a reference is returned (needs to be Unreffed). If the table pointer is NULL, this is returned and the return value is FALSE (although the table described exists and can be instantiated with newObit?Table.

Parameters:
in Pointer to TableList.
number 1-rel item number
name The name of the table , must be gfreed when done.
version Version number of table, -9=>invalid table
table ObitTable reference, should be Unrefed when done. May be NULL if table but no object exists.
err (output) Obit Error stack for information.
Returns:
TRUE if table object exists in list, else FALSE, i.e. needs to be instantiated

void ObitTableListPrint ObitTableList in,
ObitErr err
 

Public: Print list to stderr.

Parameters:
in Pointer to TableList.
err Obit error/message stack

void ObitTableListPut ObitTableList in,
gchar *  name,
glong *  version,
ObitTable table,
ObitErr err
 

Public: Store item to TableList.

If the requested name and version does not exist then an entry is created. If a previous entry exists, the information is updated.

Parameters:
in Pointer to TableList.
name The name of the table to enter.
version Version number of table, >= 0 -> highest value found +1 and this value is returned.
table ObitTable to reference, may be NULL if table but no object exists. If NULL and an existing entry has a NonNULL value, the old value is kept.

void ObitTableListRemove ObitTableList in,
gchar *  name,
glong  version
 

Public: Remove item from list.

Item is destroyed; does nothing if item not found.

Parameters:
in Pointer to TableList.
name The name of the table.
version Version number of table.


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