IntEnum.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T),
5  * Karlsruhe Institute of Technology (KIT), all rights reserved.
6  *
7  * ArmarX is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * ArmarX is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * @author Fabian Peller-Konrad (fabian dot peller-konrad at kit dot edu)
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
26 // STD/STL
27 #include <map>
28 #include <string>
29 
30 // Base class
31 #include "../detail/EnumVariant.h"
32 
33 namespace armarx::aron::type
34 {
35  class IntEnum;
36  using IntEnumPtr = std::shared_ptr<IntEnum>;
37 
38  /**
39  * @brief The IntEnum class. It represents the int enum type
40  * An int enum contains a map from strings to int values
41  */
42  class IntEnum : public detail::EnumVariant<type::dto::IntEnum, IntEnum, int>
43  {
44  public:
46 
47  // constructors
48  IntEnum(const Path& path = Path());
49  IntEnum(const type::dto::IntEnum&, const Path& path = Path());
50 
52 
53  // virtual implementations
54  std::string getShortName() const override;
55  std::string getFullName() const override;
56  };
57 } // namespace armarx::aron::type
armarx::aron::type::IntEnum
The IntEnum class.
Definition: IntEnum.h:42
armarx::aron::Path
The Path class.
Definition: Path.h:36
armarx::aron::type::IntEnum::IntEnum
IntEnum(const Path &path=Path())
Definition: IntEnum.cpp:30
armarx::aron::type::detail::EnumVariant
Definition: EnumVariant.h:39
armarx::aron::type
A convenience header to include all aron files (full include, not forward declared)
Definition: aron_conversions.cpp:9
armarx::aron::type::IntEnum::toIntEnumDTO
type::dto::IntEnumPtr toIntEnumDTO() const
Definition: IntEnum.cpp:40
armarx::aron::type::IntEnum::getShortName
std::string getShortName() const override
get a short name of this specific type
Definition: IntEnum.cpp:47
armarx::armem::server::ltm::detail::mixin::Path
std::filesystem::path Path
Definition: DiskStorageMixin.h:17
armarx::aron::type::IntEnumPtr
std::shared_ptr< IntEnum > IntEnumPtr
Definition: IntEnum.h:36
armarx::aron::type::Variant::path
const Path path
Definition: Variant.h:139
armarx::aron::type::IntEnum::getFullName
std::string getFullName() const override
get the full name of this specific type
Definition: IntEnum.cpp:53