SST/macro
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
sprockit
sprockit
serialize_sizer.h
Go to the documentation of this file.
1
#ifndef SERIALIZE_SIZER_H
2
#define SERIALIZE_SIZER_H
3
4
namespace
sprockit
{
5
namespace
pvt {
6
7
class
ser_sizer
8
{
9
public
:
10
ser_sizer
() :
11
size_
(0)
12
{
13
}
14
15
template
<
class
T>
16
void
17
size
(T& t){
18
size_
+=
sizeof
(T);
19
}
20
21
void
22
size_string
(std::string& str);
23
24
void
25
add
(
size_t
s) {
26
size_
+= s;
27
}
28
29
size_t
30
size
()
const
{
31
return
size_
;
32
}
33
34
void
35
reset
() {
36
size_
= 0;
37
}
38
39
protected
:
40
size_t
size_
;
41
42
};
43
44
} }
45
46
#endif // SERIALIZE_SIZER_H
sprockit::pvt::ser_sizer::ser_sizer
ser_sizer()
Definition:
serialize_sizer.h:10
sprockit::pvt::ser_sizer::reset
void reset()
Definition:
serialize_sizer.h:35
sprockit
Definition:
basic_string_tokenizer.h:21
sprockit::pvt::ser_sizer::add
void add(size_t s)
Definition:
serialize_sizer.h:25
sprockit::pvt::ser_sizer::size_
size_t size_
Definition:
serialize_sizer.h:40
sprockit::pvt::ser_sizer::size
void size(T &t)
Definition:
serialize_sizer.h:17
sprockit::pvt::ser_sizer
Definition:
serialize_sizer.h:7
sprockit::pvt::ser_sizer::size
size_t size() const
Definition:
serialize_sizer.h:30
sprockit::pvt::ser_sizer::size_string
void size_string(std::string &str)
Generated by
1.8.11