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
85703569
Commit
85703569
authored
3 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
DRAFT: Implement appending and getting properties
parent
febbf560
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
ENH: Allow insertion and deletion of single entities
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/caosdb/entity.h
+0
-3
0 additions, 3 deletions
include/caosdb/entity.h
src/caosdb/entity.cpp
+8
-0
8 additions, 0 deletions
src/caosdb/entity.cpp
with
8 additions
and
3 deletions
include/caosdb/entity.h
+
0
−
3
View file @
85703569
...
...
@@ -338,8 +338,6 @@ private:
*/
class
Properties
{
public:
// TODO(fspreck) Implementations needed (basically everything). See Parents
// container for inspiration.
/**
* Return the current size of the properties container.
*
...
...
@@ -448,7 +446,6 @@ public:
auto
SetUnit
(
const
std
::
string
&
unit
)
->
void
;
// Currently no references or lists.
auto
SetDatatype
(
const
std
::
string
&
datatype
)
->
void
;
// TODO(fspreck) this one is tricky. See AppendParent
auto
AppendProperty
(
const
Property
&
property
)
->
void
;
auto
AppendParent
(
const
Parent
&
parent
)
->
void
;
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/entity.cpp
+
8
−
0
View file @
85703569
...
...
@@ -141,6 +141,14 @@ auto Entity::AppendParent(const Parent &parent) -> void {
this
->
parents
.
Append
(
parent
);
}
[[
nodiscard
]]
auto
Entity
::
GetProperties
()
const
->
const
Properties
&
{
return
properties
;
}
auto
Entity
::
AppendProperty
(
const
Property
&
property
)
->
void
{
this
->
properties
.
Append
(
property
);
}
auto
Entity
::
CreateProtoEntity
()
->
ProtoEntity
*
{
return
google
::
protobuf
::
Arena
::
CreateMessage
<
ProtoEntity
>
(
get_arena
());
}
...
...
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