Generated on for Gecode by doxygen 1.17.0

Values for the param statements of a spec. More...

#include <gecode/instance.hh>

Public Member Functions

 Params (void)
 No parameters.
void set (const std::string &name, const std::string &value)
 Set parameter name to value.
void set (const std::string &assignments)
 Parse and set parameters given as name=value.
bool get (const std::string &name, std::string &value) const
 Return whether name is set, and if so store its value in value.
int size (void) const
 Return number of parameters.
std::string name (int i) const
 Return the name of parameter i.

Detailed Description

Values for the param statements of a spec.

Definition at line 364 of file instance.hh.

Constructor & Destructor Documentation

◆ Params()

Gecode::Instance::Params::Params ( void )

No parameters.

Definition at line 60 of file data.cpp.

Member Function Documentation

◆ set() [1/2]

void Gecode::Instance::Params::set ( const std::string & name,
const std::string & value )

Set parameter name to value.

Definition at line 64 of file data.cpp.

◆ set() [2/2]

void Gecode::Instance::Params::set ( const std::string & assignments)

Parse and set parameters given as name=value.

Several parameters are separated by commas, as in a=1,b=2, so a value cannot contain a comma, and empty items are skipped. Throws Error if a parameter does not have the form name=value.

Definition at line 77 of file data.cpp.

◆ get()

bool Gecode::Instance::Params::get ( const std::string & name,
std::string & value ) const

Return whether name is set, and if so store its value in value.

Definition at line 95 of file data.cpp.

◆ size()

int Gecode::Instance::Params::size ( void ) const

Return number of parameters.

Definition at line 105 of file data.cpp.

◆ name()

std::string Gecode::Instance::Params::name ( int i) const

Return the name of parameter i.

Definition at line 110 of file data.cpp.


The documentation for this class was generated from the following files: