SymEngine C++ API
symengine
printers
stringbox.h
1
#include <string>
2
#include <vector>
3
4
namespace
SymEngine
5
{
6
7
class
StringBox
8
{
9
private
:
10
std::vector<std::string>
lines_;
11
std::size_t
width_;
12
13
void
pad_lines(
std::size_t
new_width);
14
15
public
:
16
explicit
StringBox
(
std::string
s)
17
{
18
lines_.
push_back
(s);
19
width_ = s.
length
();
20
}
21
22
StringBox
(
std::string
s,
std::size_t
width)
23
{
24
lines_.
push_back
(s);
25
width_ = width;
26
}
27
28
StringBox
()
29
{
30
width_ = 0;
31
}
32
33
std::string
get_string()
const
;
34
void
add_below(
StringBox
&other);
35
void
add_below_unicode_line(
StringBox
&other);
36
void
add_power(
StringBox
&other);
37
void
enclose_abs();
38
void
enclose_parens();
39
void
enclose_sqbrackets();
40
void
enclose_curlies();
41
void
enclose_floor();
42
void
enclose_ceiling();
43
void
enclose_sqrt();
44
void
add_right(
StringBox
&other);
45
void
add_left_parens();
46
void
add_right_parens();
47
void
add_left_sqbracket();
48
void
add_right_sqbracket();
49
void
add_left_curly();
50
void
add_right_curly();
51
};
52
53
};
// namespace SymEngine
std::string
SymEngine::StringBox
Definition:
stringbox.h:8
SymEngine
Main namespace for SymEngine package.
Definition:
add.cpp:19
std::vector::push_back
T push_back(T... args)
std::string::length
T length(T... args)
std::size_t
std::vector< std::string >