Reader spec for a textual instance format.
More...
#include <gecode/instance.hh>
|
| | Spec (void) |
| | The empty spec (reads only empty input).
|
|
| std::string | name (void) const |
| | Return the format name declared by the spec (may be empty).
|
|
| Data | read (const std::string &path, const Params &p=Params()) const |
| | Read instance file path.
|
| Data | read_text (const std::string &text, const std::string &origin="<input>", const Params &p=Params()) const |
| | Read instance text, using origin in error messages.
|
| Data | catalog (const std::string &path, const Params &p=Params()) const |
| | List the instances in file path.
|
| Data | catalog_text (const std::string &text, const std::string &origin="<input>", const Params &p=Params()) const |
| | List the instances in text, using origin in error messages.
|
|
| static Spec | parse (const std::string &text, const std::string &origin="<spec>") |
| | Parse spec text, using origin in error messages.
|
| static Spec | load (const std::string &path) |
| | Load the spec in file path.
|
Reader spec for a textual instance format.
Definition at line 470 of file instance.hh.
◆ Spec()
| Gecode::Instance::Spec::Spec |
( |
void | | ) |
|
The empty spec (reads only empty input).
Definition at line 1264 of file spec.cpp.
◆ parse()
| Spec Gecode::Instance::Spec::parse |
( |
const std::string & | text, |
|
|
const std::string & | origin = "<spec>" ) |
|
static |
Parse spec text, using origin in error messages.
Definition at line 1268 of file spec.cpp.
◆ load()
| Spec Gecode::Instance::Spec::load |
( |
const std::string & | path | ) |
|
|
static |
Load the spec in file path.
Definition at line 1275 of file spec.cpp.
◆ name()
| std::string Gecode::Instance::Spec::name |
( |
void | | ) |
const |
Return the format name declared by the spec (may be empty).
Definition at line 1280 of file spec.cpp.
◆ read()
| Data Gecode::Instance::Spec::read |
( |
const std::string & | path, |
|
|
const Params & | p = Params() ) const |
Read instance file path.
The parameters p give values for the spec's param statements.
Definition at line 1285 of file spec.cpp.
◆ read_text()
| Data Gecode::Instance::Spec::read_text |
( |
const std::string & | text, |
|
|
const std::string & | origin = "<input>", |
|
|
const Params & | p = Params() ) const |
Read instance text, using origin in error messages.
Definition at line 1290 of file spec.cpp.
◆ catalog()
| Data Gecode::Instance::Spec::catalog |
( |
const std::string & | path, |
|
|
const Params & | p = Params() ) const |
List the instances in file path.
The result has the integer instances, the number of instances in the file (1 if the spec has no instances statement), the string array name when every instance defines a name, and the string array failed when an instance fails a check or lacks or repeats a sections line: the first such failure of each instance, or the empty string.
Definition at line 1295 of file spec.cpp.
◆ catalog_text()
| Data Gecode::Instance::Spec::catalog_text |
( |
const std::string & | text, |
|
|
const std::string & | origin = "<input>", |
|
|
const Params & | p = Params() ) const |
List the instances in text, using origin in error messages.
Definition at line 1300 of file spec.cpp.
The documentation for this class was generated from the following files: