Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ds-ws18
yfs-lab
Commits
cd5cae17
Commit
cd5cae17
authored
Nov 03, 2014
by
Anjo Vahldiek
Browse files
add unsigned long marshall/unmarshall
parent
34dcdd3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
rpc/marshall.h
View file @
cd5cae17
...
...
@@ -117,6 +117,7 @@ marshall& operator<<(marshall &, char);
marshall
&
operator
<<
(
marshall
&
,
unsigned
short
);
marshall
&
operator
<<
(
marshall
&
,
short
);
marshall
&
operator
<<
(
marshall
&
,
unsigned
long
long
);
marshall
&
operator
<<
(
marshall
&
,
unsigned
long
);
marshall
&
operator
<<
(
marshall
&
,
const
std
::
string
&
);
class
unmarshall
{
...
...
@@ -182,6 +183,7 @@ unmarshall& operator>>(unmarshall &, short &);
unmarshall
&
operator
>>
(
unmarshall
&
,
unsigned
int
&
);
unmarshall
&
operator
>>
(
unmarshall
&
,
int
&
);
unmarshall
&
operator
>>
(
unmarshall
&
,
unsigned
long
long
&
);
unmarshall
&
operator
>>
(
unmarshall
&
,
unsigned
long
&
);
unmarshall
&
operator
>>
(
unmarshall
&
,
std
::
string
&
);
template
<
class
C
>
marshall
&
...
...
rpc/rpc.cc
View file @
cd5cae17
...
...
@@ -687,6 +687,15 @@ operator<<(marshall &m, unsigned long long x)
return
m
;
}
marshall
&
operator
<<
(
marshall
&
m
,
unsigned
long
x
)
{
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
int
))
return
m
<<
(
unsigned
int
)
x
;
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
long
long
))
return
m
<<
(
unsigned
long
long
)
x
;
}
void
marshall
::
pack
(
int
x
)
{
...
...
@@ -798,6 +807,15 @@ operator>>(unmarshall &u, unsigned long long &x)
return
u
;
}
unmarshall
&
operator
>>
(
unmarshall
&
u
,
unsigned
long
&
x
)
{
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
int
))
return
u
>>
(
unsigned
int
&
)
x
;
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
long
long
))
return
u
>>
(
unsigned
long
long
&
)
x
;
}
unmarshall
&
operator
>>
(
unmarshall
&
u
,
std
::
string
&
s
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment