Hall-D Software
alpha
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
xdr_test.cpp
Go to the documentation of this file.
1
#include "
xdr_test.h
"
2
3
bool
test::operator=
(
const
test
&t2){
4
if
(!(
5
i
==t2.
i
&&
ui
==t2.
ui
&&
f
==t2.
f
&&
d
==t2.
d
&&
li
==t2.
li
&&
uli
==t2.
uli
&&
s
== t2.
s
6
)){
7
return
false
;
8
}
else
{
9
size_t
len=
vi
.size();
10
if
(len!=t2.
vi
.size()){
11
return
false
;
12
}
else
{
13
for
(
size_t
i
=0;
i
<len; ++
i
)
14
if
(
vi
[
i
]!=t2.
vi
[
i
])
15
return
false
;
16
}
17
}
18
return
true
;
19
}
20
21
struct
test
get_obj
(void){
22
test
t;
23
t.
i
=-512;
24
t.ui=512;
25
t.f=-3.1415;
26
t.d=-3.1415;
27
t.li=-123456789;
28
t.uli=123456789;
29
30
t.s=
"This is a string 1"
;
31
32
t.vi.push_back(-1);
33
t.vi.push_back(-2);
34
t.vi.push_back(-3);
35
t.vi.push_back(-4);
36
t.vi.push_back(-5);
37
38
return
t;
39
}
40
test::i
int i
Definition:
xdr_test.h:8
test::d
double d
Definition:
xdr_test.h:11
test::operator=
bool operator=(const test &t2)
Definition:
xdr_test.cpp:3
test::li
long long int li
Definition:
xdr_test.h:12
test::uli
unsigned long long int uli
Definition:
xdr_test.h:13
test::ui
unsigned int ui
Definition:
xdr_test.h:9
get_obj
struct test get_obj(void)
Definition:
xdr_test.cpp:21
test::vi
vector< int > vi
Definition:
xdr_test.h:16
test
Definition:
xdr_test.h:7
test::s
string s
Definition:
xdr_test.h:14
test::f
float f
Definition:
xdr_test.h:10
xdr_test.h
external
xstream
examples
xdr_test.cpp
Generated on Fri Jul 26 2019 14:03:11 for Hall-D Software by
1.8.5