Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
4aca35a5
Commit
4aca35a5
authored
9 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
defaul_types: add override
parent
3596f8a9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/opendht/default_types.h
+8
-8
8 additions, 8 deletions
include/opendht/default_types.h
with
8 additions
and
8 deletions
include/opendht/default_types.h
+
8
−
8
View file @
4aca35a5
...
@@ -43,7 +43,7 @@ struct DhtMessage : public Value::Serializable<DhtMessage>
...
@@ -43,7 +43,7 @@ struct DhtMessage : public Value::Serializable<DhtMessage>
}
}
static
const
ValueType
TYPE
;
static
const
ValueType
TYPE
;
virtual
const
ValueType
&
getType
()
const
{
virtual
const
ValueType
&
getType
()
const
override
{
return
TYPE
;
return
TYPE
;
}
}
static
Value
::
Filter
getFilter
()
{
return
{};
}
static
Value
::
Filter
getFilter
()
{
return
{};
}
...
@@ -64,7 +64,7 @@ public:
...
@@ -64,7 +64,7 @@ public:
template
<
typename
Type
>
template
<
typename
Type
>
struct
SignedValue
:
public
Value
::
Serializable
<
Type
>
struct
SignedValue
:
public
Value
::
Serializable
<
Type
>
{
{
virtual
void
unpackValue
(
const
Value
&
v
)
{
virtual
void
unpackValue
(
const
Value
&
v
)
override
{
from
=
v
.
owner
.
getId
();
from
=
v
.
owner
.
getId
();
Value
::
Serializable
<
Type
>::
unpackValue
(
v
);
Value
::
Serializable
<
Type
>::
unpackValue
(
v
);
}
}
...
@@ -78,7 +78,7 @@ public:
...
@@ -78,7 +78,7 @@ public:
template
<
typename
Type
>
template
<
typename
Type
>
struct
EncryptedValue
:
public
SignedValue
<
Type
>
struct
EncryptedValue
:
public
SignedValue
<
Type
>
{
{
virtual
void
unpackValue
(
const
Value
&
v
)
{
virtual
void
unpackValue
(
const
Value
&
v
)
override
{
to
=
v
.
recipient
;
to
=
v
.
recipient
;
SignedValue
<
Type
>::
unpackValue
(
v
);
SignedValue
<
Type
>::
unpackValue
(
v
);
}
}
...
@@ -100,13 +100,13 @@ struct ImMessage : public SignedValue<ImMessage>
...
@@ -100,13 +100,13 @@ struct ImMessage : public SignedValue<ImMessage>
:
sent
(
std
::
chrono
::
system_clock
::
now
()),
im_message
(
std
::
move
(
msg
))
{}
:
sent
(
std
::
chrono
::
system_clock
::
now
()),
im_message
(
std
::
move
(
msg
))
{}
static
const
ValueType
TYPE
;
static
const
ValueType
TYPE
;
virtual
const
ValueType
&
getType
()
const
{
virtual
const
ValueType
&
getType
()
const
override
{
return
TYPE
;
return
TYPE
;
}
}
static
Value
::
Filter
getFilter
()
{
static
Value
::
Filter
getFilter
()
{
return
SignedValue
::
getFilter
();
return
SignedValue
::
getFilter
();
}
}
virtual
void
unpackValue
(
const
Value
&
v
)
{
virtual
void
unpackValue
(
const
Value
&
v
)
override
{
to
=
v
.
recipient
;
to
=
v
.
recipient
;
SignedValue
::
unpackValue
(
v
);
SignedValue
::
unpackValue
(
v
);
}
}
...
@@ -124,7 +124,7 @@ struct TrustRequest : public EncryptedValue<TrustRequest>
...
@@ -124,7 +124,7 @@ struct TrustRequest : public EncryptedValue<TrustRequest>
TrustRequest
(
std
::
string
s
,
const
Blob
&
d
)
:
service
(
s
),
payload
(
d
)
{}
TrustRequest
(
std
::
string
s
,
const
Blob
&
d
)
:
service
(
s
),
payload
(
d
)
{}
static
const
ValueType
TYPE
;
static
const
ValueType
TYPE
;
virtual
const
ValueType
&
getType
()
const
{
virtual
const
ValueType
&
getType
()
const
override
{
return
TYPE
;
return
TYPE
;
}
}
static
Value
::
Filter
getFilter
()
{
static
Value
::
Filter
getFilter
()
{
...
@@ -142,7 +142,7 @@ struct IceCandidates : public EncryptedValue<IceCandidates>
...
@@ -142,7 +142,7 @@ struct IceCandidates : public EncryptedValue<IceCandidates>
IceCandidates
(
Value
::
Id
msg_id
,
Blob
ice
)
:
id
(
msg_id
),
ice_data
(
ice
)
{}
IceCandidates
(
Value
::
Id
msg_id
,
Blob
ice
)
:
id
(
msg_id
),
ice_data
(
ice
)
{}
static
const
ValueType
TYPE
;
static
const
ValueType
TYPE
;
virtual
const
ValueType
&
getType
()
const
{
virtual
const
ValueType
&
getType
()
const
override
{
return
TYPE
;
return
TYPE
;
}
}
static
Value
::
Filter
getFilter
()
{
static
Value
::
Filter
getFilter
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment