/* * Copyright (c) 2017 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "common.h" #include "table_storage_impl.h" namespace ebpf { using std::string; using std::unique_ptr; /// A filesystem backed table storage class BpfFsTableStorage : public TableStorageImpl { public: class iterator : public TableStorageIteratorImpl { public: virtual ~iterator() {} virtual unique_ptr clone() const override; virtual self_type &operator++() override; virtual value_type &operator*() const override; virtual pointer operator->() const override; }; virtual ~BpfFsTableStorage() {} virtual bool Find(const string &name, TableStorage::iterator &result) const override; virtual bool Insert(const string &name, TableDesc &&desc) override; virtual bool Delete(const string &name) override; virtual unique_ptr begin() override; virtual unique_ptr end() override; virtual unique_ptr lower_bound(const string &k) override; virtual unique_ptr upper_bound(const string &k) override; virtual unique_ptr erase(const TableStorageIteratorImpl &it) override; private: }; bool BpfFsTableStorage::Find(const string &name, TableStorage::iterator &result) const { return false; } bool BpfFsTableStorage::Insert(const string &name, TableDesc &&desc) { return false; } bool BpfFsTableStorage::Delete(const string &name) { return false; } unique_ptr BpfFsTableStorage::begin() { return unique_ptr(); } unique_ptr BpfFsTableStorage::end() { return unique_ptr(); } unique_ptr BpfFsTableStorage::lower_bound(const string &k) { return unique_ptr(); } unique_ptr BpfFsTableStorage::upper_bound(const string &k) { return unique_ptr(); } unique_ptr BpfFsTableStorage::erase(const TableStorageIteratorImpl &it) { return unique_ptr(); } unique_ptr createBpfFsTableStorage() { auto t = make_unique(); t->Init(make_unique()); return t; } } // namespace ebpf