Generated on for Gecode by doxygen 1.17.0
Gecode::Instance::Type Class Reference

Type of the values that a declaration or a capture reads. More...

#include <gecode/instance/impl.hpp>

Public Member Functions

 Type (ReadType r=ReadType::INT)
 Initialize as r.
bool ranged (void) const
 Test whether the type has a range, possibly through its name.
Type use (const Stmt *d) const
 Return a use of the type defined by type statement d.

Public Attributes

ReadType read
 What the type reads.
std::unique_ptr< Expr > lo
 Lower bound of a range, or null.
std::unique_ptr< Expr > hi
 Upper bound of a range, or null.
bool exclusive
 Whether the upper bound is excluded.
const Stmt * named
 The type statement defining a named type, or null.
std::string name
 Name of a named type.
std::string alphabet
 Symbols of an alphabet type.
std::string blank
 Symbols that stand for 0.
std::string strip
 Symbols to skip.
long long int base
 Value of the first symbol.

Detailed Description

Type of the values that a declaration or a capture reads.

An integer type can be a range lo..hi, or lo..<hi without hi, where one of the bounds can be left out. An alphabet type reads one character for each value. A use of a named type (see Stmt::Kind::TYPE) copies its definition except for the bounds, which are evaluated where it is defined.

Definition at line 538 of file impl.hpp.

Constructor & Destructor Documentation

◆ Type()

Gecode::Instance::Type::Type ( ReadType r = ReadType::INT)
inlineexplicit

Initialize as r.

Definition at line 561 of file impl.hpp.

Member Function Documentation

◆ ranged()

bool Gecode::Instance::Type::ranged ( void ) const
inline

Test whether the type has a range, possibly through its name.

Definition at line 564 of file impl.hpp.

◆ use()

Type Gecode::Instance::Type::use ( const Stmt * d) const
inline

Return a use of the type defined by type statement d.

Definition at line 568 of file impl.hpp.

Member Data Documentation

◆ read

ReadType Gecode::Instance::Type::read

What the type reads.

Definition at line 541 of file impl.hpp.

◆ lo

std::unique_ptr<Expr> Gecode::Instance::Type::lo

Lower bound of a range, or null.

Definition at line 543 of file impl.hpp.

◆ hi

std::unique_ptr<Expr> Gecode::Instance::Type::hi

Upper bound of a range, or null.

Definition at line 545 of file impl.hpp.

◆ exclusive

bool Gecode::Instance::Type::exclusive

Whether the upper bound is excluded.

Definition at line 547 of file impl.hpp.

◆ named

const Stmt* Gecode::Instance::Type::named

The type statement defining a named type, or null.

Definition at line 549 of file impl.hpp.

◆ name

std::string Gecode::Instance::Type::name

Name of a named type.

Definition at line 551 of file impl.hpp.

◆ alphabet

std::string Gecode::Instance::Type::alphabet

Symbols of an alphabet type.

Definition at line 553 of file impl.hpp.

◆ blank

std::string Gecode::Instance::Type::blank

Symbols that stand for 0.

Definition at line 555 of file impl.hpp.

◆ strip

std::string Gecode::Instance::Type::strip

Symbols to skip.

Definition at line 557 of file impl.hpp.

◆ base

long long int Gecode::Instance::Type::base

Value of the first symbol.

Definition at line 559 of file impl.hpp.


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