votElement.c File Reference

(Private) Methods to manage XML elements. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "votParseP.h"
#include "votParse.h"

Defines

#define outstr(s)   strcat(XML_out,s);
#define outattr(a, s)   {outstr(a);outstr(s);outstr("\"");}

Functions

int vot_elemType (Element *e)
 Get the integer value (ID) of the Element (private method).
char * vot_elemName (Element *e)
 Get the name of the Element (private method).
int vot_eType (char *name)
 Get the integer value (ID) of the name (private method).
char * vot_elemXMLEnd (Element *e)
 Build a string of the ending XML Tag (private method).
char * vot_elemXML (Element *e)
 Builds a string of the opening XML Tag (private method).
Elementvot_newElem (unsigned int type)
 Allocate a new structure of the given type (private method).

Variables

struct {
   int   type
   char *   name
elemTypes []
struct {
   int   type
   char *   req
   char *   opt
elemAttrs []


Detailed Description

(Private) Methods to manage XML elements.

VOTELEMENT.C -- (Private) Method to manage XML elements.

Author:
Mike Fitzpatrick and Eric Timmermann
Date:
8/03/09

Function Documentation

char * vot_elemName ( Element e  ) 

Get the name of the Element (private method).

vot_elemName -- Get the name of the Element (private method).

Parameters:
*e A pointer to the Element that you want the name of
Returns:
A string pointer to the name of the element

int vot_elemType ( Element e  ) 

Get the integer value (ID) of the Element (private method).

vot_elemType -- Get the integer value (ID) of the Element (private method)

Parameters:
e A pointer to the Element that you want the type of
Returns:
An integer corresponding to the type of the element

char * vot_elemXML ( Element e  ) 

Builds a string of the opening XML Tag (private method).

vot_elemXML -- Builds a string of the opening XML Tag (private method)

Parameters:
*e A pointer to an Element
Returns:
A string that contains the opening XML tag for e

char * vot_elemXMLEnd ( Element e  ) 

Build a string of the ending XML Tag (private method).

vot_elemXMLEnd -- Build a string of the ending XML Tag (private method)

Parameters:
*e A pointer to an Element
Returns:
A string that contains the ending XML tag for e

int vot_eType ( char *  name  ) 

Get the integer value (ID) of the name (private method).

vot_eType -- Get the integer value (ID) of the name (private method).

Parameters:
name Name of the desired type
Returns:
An integer corresponding to the type of the element

Element * vot_newElem ( unsigned int  type  ) 

Allocate a new structure of the given type (private method).

vot_newElem -- Allocate a new structure of the given type (private method)

Parameters:
type An integer that defines the type of Element
Returns:
An new Element structure


Variable Documentation

struct { ... } elemAttrs[]

Definition of Required and Optional attributes of VOTable elements.

char* name

element type

char* opt

required attrs

char* req

element type


Generated on Wed Feb 27 21:10:08 2013 for libVOTable by  doxygen 1.5.9