Component

class Component

A Component is any element of an SBML or CellML model. It can represent an SBML species, reaction, or compartment.

Public Functions

Component()

Empty constructor.

Component(const SingularAnnotation &annotation)

Construct from a singular annotation.

Component(const CompositeAnnotation &annotation)

Construct from a composite annotation.

const AnnotationBase &getAnnotation() const

Get this component’s annotation. The component may have a singular or composite annotation, but it will be returned as a pointer to the base class for annotations.

AnnotationBase &getAnnotation()

Get this component’s annotation. The component may have a singular or composite annotation, but it will be returned as a pointer to the base class for annotations.

const CompositeAnnotation &getCompositeAnnotation() const

Get this component’s annotation and cast it to a composite annotation. It is an error to call this method unless the component’s annotation is a composite annotation.

CompositeAnnotation &getCompositeAnnotation()

Get this component’s annotation and cast it to a composite annotation. It is an error to call this method unless the component’s annotation is a composite annotation.

void setAnnotation(AnnotationBase *annotation)

Manually set the annotation (from a raw pointer). This Component will own the passed raw pointer. If the Component currently has an annotation set, it will be freed.

Parameters
  • annotation: The annotation for this Component to own.

void setAnnotation(const AnnotationBase &annotation)

Manually set the annotation (copy the passed annotation). If the Component currently has an annotation set, it will be freed.

Parameters
  • annotation: The annotation for this Component to own.

std::string humanize() const

Return a humanreadable representation of the annotation information. Ontology terms will be replaced with human-readable names.