libSBML C++ API  5.20.2
VConstraint Class Reference

Detailed Description

Helper class for SBML validators.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.

Public Member Functions

unsigned int getId () const
 Get the constraint identifier of this constraint. More...
 
unsigned int getSeverity () const
 Get the severity of this constraint. More...
 
 VConstraint (unsigned int id, Validator &v)
 Creates a new VConstraint with the given id and Validator v. More...
 
virtual ~VConstraint ()
 Destructor for the VConstraint object. More...
 

Constructor & Destructor Documentation

◆ VConstraint()

VConstraint::VConstraint ( unsigned int  id,
Validator v 
)

Creates a new VConstraint with the given id and Validator v.

The severity of the constraint is set to 2 by default.

Parameters
idan integer, the id of the new VConstraint.
va Validator for the new VContraint.

◆ ~VConstraint()

VConstraint::~VConstraint ( )
virtual

Destructor for the VConstraint object.

Member Function Documentation

◆ getId()

unsigned int VConstraint::getId ( ) const

Get the constraint identifier of this constraint.

Note that constraint identifiers are unrelated to SBML identifiers put on SBML components. Constraint identifiers are a superset of the validation rule numbers. (These "validation rules" are defined in the SBML specifications beginning with SBML Level 2 Version 2.) The set of possible constraint identifiers includes all SBML validation rule numbers, and in addition, there exist extra constraints defined by libSBML itself.

Returns
the id of this Constraint.

◆ getSeverity()

unsigned int VConstraint::getSeverity ( ) const

Get the severity of this constraint.

Severity codes are defined by the enumeration SBMLErrorSeverity_t. See the documentation included in SBMLError for more information.

Returns
the severity for violating this Constraint.
See also
SBMLErrorSeverity_t