Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FbcModelPlugin C API for createObjective and createGeneProduct #252

Merged
merged 1 commit into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/sbml/packages/fbc/extension/FbcModelPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2546,6 +2546,14 @@ FbcModelPlugin_getNumFluxBounds(SBasePlugin_t * fbc)
}


LIBSBML_EXTERN
Objective_t*
FbcModelPlugin_createObjective(SBasePlugin_t * fbc)
{
return static_cast<FbcModelPlugin*>(fbc)->createObjective();
}


LIBSBML_EXTERN
int
FbcModelPlugin_addObjective(SBasePlugin_t * fbc, Objective_t * obj)
Expand Down Expand Up @@ -2596,6 +2604,14 @@ FbcModelPlugin_setActiveObjectiveId(SBasePlugin_t * fbc, const char * activeId)
}


LIBSBML_EXTERN
GeneProduct_t*
FbcModelPlugin_createGeneProduct(SBasePlugin_t * fbc)
{
return static_cast<FbcModelPlugin*>(fbc)->createGeneProduct();
}


LIBSBML_EXTERN
int
FbcModelPlugin_addGeneProduct(SBasePlugin_t * fbc, GeneProduct_t * fb)
Expand Down
36 changes: 36 additions & 0 deletions src/sbml/packages/fbc/extension/FbcModelPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,24 @@ unsigned int
FbcModelPlugin_getNumFluxBounds(SBasePlugin_t * fmp);


/**
* Creates a new Objective_t object, adds it to this FbcModelPlugin_t object
* and returns the created object.
*
* @param fmp the FbcModelPlugin_t structure to which the
* Objective_t should be added.
*
* @return a new Objective_t object instance.
*
* @copydetails doc_returned_unowned_pointer
*
* @memberof FbcModelPlugin_t
*/
LIBSBML_EXTERN
Objective_t*
FbcModelPlugin_createObjective(SBasePlugin_t * fmp);


/**
* Appends a copy of the given Objective_t structure to the given FbcModelPlugin_t
* structure.
Expand Down Expand Up @@ -1932,6 +1950,24 @@ int
FbcModelPlugin_setActiveObjectiveId(SBasePlugin_t * fmp, const char * activeObjective);


/**
* Creates a new GeneProduct_t object, adds it to this FbcModelPlugin_t object
* and returns the created object.
*
* @param fmp the FbcModelPlugin_t structure to which the
* GeneProduct_t should be added.
*
* @return a new GeneProduct_t object instance.
*
* @copydetails doc_returned_unowned_pointer
*
* @memberof FbcModelPlugin_t
*/
LIBSBML_EXTERN
GeneProduct_t*
FbcModelPlugin_createGeneProduct(SBasePlugin_t * fmp);


/**
* Appends a copy of the given GeneProduct_t structure to the given FbcModelPlugin_t
* structure.
Expand Down