Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
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
caosdb
Software
caosdb-cpplib
Commits
33b57593
Verified
Commit
33b57593
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: consolidation
parent
b4ae3e2b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!12
F consolidation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/caosdb/value.h
+6
-1
6 additions, 1 deletion
include/caosdb/value.h
src/caosdb/entity.cpp
+0
-7
0 additions, 7 deletions
src/caosdb/entity.cpp
with
6 additions
and
8 deletions
include/caosdb/value.h
+
6
−
1
View file @
33b57593
...
...
@@ -23,7 +23,7 @@
#define CAOSDB_VALUE_H
#include
"caosdb/protobuf_helper.h"
// for ProtoMessageWrapper
#include
"caosdb/entity/v1alpha1/main.pb.h"
// for RepeatedPtrField, Message
#include
"caosdb/logging.h"
#include
<google/protobuf/util/json_util.h>
// for MessageToJson...
#include
<memory>
// for unique_ptr
#include
<string>
// for string
...
...
@@ -102,9 +102,13 @@ public:
class
Value
:
public
ProtoMessageWrapper
<
ProtoValue
>
{
public:
explicit
inline
Value
(
const
Value
&
value
){
this
->
wrapped
=
value
.
wrapped
;
}
inline
Value
()
:
ProtoMessageWrapper
<
ProtoValue
>
()
{
// has NULL_VALUE now
}
explicit
inline
Value
(
ProtoValue
*
wrapped
)
:
ProtoMessageWrapper
<
ProtoValue
>
(
wrapped
)
{}
explicit
inline
Value
(
const
std
::
string
&
value
)
:
ProtoMessageWrapper
<
ProtoValue
>
()
{
this
->
wrapped
->
mutable_scalar_value
()
->
set_string_value
(
value
);
...
...
@@ -214,6 +218,7 @@ public:
inline
auto
ToString
()
const
noexcept
->
const
std
::
string
{
CAOSDB_DEBUG_MESSAGE_STRING
(
*
wrapped
,
out
)
CAOSDB_LOG_DEBUG
(
"caosdb::entity"
)
<<
"HERE 1 ["
<<
wrapped
<<
"] "
<<
out
;
return
out
;
}
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/entity.cpp
+
0
−
7
View file @
33b57593
...
...
@@ -197,14 +197,7 @@ auto Entity::SetVersionId(const std::string &id) -> void {
}
auto
Entity
::
CopyTo
(
ProtoEntity
*
target
)
->
void
{
CAOSDB_DEBUG_MESSAGE_STRING
(
*
(
this
->
wrapped
),
out
);
CAOSDB_LOG_DEBUG
(
logger_name
)
<<
"COPY ENTITY: "
<<
out
;
CAOSDB_DEBUG_MESSAGE_STRING
(
*
target
,
out_2
);
CAOSDB_LOG_DEBUG
(
logger_name
)
<<
"COPY ENTITY TO: "
<<
out_2
;
target
->
Clear
();
target
->
CopyFrom
(
*
(
this
->
wrapped
));
CAOSDB_DEBUG_MESSAGE_STRING
(
*
target
,
out_3
);
CAOSDB_LOG_DEBUG
(
logger_name
)
<<
"COPY ENTITY FINAL: "
<<
out_3
;
}
auto
Entity
::
SetRole
(
Role
role
)
->
void
{
...
...
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