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

Protected Attributes

ap_var_t v
 

Printing

void print (FILE *stream=stdout) const
 Prints to a C stream.
 

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]

ap_var_t & var::get_ap_var_t ( )
inline

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

◆ get_ap_var_t() [2/2]

const ap_var_t & var::get_ap_var_t ( ) const
inline

Returns a 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 std::string & x)
inline

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

◆ operator=() [2/3]

var & var::operator= ( const var & 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.

Member Data Documentation

◆ v

ap_var_t apron::var::v
protected

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