APRONXX 0.9.15
apron::varname Class Reference

Stream modifier to set variable names to dimensions. More...

#include <apxx_dimension.hh>

Public Member Functions

 varname (const std::vector< std::string > &names)
 Creates a modifier to associate variable names to dimensions.
 

Protected Attributes

const std::vector< std::string > & names
 Names of variables.
 

Static Protected Attributes

static const int xindex
 Index to stream-local data, allocated with xalloc.
 

Detailed Description

Stream modifier to set variable names to dimensions.

By default, all level 0 std::ostream printing functions output x0 to xn to refer to dimensions 0 to n. By inserting this modifier into a stream, you can customize the variable name.

The information is local to the stream.

The modifier is not used for level 1 printing functions as an environment mapping dimensions to variable names is already available. Also, the modifier does not affect the behavior of print functions that take the mapping as an (optional) argument.

Constructor & Destructor Documentation

◆ varname()

varname::varname ( const std::vector< std::string > & names)
inline

Creates a modifier to associate variable names to dimensions.

  • names[i] is the name to give to dimension i.

If there are not enough names, printing functions will revert to xi, xi+1... To disable variable names, simply pass an empty vector.

A reference to names is kept by the object and will be passed to the stream by the modifier. The stream will then make a deep copy and the varname object and the original vector can be safely deleted.

Member Data Documentation

◆ names

const std::vector<std::string>& apron::varname::names
protected

Names of variables.

◆ xindex

const int apron::varname::xindex
staticprotected

Index to stream-local data, allocated with xalloc.


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