ClassReader.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @author Fabian Reister ( fabian dot reister at kit dot edu )
17 * @date 2021
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <map>
25#include <optional>
26
29
31{
33 {
34 public:
35 ClassReader() = default;
36
37 std::optional<armem::clazz::ObjectClass> getObjectClass(const std::string& providerName,
38 const armarx::ObjectID& id);
39
40 /**
41 * @brief Get object class information for object class IDs.
42 * @param objectIDs The object class IDs.
43 * @return The corresponding object classes.
44 * @throw armarx::armem::error::QueryFailed If the memory query failed.
45 */
46 std::map<armarx::ObjectID, armem::clazz::ObjectClass>
47 getObjectClasses(const std::vector<armarx::ObjectID>& objectIDs);
48
49 std::map<armarx::ObjectID, armem::clazz::ObjectClass> getAllObjectClasses();
50
51 protected:
52 std::string propertyPrefix() const final;
53 Properties defaultProperties() const final;
54 };
55
56
57} // namespace armarx::armem::obj::clazz
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
Definition ObjectID.h:11
std::optional< armem::clazz::ObjectClass > getObjectClass(const std::string &providerName, const armarx::ObjectID &id)
std::map< armarx::ObjectID, armem::clazz::ObjectClass > getObjectClasses(const std::vector< armarx::ObjectID > &objectIDs)
Get object class information for object class IDs.
std::map< armarx::ObjectID, armem::clazz::ObjectClass > getAllObjectClasses()
Properties defaultProperties() const final
std::string propertyPrefix() const final