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

ObitXML.h File Reference

ObitXML XML class. More...

#include <xmlrpc.h>
#include "Obit.h"
#include "ObitErr.h"
#include "ObitThread.h"
#include "ObitDConCleanWindow.h"

Go to the source code of this file.

Classes

struct  ObitXML
 ObitXML Class structure. More...
struct  ObitXMLClassInfo
 ClassInfo Structure. More...

Defines

#define ObitXMLUnref(in)   ObitUnref (in)
 Macro to unreference (and possibly destroy) an ObitXML returns a ObitXML*.
#define ObitXMLRef(in)   ObitRef (in)
 Macro to reference (update reference count) an ObitXML.
#define ObitXMLIsA(in)   ObitIsA (in, ObitXMLGetClass())
 Macro to determine if an object is the member of this or a derived class.

Enumerations

enum  obitXMLType {
  OBIT_XML_Reply = 0, OBIT_XML_Result, OBIT_XML_InfoList, OBIT_XML_Ping,
  OBIT_XML_LoadImage, OBIT_XML_EditWindow, OBIT_XML_BinBlob, OBIT_XML_Unknown
}
 enum for object type. More...

Functions

void ObitXMLClassInit (void)
 Public: Class initializer.
ObitXMLnewObitXML (gchar *name)
 Public: Default Constructor.
gconstpointer ObitXMLGetClass (void)
 Public: ClassInfo pointer.
ObitXMLObitXMLPing2XML (ObitErr *err)
 Public: Constructor for ping.
gint ObitXMLXML2Ping (ObitXML *xml, ObitErr *err)
 Public: Convert to ping info.
ObitXMLObitXMLInfoList2XML (ObitInfoList *list, ObitErr *err)
 Public: Constructor from ObitInfoList.
ObitInfoListObitXMLXML2InfoList (ObitXML *xml, ObitErr *err)
 Public: Convert to ObitInfoList.
ObitInfoListObitXMLXMLInfo2List (ObitXML *xml, ObitErr *err)
 Public: Convert XML created from an ObitInfoList to ObitInfoList.
ObitXMLObitXMLFileInfo2XML (ObitIOType Type, gchar *Name, gchar *AClass, gchar *ADir, gint ASeq, gint AUser, gint Field, gint NField, ObitErr *err)
 Public: Constructor from Image file info.
void ObitXMLXML2FileInfo (ObitXML *xml, ObitIOType *Type, gchar **Name, gchar **AClass, gchar **ADir, gint *ASeq, gint *AUser, gint *Field, gint *NField, ObitErr *err)
 Public: Convert to Image file info.
ObitXMLObitXMLWindow2XML (ObitDConCleanWindow *window, glong field, ObitErr *err)
 Public: Constructor from ObitDConCleanWindow.
ObitDConCleanWindowObitXMLXML2Window (ObitXML *xml, ObitErr *err)
 Public: Convert to ObitDConCleanWindow.
ObitXMLObitXMLBlob2XML (gpointer blob, ObitInfoList *desc, ObitErr *err)
 Public: Constructor from Binary blob.
gpointer ObitXMLXML2Blob (ObitXML *xml, ObitInfoList **desc, ObitErr *err)
 Public: Convert to Binary blob.
ObitXMLObitXMLReturn (gchar *name, gpointer parmP, ObitErr *err)
 Public: Constructor for return object.


Detailed Description

ObitXML XML class.

This class is derived from the Obit class.

This class controls the conversion to and from xml for Obit related information. The xml structures are generally to be used in a remote procedure call using ObitRPC.

Creators and Destructors

An ObitXML will usually be created using ObitXMLCreate which allows specifying a name for the object as well as other information.

A copy of a pointer to an ObitXML should always be made using the ObitXMLRef function which updates the reference count in the object. Then whenever freeing an ObitXML or changing a pointer, the function ObitXMLUnref will decrement the reference count and destroy the object when the reference count hits 0. There is no explicit destructor.


Define Documentation

#define ObitXMLIsA in   )     ObitIsA (in, ObitXMLGetClass())
 

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 ObitXMLRef in   )     ObitRef (in)
 

Macro to reference (update reference count) an ObitXML.

returns a ObitXML*. in = object to reference

#define ObitXMLUnref in   )     ObitUnref (in)
 

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

in = object to unreference


Enumeration Type Documentation

enum obitXMLType
 

enum for object type.

This specifies which known type of XML object

Enumeration values:
OBIT_XML_Reply  Reply status from RPC call.
OBIT_XML_Result  Reply results.
OBIT_XML_InfoList  ObitInfoList.
OBIT_XML_Ping  Ping parameters.
OBIT_XML_LoadImage  LoadImage parameters.
OBIT_XML_EditWindow  EditWindow parameters.
OBIT_XML_BinBlob  Binary blob.
OBIT_XML_Unknown  Unknown.


