CBMC
threeval.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
9
#include "
threeval.h
"
10
11
#include <ostream>
12
13
const
char
*
tvt::to_string
()
const
14
{
15
switch
(
value
)
16
{
17
case
tv_enumt::TV_TRUE
:
return
"TRUE"
;
18
case
tv_enumt::TV_FALSE
:
return
"FALSE"
;
19
case
tv_enumt::TV_UNKNOWN
:
return
"UNKNOWN"
;
20
default
:
return
"ERROR"
;
21
}
22
}
23
24
std::ostream &
operator <<
(std::ostream &out,
const
tvt
&a)
25
{
26
return
out << a.
to_string
();
27
}
tvt
Definition:
threeval.h:20
tvt::value
tv_enumt value
Definition:
threeval.h:98
tvt::to_string
const char * to_string() const
Definition:
threeval.cpp:13
tvt::tv_enumt::TV_UNKNOWN
@ TV_UNKNOWN
tvt::tv_enumt::TV_TRUE
@ TV_TRUE
tvt::tv_enumt::TV_FALSE
@ TV_FALSE
operator<<
std::ostream & operator<<(std::ostream &out, const tvt &a)
Definition:
threeval.cpp:24
threeval.h
src
util
threeval.cpp
Generated by
1.9.1