NeoCpp
map_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 "neocpp/data/interface/list_interface.h"
21 #include <string>
22 
23 #ifndef NEOCPP_DATA_INTERFACE_NEO4J_MAP_INTERFACE_H_
24 #define NEOCPP_DATA_INTERFACE_NEO4J_MAP_INTERFACE_H_
25 
26 namespace Neocpp {
27 
29 
33  public:
34  virtual ~DbMapInterface() {}
35 
37  virtual unsigned int size() = 0;
38 
40  virtual bool element_exists(std::string key) = 0;
41 
43  virtual std::string get_string_element(std::string key, \
44  int char_buffer_size) = 0;
45 
47  virtual std::string get_string_element(std::string key) = 0;
48 
50  virtual bool get_bool_element(std::string key) = 0;
51 
53  virtual int get_int_element(std::string key) = 0;
54 
56  virtual double get_float_element(std::string key) = 0;
57 
59  virtual DbListInterface* get_list_element(std::string key) = 0;
60 
62  virtual std::string to_string() = 0;
63 };
64 
65 } // namespace Neocpp
66 
67 #endif // NEOCPP_DATA_INTERFACE_NEO4J_MAP_INTERFACE_H_
A Neo4j List.
Definition: list_interface.h:31
virtual int get_int_element(std::string key)=0
Get an int element out of a map.
virtual double get_float_element(std::string key)=0
Get a float element out of a map.
virtual std::string get_string_element(std::string key, int char_buffer_size)=0
Get a string element out of a map.
virtual unsigned int size()=0
Get the size of the map.
virtual DbListInterface * get_list_element(std::string key)=0
Get a list element out of a map.
virtual bool get_bool_element(std::string key)=0
Get a bool element out of a map.
virtual std::string to_string()=0
Get the string representation of the map.
A Neo4j Map.
Definition: map_interface.h:32
virtual bool element_exists(std::string key)=0
Does an element exist in the map.
Definition: neo4j_interface.h:28