Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

segment.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "segment.h"

Compounds

struct  rnamlSEGMENT

Functions

rnamlSegmentrnamlnewSegment ()
 Creates a new rnamlSegment structure.

rnamlSegmentrnamlcloneSegment (const rnamlSegment *segment)
 Clones a rnamlSegment struture.

void rnamldeleteSegment (rnamlSegment *segment)
 Frees the rnamlSegment structure.

int rnamlisSegment (const rnamlObject *obj)
 Tells wheter the object is a rnamlSegment.

int rnamlequalsSegment (const rnamlSegment *left, const rnamlSegment *right)
 Tells if left and right are equals.

const char * rnamlgetSegmentSegName (const rnamlSegment *segment)
 Gets the segName from the segment.

void rnamlsetSegmentSegName (rnamlSegment *segment, const char *segName)
 Sets the segment segName.

rnamlBaseId5prnamlgetSegmentBaseId5p (rnamlSegment *segment)
 Gets the baseId5p from the segment.

void rnamlsetSegmentBaseId5p (rnamlSegment *segment, rnamlBaseId5p *baseId5p)
 Sets the segment baseId5p.

rnamlObjectrnamlgetSegmentEnd (rnamlSegment *segment)
 Gets the segment end.

void rnamlsetSegmentEnd (rnamlSegment *segment, rnamlObject *obj)
 Sets the segment end.

xmlcpgObjectrnamltoXMLSegment (const rnamlSegment *segment)
 Translates the rnamlSegment structure into a xmlcpgElement conforming to the RNAML standard.


Function Documentation

rnamlSegment* rnamlcloneSegment const rnamlSegment   segment
 

Clones a rnamlSegment struture.

Parameters:
segment  the structure to clone.
Returns:
the new allocated structure or NULL if something goes wrong.

void rnamldeleteSegment rnamlSegment   segment
 

Frees the rnamlSegment structure.

Parameters:
segment  the rnamlSegment structure to free.

int rnamlequalsSegment const rnamlSegment   left,
const rnamlSegment   right
 

Tells if left and right are equals.

Parameters:
left  the left object to compare.
right  the right object to compare.
Returns:
1 if the objects are equals or 0 otherwise.

rnamlBaseId5p* rnamlgetSegmentBaseId5p rnamlSegment   segment
 

Gets the baseId5p from the segment.

Parameters:
segment  the rnamlSegment structure.
Returns:
the segment baseId5p is NULL or if segment is NULL or not an rnamlSegment.

rnamlObject* rnamlgetSegmentEnd rnamlSegment   segment
 

Gets the segment end.

Parameters:
segment  the rnamlSegment structure.
Returns:
the segment end objet or NULL if segment is NULL or not an rnamlSegment.

const char* rnamlgetSegmentSegName const rnamlSegment   segment
 

Gets the segName from the segment.

Parameters:
segment  the rnamlSegment structure.
Returns:
the segment segName string or NULL if segment is NULL or not an rnamlSegment.

int rnamlisSegment const rnamlObject   obj
 

Tells wheter the object is a rnamlSegment.

Parameters:
obj  the rnamlObject to test.
Returns:
1 if the object is a rnamlSegment, 0 otherwise.

rnamlSegment* rnamlnewSegment  
 

Creates a new rnamlSegment structure.

Returns:
the new allocated structure or NULL if something goes wrong.

void rnamlsetSegmentBaseId5p rnamlSegment   segment,
rnamlBaseId5p   baseId5p
 

Sets the segment baseId5p.

The previous baseId5p info is freed

Parameters:
segment  the rnamlSegment structure.
segment  the segment baseId5p.

void rnamlsetSegmentEnd rnamlSegment   segment,
rnamlObject   obj
 

Sets the segment end.

The previous end is freed.

Parameters:
segment  the rnamlSegment structure.
obj  the new segment end.

void rnamlsetSegmentSegName rnamlSegment   segment,
const char *    segName
 

Sets the segment segName.

The previous segment segName is freed and a copy of segName is generated.

Parameters:
segment  the rnamlSegment structure.
segName  the segment segName.

xmlcpgObject* rnamltoXMLSegment const rnamlSegment   segment
 

Translates the rnamlSegment structure into a xmlcpgElement conforming to the RNAML standard.

Parameters:
molecule  the rnamlSegment structure to translate.
Returns:
the xmlcpgObject or NULL if something goes wrong.


Generated on Tue Nov 11 14:59:52 2003 for xmlcpg by doxygen1.2.18