APRONXX 0.9.14
/builddir/build/BUILD/apron-0.9.15-build/apron-0.9.15/apronxx/apxx_var.hh
Go to the documentation of this file.
1/* -*- C++ -*-
2 * apxx_var.hh
3 *
4 * APRON Library / C++ class wrappers
5 *
6 * Copyright (C) Antoine Mine' 2007
7 *
8 */
9/* This file is part of the APRON Library, released under LGPL license
10 with an exception allowing the redistribution of statically linked
11 executables.
12
13 Please read the COPYING file packaged in the distribution.
14*/
15
16#ifndef __APXX_VAR_HH
17#define __APXX_VAR_HH
18
19#include "ap_var.h"
20
21
22namespace apron {
23
24
25/* ================================= */
26/* var */
27/* ================================= */
28
29
39class var {
40
41protected:
42 ap_var_t v;
43
44public:
45
46 /* constructors */
47 /* ============ */
48
51
53 var(const void* x);
54
56 var(const std::string& x);
57
59 var(const var& x);
60
62
63
64 /* destructor */
65 /* ========== */
66
69
71 ~var();
72
74
75
76 /* assignments */
77 /* =========== */
78
81
83 var& operator=(const var& x);
84
86 var& operator=(const std::string& x);
87
89 var& operator=(const void* x);
90
92
93
94 /* conversions */
95 /* =========== */
96
99
104 operator char*() const;
105
107 operator std::string() const;
108
110
111
112 /* comparisons */
113 /* =========== */
114
117
119 friend int compare(const var& x, const var& y);
120
122 friend bool operator==(const var& x, const var& y);
123
125 friend bool operator!=(const var& x, const var& y);
126
128 friend bool operator>=(const var& x, const var& y);
129
131 friend bool operator<=(const var& x, const var& y);
132
134 friend bool operator>(const var& x, const var& y);
135
137 friend bool operator<(const var& x, const var& y);
138
140
141
142 /* print */
143 /* ===== */
144
147
149 friend std::ostream& operator<< (std::ostream& os, const var& s);
150
152 void print(FILE* stream=stdout) const;
153
155
156
157 /* C-level compatibility */
158 /* ===================== */
159
162
164 const ap_var_t& get_ap_var_t() const;
165
167 ap_var_t& get_ap_var_t();
168
170
171};
172
173#include "apxx_var_inline.hh"
174
175}
176
177
178#endif /* __APXX_VAR_HH */
Variable name (ap_var_t wrapper).
Definition apxx_var.hh:39
friend bool operator>(const var &x, const var &y)
Compares two variable names (calls ap_var_operations->to_compare).
void print(FILE *stream=stdout) const
Prints to a C stream.
Definition apxx_var_inline.hh:144
friend bool operator>=(const var &x, const var &y)
Compares two variable names (calls ap_var_operations->to_compare).
var & operator=(const var &x)
Assigns the variable name (calls ap_var_operations->copy, ->free).
Definition apxx_var_inline.hh:55
const ap_var_t & get_ap_var_t() const
Returns a reference to the APRON object wrapped (no copy).
Definition apxx_var_inline.hh:156
friend bool operator==(const var &x, const var &y)
Compares two variables names (calls ap_var_operations->to_compare).
ap_var_t v
Definition apxx_var.hh:42
friend bool operator<(const var &x, const var &y)
Compares two variable names (calls ap_var_operations->to_compare).
~var()
Frees the variable name (calls ap_var_operations->free).
Definition apxx_var_inline.hh:46
friend bool operator<=(const var &x, const var &y)
Compares two variable names (calls ap_var_operations->to_compare).
var(const void *x)
Makes a variable name from a pointer (copied with ap_var_operations->copy).
Definition apxx_var_inline.hh:27
friend std::ostream & operator<<(std::ostream &os, const var &s)
Printing.
friend int compare(const var &x, const var &y)
Compares two variable names (calls ap_var_operations->to_compare).
friend bool operator!=(const var &x, const var &y)
Compares two variable names (calls ap_var_operations->to_compare).
Definition apxx_abstract0.hh:27