lintel 0.2.0
Loading...
Searching...
No Matches
DataStorage.h
Go to the documentation of this file.
1#ifndef PLC_DATASTORAGE_H
2#define PLC_DATASTORAGE_H
3
4#include <ostream>
5#include <sstream>
6#include <utility>
7
9
10namespace lintel {
13{
14private:
16 std::string m_extraInformation;
17
18public:
22 : m_type(type), m_extraInformation(std::move(extraInformation))
23 {}
24
25 DataStorage() = default;
26
28 [[nodiscard]] const PropertyRepositoryType &getType() const { return m_type; }
29
31 [[nodiscard]] const std::string &getExtraInformation() const { return m_extraInformation; }
32
33 friend std::ostream &operator<<(std::ostream &os, const DataStorage &storage)
34 {
35 os << storage.m_type << "(" << storage.m_extraInformation << ")";
36 return os;
37 }
38
39 operator std::string() const
40 {
41 std::ostringstream out;
42 out << *this;
43 return out.str();
44 }
45};
46
47}// namespace lintel
48#endif// PLC_DATASTORAGE_H
Definition DataStorage.h:13
const PropertyRepositoryType & getType() const
Definition DataStorage.h:28
DataStorage(const PropertyRepositoryType &type, std::string extraInformation)
Definition DataStorage.h:21
const std::string & getExtraInformation() const
Definition DataStorage.h:31
friend std::ostream & operator<<(std::ostream &os, const DataStorage &storage)
Definition DataStorage.h:33
Definition PropertyRepositoryType.h:11
@ DEFAULT
Definition PropertyRepositoryType.h:16
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9