Function Documentation

ObitXML* newObitXML gchar *  name  ) 
 

Public: Default Constructor.

Initializes class if needed on first call.

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

ObitXML* ObitXMLBlob2XML gpointer  blob,
ObitInfoList desc,
ObitErr err
 

Public: Constructor from Binary blob.

type = OBIT_XML_BinBlob

Parameters:
blob Binary blob to include
desc Description of blob including:
  • size long scalar Size of blob in bytes
err Obit Error message
Returns:
new ObitXML, blob in member "BlobData"

void ObitXMLClassInit void   ) 
 

Public: Class initializer.

ObitXML* ObitXMLFileInfo2XML ObitIOType  Type,
gchar *  Name,
gchar *  AClass,
gchar *  ADir,
gint  ASeq,
gint  AUser,
gint  Field,
gint  NField,
ObitErr err
 

Public: Constructor from Image file info.

Parameters:
Type Image type, OBIT_IO_FITS or OBIT_IO_AIPS
Name FITS file path or AIPS Name (12 char)
AClass AIPS class (6 char), may be NULL for FITS
ADir Path to AIPS directory, may be NULL for FITS
ASeq AIPS image sequence number
AUser AIPS User number
Field Field number (1-rel)
NField Total number of fields in mosaic
err Obit Error message
Returns:
new ObitXML object

gconstpointer ObitXMLGetClass void   ) 
 

Public: ClassInfo pointer.

Returns:
pointer to the class structure.

ObitXML* ObitXMLInfoList2XML ObitInfoList list,
ObitErr err
 

Public: Constructor from ObitInfoList.

type = OBIT_XML_InfoList

Parameters:
list List to convert
err Obit Error message
Returns:
new ObitXML object (Unref when done)

ObitXML* ObitXMLPing2XML ObitErr err  ) 
 

Public: Constructor for ping.

Parameters:
err Obit Error message
Returns:
new ObitXML object

ObitXML* ObitXMLReturn gchar *  name,
gpointer  parmP,
ObitErr err
 

Public: Constructor for return object.

Parameters:
name Name string for new object
parmP xmlrpc_value (as gpointer) as xml data for new object This passes control of parmP to the new object
err Obit Error message
Returns:
new ObitXML object

ObitXML* ObitXMLWindow2XML ObitDConCleanWindow window,
glong  field,
ObitErr err
 

Public: Constructor from ObitDConCleanWindow.

Parameters:
window Object from which to extract information
field Which field? (1-rel)
err Obit Error message
Returns:
ObitXML object

gpointer ObitXMLXML2Blob ObitXML xml,
ObitInfoList **  desc,
ObitErr err
 

Public: Convert to Binary blob.

Parameters:
xml Object to convert
desc [out] Description of output blob including:
  • size glong scalar Size of blob in bytes
err Obit Error message
Returns:
new output binary blob (ObitMemFree when done)

void ObitXMLXML2FileInfo ObitXML xml,
ObitIOType *  Type,
gchar **  Name,
gchar **  AClass,
gchar **  ADir,
gint *  ASeq,
gint *  AUser,
gint *  Field,
gint *  NField,
ObitErr err
 

Public: Convert to Image file info.

Parameters:
xml ObitXML Object from which to extract information
Type [out]Image type, OBIT_IO_FITS or OBIT_IO_AIPS
Name [out]FITS file path or AIPS Name (12 char) will be allocated, g_free when done
AClass [out]AIPS class (6 char), if non NULL will be allocated, g_free when done
ADir [out]Path to AIPS directory if non NULL will be allocated, g_free when done
Aseq [out]AIPS image sequence number
Auser [out]AIPS User number
err Obit Error message
Field [out]Field number (1-rel)
NField [out]Total number of fields in mosaic

ObitInfoList* ObitXMLXML2InfoList ObitXML xml,
ObitErr err
 

Public: Convert to ObitInfoList.

Parameters:
xml Object to convert
err Obit Error message
Returns:
new ObitInfoList (Unref when done)

gint ObitXMLXML2Ping ObitXML xml,
ObitErr err
 

Public: Convert to ping info.

Parameters:
xml ObitXML Object from which to extract information
err Obit Error message
Returns:
the random gint

ObitDConCleanWindow* ObitXMLXML2Window ObitXML xml,
ObitErr err
 

Public: Convert to ObitDConCleanWindow.

Parameters:
env xmlrpc environment
xmlwindow XML Object from which to extract information
err Obit Error message
Returns:
Obit Window structure

ObitInfoList* ObitXMLXMLInfo2List ObitXML xml,
ObitErr err
 

Public: Convert XML created from an ObitInfoList to ObitInfoList.

Parameters:
xml Object to convert
err Obit Error message
Returns:
new ObitInfoList (Unref when done)


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