ad_map_access
IStorage.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2018-2021 Intel Corporation
4 //
5 // SPDX-License-Identifier: MIT
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
14 #include <string>
15 
17 namespace ad {
19 namespace map {
21 namespace serialize {
22 
26 class IStorage
27 {
28 protected: // Constructor/Destructor
29  IStorage() = default;
30  virtual ~IStorage() = default;
31 
32 public: // To be implemented
33  virtual const char *getStorageType() = 0;
34 
35 protected: // To be implemented
36  virtual bool doOpenForRead(std::string const &config) = 0;
37  virtual bool doOpenForWrite(std::string const &config) = 0;
38  virtual bool doCloseForRead() = 0;
39  virtual bool doCloseForWrite() = 0;
40  virtual bool doWrite(const void *x, std::size_t bytes) = 0;
41  virtual bool doRead(void *x, std::size_t bytes) = 0;
42 };
43 
44 } // namespace serialize
45 } // namespace map
46 } // namespace ad
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::serialize::IStorage
Storage Interface.
Definition: IStorage.hpp:26