1 /** 2 * @file SBMLTypeCodes.h 3 * @brief Enumeration to identify SBML objects at runtime 4 * @author Ben Bornstein 5 * 6 * <!-------------------------------------------------------------------------- 7 * This file is part of libSBML. Please visit http://sbml.org for more 8 * information about SBML, and the latest version of libSBML. 9 * 10 * Copyright (C) 2020 jointly by the following organizations: 11 * 1. California Institute of Technology, Pasadena, CA, USA 12 * 2. University of Heidelberg, Heidelberg, Germany 13 * 3. University College London, London, UK 14 * 15 * Copyright (C) 2019 jointly by the following organizations: 16 * 1. California Institute of Technology, Pasadena, CA, USA 17 * 2. University of Heidelberg, Heidelberg, Germany 18 * 19 * Copyright (C) 2013-2018 jointly by the following organizations: 20 * 1. California Institute of Technology, Pasadena, CA, USA 21 * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK 22 * 3. University of Heidelberg, Heidelberg, Germany 23 * 24 * Copyright (C) 2009-2013 jointly by the following organizations: 25 * 1. California Institute of Technology, Pasadena, CA, USA 26 * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK 27 * 28 * Copyright (C) 2006-2008 by the California Institute of Technology, 29 * Pasadena, CA, USA 30 * 31 * Copyright (C) 2002-2005 jointly by the following organizations: 32 * 1. California Institute of Technology, Pasadena, CA, USA 33 * 2. Japan Science and Technology Agency, Japan 34 * 35 * This library is free software; you can redistribute it and/or modify it 36 * under the terms of the GNU Lesser General Public License as published by 37 * the Free Software Foundation. A copy of the license agreement is provided 38 * in the file named "LICENSE.txt" included with this software distribution 39 * and also available online as http://sbml.org/software/libsbml/license.html 40 * ---------------------------------------------------------------------- -->*/ 41 42 #ifndef SBMLTypeCodes_h 43 #define SBMLTypeCodes_h 44 45 46 #include <sbml/common/libsbml-config.h> 47 #include <sbml/common/extern.h> 48 49 LIBSBML_CPP_NAMESPACE_BEGIN 50 BEGIN_C_DECLS 51 52 53 /** 54 * @enum SBMLTypeCode_t 55 * @brief The enumeration of possible SBML core object types. 56 * 57 * @copydetails doc_what_are_typecodes 58 * 59 * @copydetails doc_additional_typecode_details 60 * 61 */ 62 typedef enum 63 { 64 SBML_UNKNOWN = 0 /*!< An unknown SBase type. The default, but will not be returned for any SBML core object, nor any fully-implemented package object. */ 65 , SBML_COMPARTMENT = 1 /*!< Compartment */ 66 , SBML_COMPARTMENT_TYPE = 2 /*!< CompartmentType (Note: L2 only) */ 67 , SBML_CONSTRAINT = 3 /*!< Constraint */ 68 , SBML_DOCUMENT = 4 /*!< SBMLDocument */ 69 , SBML_EVENT = 5 /*!< Event */ 70 , SBML_EVENT_ASSIGNMENT = 6 /*!< EventAssignment */ 71 , SBML_FUNCTION_DEFINITION = 7 /*!< FunctionDefinition */ 72 , SBML_INITIAL_ASSIGNMENT = 8 /*!< InitialAssignment */ 73 , SBML_KINETIC_LAW = 9 /*!< KineticLaw */ 74 , SBML_LIST_OF = 10 /*!< ListOf */ 75 , SBML_MODEL = 11 /*!< Model */ 76 , SBML_PARAMETER = 12 /*!< Parameter */ 77 , SBML_REACTION = 13 /*!< Reaction */ 78 , SBML_RULE = 14 /*!< Rule (Note: will not be returned from any getType function on any SBML core object, as it is an abstract base class only.) */ 79 , SBML_SPECIES = 15 /*!< Species */ 80 , SBML_SPECIES_REFERENCE = 16 /*!< SpeciesReference */ 81 , SBML_SPECIES_TYPE = 17 /*!< SpeciesType (Note: L2 only) */ 82 , SBML_MODIFIER_SPECIES_REFERENCE = 18 /*!< ModifierSpeciesReference */ 83 , SBML_UNIT_DEFINITION = 19 /*!< UnitDefinition */ 84 , SBML_UNIT = 20 /*!< Unit */ 85 , SBML_ALGEBRAIC_RULE = 21 /*!< AlgebraicRule */ 86 , SBML_ASSIGNMENT_RULE = 22 /*!< AssignmentRule */ 87 , SBML_RATE_RULE = 23 /*!< RateRule */ 88 , SBML_SPECIES_CONCENTRATION_RULE = 24 /*!< A Rule of the L1 type SpeciesConcentrationRule */ 89 , SBML_COMPARTMENT_VOLUME_RULE = 25 /*!< A Rule of the L1 type CompartmentVolumeRule */ 90 , SBML_PARAMETER_RULE = 26 /*!< A Rule of the L1 type ParameterRule */ 91 , SBML_TRIGGER = 27 /*!< Trigger */ 92 , SBML_DELAY = 28 /*!< Delay */ 93 , SBML_STOICHIOMETRY_MATH = 29 /*!< StoichiometryMath (Note: L2 only)*/ 94 , SBML_LOCAL_PARAMETER = 30 /*!< LocalParameter */ 95 , SBML_PRIORITY = 31 /*!< Priority */ 96 , SBML_GENERIC_SBASE = 32 /*!< Any SBase-derived class. Not returned by any getType function, but used internally for packages that extend the SBase class itself, in the PKGNAMEExtension classes (such as CompExtension). */ 97 } SBMLTypeCode_t; 98 99 100 101 /** 102 * This method takes an SBML type code and returns a string representing 103 * the code. 104 * 105 * @if clike LibSBML attaches an identifying code to every kind of SBML 106 * object. These are known as <em>SBML type codes</em>. The set of 107 * possible type codes is defined in the enumeration #SBMLTypeCode_t. 108 * The names of the type codes all begin with the characters 109 * @c SBML_. @endif@if java LibSBML attaches an identifying code to every 110 * kind of SBML object. These are known as <em>SBML type codes</em>. In 111 * other languages, the set of type codes is stored in an enumeration; in 112 * the Java language interface for libSBML, the type codes are defined as 113 * static integer constants in the interface class {@link 114 * libsbmlConstants}. The names of the type codes all begin with the 115 * characters @c SBML_. @endif@if python LibSBML attaches an identifying 116 * code to every kind of SBML object. These are known as <em>SBML type 117 * codes</em>. In the Python language interface for libSBML, the type 118 * codes are defined as static integer constants in the interface class 119 * @link libsbml@endlink. The names of the type codes all begin with the 120 * characters @c SBML_. @endif@if csharp LibSBML attaches an identifying 121 * code to every kind of SBML object. These are known as <em>SBML type 122 * codes</em>. In the C# language interface for libSBML, the type codes 123 * are defined as static integer constants in the interface class @link 124 * libsbml@endlink. The names of the type codes all begin with 125 * the characters @c SBML_. @endif@~ 126 * 127 * @return a human readable name for the given 128 * @if clike #SBMLTypeCode_t value@else SBML type code@endif. 129 * 130 * @note The caller does not own the returned string and is therefore not 131 * allowed to modify it. 132 * 133 */ 134 LIBSBML_EXTERN 135 const char * 136 SBMLTypeCode_toString (int tc, const char* pkgName); 137 138 139 END_C_DECLS 140 LIBSBML_CPP_NAMESPACE_END 141 142 #endif /* SBMLTypeCodes_h */ 143