NeoCpp
object_interface.h
1 /*
2 Apache 2.0 License
3 
4 Copyright 2018 Alex Barry
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 
18 */
19 
20 #include <string>
21 #include "neocpp/data/interface/map_interface.h"
22 #include "neocpp/data/interface/list_interface.h"
23 
24 #ifndef NEOCPP_DATA_INTERFACE_NEO4J_OBJECT_INTERFACE_H_
25 #define NEOCPP_DATA_INTERFACE_NEO4J_OBJECT_INTERFACE_H_
26 
27 namespace Neocpp {
28 
30 
34  public:
35  virtual ~DbObjectInterface() {}
36 
38 
41  virtual bool is_node() = 0;
42 
44 
47  virtual bool is_edge() = 0;
48 
50 
53  virtual bool is_path() = 0;
54 
56  virtual std::string to_string() = 0;
57 
59 
62  virtual DbMapInterface* properties() = 0;
63 
65 
68  virtual DbListInterface* labels() = 0;
69 
71 
74  virtual std::string type() = 0;
75 
77 
80  virtual bool forward() = 0;
81 
83 
86  virtual unsigned int size() = 0;
87 
89 
92  virtual DbObjectInterface* get_path_element(int path_index) = 0;
93 };
94 
95 }
96 
97 #endif // NEOCPP_DATA_INTERFACE_NEO4J_OBJECT_INTERFACE_H_
A Neo4j List.
Definition: list_interface.h:31
virtual bool is_node()=0
Is this a node?
virtual bool forward()=0
Was the edge traversed in it&#39;s natural direction?
virtual DbMapInterface * properties()=0
Get the properties of the object.
virtual bool is_path()=0
Is this a path?
virtual DbListInterface * labels()=0
Get the labels of the node.
virtual std::string to_string()=0
Get the string representation of the object.
A Neo4j Map.
Definition: map_interface.h:32
virtual bool is_edge()=0
Is this an edge?
virtual std::string type()=0
Get the type of the edge.
virtual DbObjectInterface * get_path_element(int path_index)=0
Get an element from a path object.
virtual unsigned int size()=0
Get the size of the path.
A Neo4j Object.
Definition: object_interface.h:33
Definition: neo4j_interface.h:28