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

Obit.c File Reference

Obit class function definitions. More...

#include <time.h>
#include "Obit.h"
#include "ObitMem.h"

Functions

ObitnewObit (gchar *name)
 Public: Constructor.
gconstpointer ObitGetClass (void)
 Public: ClassInfo pointer.
ObitObitCopy (Obit *in, Obit *out, ObitErr *err)
 Public: Copy (deep) constructor.
ObitObitClone (Obit *in, Obit *out)
 Public: Copy (shallow) constructor.
gpointer ObitRef (gpointer in)
 Public: Ref pointer, increment reference count, return pointer.
gpointer ObitUnref (gpointer inn)
 Public: Unref pointer, decrement reference count and destroy if 0.
gboolean ObitIsA (gpointer in, gconstpointer class)
 Public: returns TRUE is object is a member of myClassInfo or a derived class.
gfloat ObitMagicF (void)
 Public: returns magic value blanking value.
void ObitTrimTrail (gchar *str)
 Public: trim trailing blanks from string.
gboolean ObitStrCmp (gchar *str1, gchar *str2, gint maxlen)
 Public: compare strings.
gchar * ObitToday (void)
 Public: return today's date as yyyy-mm-dd.
void ObitClassInit (void)
 Public: Class initializer.
void ObitClassInfoDefFn (gpointer inClass)
 Public: Set Class function pointers.
gboolean ObitInfoIsA (ObitClassInfo *class, ObitClassInfo *type)
 Public: returns TRUE is object is type or a derived class.

Variables

ObitClassInfo myClassInfo = {FALSE}
 ClassInfo structure ObitClassInfo.


Detailed Description

Obit class function definitions.


Function Documentation

Obit* newObit gchar *  name  ) 
 

Public: Constructor.

Initializes class if needed on first call.

Parameters:
name An optional name for the object.
Returns:
the new object.

void ObitClassInfoDefFn gpointer  inClass  ) 
 

Public: Set Class function pointers.

Parameters:
inClass Pointer to ClassInfo structure of the class to be filled.
callClass Pointer to ClassInfo of calling class

void ObitClassInit void   ) 
 

Public: Class initializer.

Obit* ObitClone Obit in,
Obit out
 

Public: Copy (shallow) constructor.

The result will have pointers to the more complex members.

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

Obit* ObitCopy Obit in,
Obit out,
ObitErr err
 

Public: Copy (deep) constructor.

Copies are made of complex members such as files; these will be copied applying whatever selection is associated with the input.

Parameters:
in The object to copy
out An existing object pointer for output or NULL if none exists.
err Error stack, returns if not empty.
Returns:
pointer to the new (existing) object.

gconstpointer ObitGetClass void   ) 
 

Public: ClassInfo pointer.

This method MUST be included in each derived class to ensure proper linking and class initialization. Initializes class if needed on first call.

Returns:
pointer to the class structure.

gboolean ObitInfoIsA ObitClassInfo class,
ObitClassInfo type
 

Public: returns TRUE is object is type or a derived class.

Parameters:
in Pointer to object to test.
class Pointer to ClassInfo structure of the class to be tested.
Returns:
TRUE if test or a derived class, else FALSE.

gboolean ObitIsA gpointer  in,
gconstpointer  class
 

Public: returns TRUE is object is a member of myClassInfo or a derived class.

Should also work for derived classes.

Parameters:
in Pointer to object to test.
class Pointer to ClassInfo structure of the class to be tested.
Returns:
TRUE if member of class or a derived class, else FALSE.

gfloat ObitMagicF void   ) 
 

Public: returns magic value blanking value.

Returns:
float magic value

gpointer ObitRef gpointer  in  ) 
 

Public: Ref pointer, increment reference count, return pointer.

This function should always be used to copy pointers as this will ensure a proper reference count. Should also work for derived classes

Parameters:
in Pointer to object to link, if Null, just return.
Returns:
the pointer to in.

gboolean ObitStrCmp gchar *  str1,
gchar *  str2,
gint  maxlen
 

Public: compare strings.

Blanks past the last non blank, non-NULL are considered insignificant

Parameters:
str1 First string to compare
str2 Second string to compare
maxlen Maximum number of characters to compare
Returns:
True if all significant characters match, else False

gchar* ObitToday void   ) 
 

Public: return today's date as yyyy-mm-dd.

Returns:
data string, should be g_freeed when done.

void ObitTrimTrail gchar *  str  ) 
 

Public: trim trailing blanks from string.

Parameters:
str String to trim

gpointer ObitUnref gpointer  inn  ) 
 

Public: Unref pointer, decrement reference count and destroy if 0.

if the input pointer is NULL, the reference count is already <=0 or the object is not a valid Obit Object, it simply returns.

Parameters:
in Pointer to object to unreference.
Returns:
NULL pointer.


Variable Documentation

ObitClassInfo myClassInfo = {FALSE}
 

ClassInfo structure ObitClassInfo.

This structure is used by class objects to access class functions.


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