APRONXX  0.9.12
Protected Attributes | List of all members
apron::var Class Reference

Variable name (ap_var_t wrapper). More...

#include <apxx_var.hh>

Public Member Functions

Constructors

Variable name.

 var (const void *x)
 Makes a variable name from a pointer (copied with ap_var_operations->copy). More...
 
 var (const std::string &x)
 Makes a variable name from a string (copied with ap_var_operations->copy). More...
 
 var (const var &x)
 Copies the variable name (calls ap_var_operations->copy). More...
 
Destructor
 ~var ()
 Frees the variable name (calls ap_var_operations->free). More...
 
Assignments
varoperator= (const var &x)
 Assigns the variable name (calls ap_var_operations->copy, ->free). More...
 
varoperator= (const std::string &x)
 Assigns the variable name (calls ap_var_operations->copy, ->free). More...
 
varoperator= (const void *x)
 Assigns the variable name (calls ap_var_operations->copy, ->free). More...
 
Conversions
 operator char * () const
 Converts to a C string (calls ap_var_operations->to_string). More...
 
 operator std::string () const
 Converts to a C++ string (calls ap_var_operations->to_string). More...
 
C API compatibility
const ap_var_t & get_ap_var_t () const
 Returns a reference to the APRON object wrapped (no copy). More...
 
ap_var_t & get_ap_var_t ()
 Returns a (modifiable) reference to the APRON object wrapped (no copy). More...
 

Protected Attributes

ap_var_t v
 

Friends

Comparisons
int compare (const var &x, const var &y)
 Compares two variable names (calls ap_var_operations->to_compare). More...
 
bool operator== (const var &x, const var &y)
 Compares two variables names (calls ap_var_operations->to_compare). More...
 
bool operator!= (const var &x, const var &y)
 Compares two variable names (calls ap_var_operations->to_compare). More...
 
bool operator>= (const var &x, const var &y)
 Compares two variable names (calls ap_var_operations->to_compare). More...
 
bool operator<= (const var &x, const var &y)
 Compares two variable names (calls ap_var_operations->to_compare). More...
 
bool operator> (const var &x, const var &y)
 Compares two variable names (calls ap_var_operations->to_compare). More...
 
bool operator< (const var &x, const var &y)
 Compares two variable names (calls ap_var_operations->to_compare). More...
 

Printing

void print (FILE *stream=stdout) const
 Prints to a C stream. More...
 
std::ostream & operator<< (std::ostream &os, const var &s)
 Printing. More...
 

Detailed Description

Variable name (ap_var_t wrapper).

A var object designates a variable name, using a void* pointer (i.e., ap_var_t). Variable names replace dimensions in all level 1 operations. Variable names can be copied, freed, compared, and converted to string. The actual implementation of these operators is defined using the global pointer ap_var_operations. By default, ap_var_operations implements dynamically allocated C-style NULL-terminated strings.

Constructor & Destructor Documentation

◆ var() [1/3]

var::var ( const void *  x)
inline

Makes a variable name from a pointer (copied with ap_var_operations->copy).

◆ var() [2/3]

var::var ( const std::string &  x)
inline

Makes a variable name from a string (copied with ap_var_operations->copy).

◆ var() [3/3]

var::var ( const var x)
inline

Copies the variable name (calls ap_var_operations->copy).

◆ ~var()

var::~var ( )
inline

Frees the variable name (calls ap_var_operations->free).

Member Function Documentation

◆ get_ap_var_t() [1/2]

const ap_var_t & var::get_ap_var_t ( ) const
inline

Returns a reference to the APRON object wrapped (no copy).

◆ get_ap_var_t() [2/2]

ap_var_t & var::get_ap_var_t ( )
inline

Returns a (modifiable) reference to the APRON object wrapped (no copy).

◆ operator char *()

var::operator char * ( ) const
inline

Converts to a C string (calls ap_var_operations->to_string).

The C string should be freed with malloc by the caller.

◆ operator std::string()

var::operator std::string ( ) const
inline

Converts to a C++ string (calls ap_var_operations->to_string).

◆ operator=() [1/3]

var & var::operator= ( const var x)
inline

Assigns the variable name (calls ap_var_operations->copy, ->free).

◆ operator=() [2/3]

var & var::operator= ( const std::string &  x)
inline

Assigns the variable name (calls ap_var_operations->copy, ->free).

◆ operator=() [3/3]

var & var::operator= ( const void *  x)
inline

Assigns the variable name (calls ap_var_operations->copy, ->free).

◆ print()

void var::print ( FILE *  stream = stdout) const
inline

Prints to a C stream.

Friends And Related Function Documentation

◆ compare

int compare ( const var x,
const var y 
)
friend

Compares two variable names (calls ap_var_operations->to_compare).

◆ operator!=

bool operator!= ( const var x,
const var y 
)
friend

Compares two variable names (calls ap_var_operations->to_compare).

◆ operator<

bool operator< ( const var x,
const var y 
)
friend

Compares two variable names (calls ap_var_operations->to_compare).

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const var s 
)
friend

Printing.

◆ operator<=

bool operator<= ( const var x,
const var y 
)
friend

Compares two variable names (calls ap_var_operations->to_compare).

◆ operator==

bool operator== ( const var x,
const var y 
)
friend

Compares two variables names (calls ap_var_operations->to_compare).

◆ operator>

bool operator> ( const var x,
const var y 
)
friend

Compares two variable names (calls ap_var_operations->to_compare).

◆ operator>=

bool operator>= ( const var x,
const var y 
)
friend

Compares two variable names (calls ap_var_operations->to_compare).

Member Data Documentation

◆ v

ap_var_t apron::var::v
protected

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