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

model.c File Reference

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

Compounds

struct  rnamlMODEL

Functions

rnamlModelrnamlnewModel ()
 Creates a new rnamlModel structure.

rnamlModelrnamlcloneModel (const rnamlModel *model)
 Clones a rnamlModel struture.

void rnamldeleteModel (rnamlModel *model)
 Frees the rnamlModel structure.

int rnamlisModel (const rnamlObject *obj)
 Tells wheter the object is a rnamlModel.

int rnamlequalsModel (const rnamlModel *left, const rnamlModel *right)
 Tells if left and right are equals.

const char * rnamlgetModelId (const rnamlModel *model)
 Gets the model id.

void rnamlsetModelId (rnamlModel *model, const char *id)
 Sets the model id.

rnamlModelInfornamlgetModelModelInfo (rnamlModel *model)
 Gets the modelInfo from the model.

void rnamlsetModelModelInfo (rnamlModel *model, rnamlModelInfo *modelInfo)
 Sets the model modelInfo.

void rnamladdModelBase (rnamlModel *model, rnamlBase *base)
 Adds a base into a model.

xmlcpgListrnamlgetModelBases (rnamlModel *model)
 Gets the model's base list.

rnamlStrAnnotationrnamlgetModelStrAnnotation (rnamlModel *model)
 Gets the strAnnotation from the model.

void rnamlsetModelStrAnnotation (rnamlModel *model, rnamlStrAnnotation *strAnnotation)
 Sets the model strAnnotation.

rnamlSecondaryStructureDisplayrnamlgetModelSecondaryStructureDisplay (rnamlModel *model)
 Gets the secondaryStructureDisplay from the model.

void rnamlsetModelSecondaryStructureDisplay (rnamlModel *model, rnamlSecondaryStructureDisplay *secondaryStructureDisplay)
 Sets the model secondaryStructureDisplay.

xmlcpgObjectrnamltoXMLModel (const rnamlModel *model)
 Translates the rnamlModel structure into a xmlcpgElement conforming to the RNAML standard.


Function Documentation

void rnamladdModelBase rnamlModel   model,
rnamlBase   base
 

Adds a base into a model.

Parameters:
model  the rnamlModel structure.
base  the rnamlBase structure.

rnamlModel* rnamlcloneModel const rnamlModel   model
 

Clones a rnamlModel struture.

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

void rnamldeleteModel rnamlModel   model
 

Frees the rnamlModel structure.

Parameters:
model  the rnamlModel structure to free.

int rnamlequalsModel const rnamlModel   left,
const rnamlModel   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.

xmlcpgList* rnamlgetModelBases rnamlModel   model
 

Gets the model's base list.

Parameters:
model  the rnamlModel structure.
Returns:
the model's base xmlcpgList or NULL if something goes wrong.

const char* rnamlgetModelId const rnamlModel   model
 

Gets the model id.

Parameters:
model  the rnamlModel structure.
Returns:
the model id string or NULL if model is NULL or not an rnamlModel.

rnamlModelInfo* rnamlgetModelModelInfo rnamlModel   model
 

Gets the modelInfo from the model.

Parameters:
model  the rnamlModel structure.
Returns:
the model modelInfo is NULL or if model is NULL or not an rnamlModel.

rnamlSecondaryStructureDisplay* rnamlgetModelSecondaryStructureDisplay rnamlModel   model
 

Gets the secondaryStructureDisplay from the model.

Parameters:
model  the rnamlModel structure.
Returns:
the model secondaryStructureDisplay is NULL or if model is NULL or not an rnamlModel.

rnamlStrAnnotation* rnamlgetModelStrAnnotation rnamlModel   model
 

Gets the strAnnotation from the model.

Parameters:
model  the rnamlModel structure.
Returns:
the model strAnnotation is NULL or if model is NULL or not an rnamlModel.

int rnamlisModel const rnamlObject   obj
 

Tells wheter the object is a rnamlModel.

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

rnamlModel* rnamlnewModel  
 

Creates a new rnamlModel structure.

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

void rnamlsetModelId rnamlModel   model,
const char *    id
 

Sets the model id.

The previous model id is freed and a copy of id is generated.

Parameters:
model  the rnamlModel structure.
id  the model id.

void rnamlsetModelModelInfo rnamlModel   model,
rnamlModelInfo   modelInfo
 

Sets the model modelInfo.

The previous modelInfo info is freed

Parameters:
model  the rnamlModel structure.
model  the model modelInfo.

void rnamlsetModelSecondaryStructureDisplay rnamlModel   model,
rnamlSecondaryStructureDisplay   secondaryStructureDisplay
 

Sets the model secondaryStructureDisplay.

The previous secondaryStructureDisplay info is freed

Parameters:
model  the rnamlModel structure.
model  the model secondaryStructureDisplay.

void rnamlsetModelStrAnnotation rnamlModel   model,
rnamlStrAnnotation   strAnnotation
 

Sets the model strAnnotation.

The previous strAnnotation info is freed

Parameters:
model  the rnamlModel structure.
model  the model strAnnotation.

xmlcpgObject* rnamltoXMLModel const rnamlModel   model
 

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

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


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