Detailed Description
C++ wrapper for file readers and writers.
Definition in file objreader.h.
Go to the source code of this file.
Data Structures | |
class | scip::ObjReader |
C++ wrapper for file readers and writers. More... | |
Namespaces | |
scip | |
Functions | |
SCIP_EXPORT SCIP_RETCODE | SCIPincludeObjReader (SCIP *scip, scip::ObjReader *objreader, SCIP_Bool deleteobject) |
SCIP_EXPORT scip::ObjReader * | SCIPfindObjReader (SCIP *scip, const char *name) |
SCIP_EXPORT scip::ObjReader * | SCIPgetObjReader (SCIP *scip, SCIP_READER *reader) |
Function Documentation
◆ SCIPincludeObjReader()
SCIP_EXPORT SCIP_RETCODE SCIPincludeObjReader | ( | SCIP * | scip, |
scip::ObjReader * | objreader, | ||
SCIP_Bool | deleteobject | ||
) |
creates the file reader for the given file reader object and includes it in SCIP
The method should be called in one of the following ways:
- The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyReader* myreader = new MyReader(...); SCIP_CALL( SCIPincludeObjReader(scip, &myreader, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myreader; // delete reader AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjReader(scip, new MyReader(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyReader is called here
creates the file reader for the given file reader object and includes it in SCIP
- Parameters
-
scip SCIP data structure objreader file reader object deleteobject should the reader object be deleted when reader is freed?
Definition at line 146 of file objreader.cpp.
References NULL, SCIP_CALL, scip::ObjReader::scip_desc_, scip::ObjReader::scip_extension_, scip::ObjReader::scip_name_, SCIP_OKAY, and SCIPincludeReader().
Referenced by polyscip::Polyscip::Polyscip(), runSCIP(), SCIP_DECL_READERCOPY(), and scip::ObjReader::SCIP_DECL_READERWRITE().
◆ SCIPfindObjReader()
SCIP_EXPORT scip::ObjReader* SCIPfindObjReader | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the reader object of the given name, or 0 if not existing
- Parameters
-
scip SCIP data structure name name of file reader
Definition at line 171 of file objreader.cpp.
References NULL, SCIPfindReader(), and SCIPreaderGetData().
Referenced by scip::ObjReader::SCIP_DECL_READERWRITE().
◆ SCIPgetObjReader()
SCIP_EXPORT scip::ObjReader* SCIPgetObjReader | ( | SCIP * | scip, |
SCIP_READER * | reader | ||
) |
returns the reader object for the given file reader
- Parameters
-
scip SCIP data structure reader file reader
Definition at line 190 of file objreader.cpp.
References NULL, and SCIPreaderGetData().
Referenced by scip::ObjReader::SCIP_DECL_READERWRITE().