Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
ShipInfo.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MODEL_SHIPINFO_HPP_
2#define IV_SRC_MODEL_SHIPINFO_HPP_
3
5
6#include <string>
7
8namespace iv::model
9{
10
12{
14 ShipInfo(const ShipInfo &other);
15 ShipInfo(ShipInfo &&other) noexcept;
16 ShipInfo &operator=(const ShipInfo &other);
17 ShipInfo &operator=(ShipInfo &&other) noexcept;
19
26 bool load(const iv::file::xml::node &nodeDataProject);
27 bool save(iv::file::xml::node &nodeDataProject) const;
28
30 std::string hull;
31 std::string imoNumber;
32 std::string shipName;
33 std::string shipOwner;
34 std::string shipyard;
35
36private:
37 struct Sections
38 {
39 static constexpr std::string_view shipInfo {"ShipInfo"};
40 };
41 struct Keys
42 {
43 static constexpr std::string_view hull {"Hull"};
44 static constexpr std::string_view imo {"IMO"};
45 static constexpr std::string_view shipName {"ShipName"};
46 static constexpr std::string_view classificationSociety {"Classification"};
47 static constexpr std::string_view shipOwner {"ShipOwner"};
48 static constexpr std::string_view shipyard {"Shipyard"};
49 };
51 {
52 static constexpr std::string string {};
53 };
54};
55
56}// namespace iv::model
57
58#endif//IV_SRC_MODEL_SHIPINFO_HPP_
Definition xmlFile.hpp:15
Definition DiamarModel.cpp:14
Definition ShipInfo.hpp:51
Definition ShipInfo.hpp:42
static constexpr std::string_view classificationSociety
Definition ShipInfo.hpp:46
static constexpr std::string_view shipyard
Definition ShipInfo.hpp:48
static constexpr std::string_view hull
Definition ShipInfo.hpp:43
static constexpr std::string_view imo
Definition ShipInfo.hpp:44
static constexpr std::string_view shipName
Definition ShipInfo.hpp:45
static constexpr std::string_view shipOwner
Definition ShipInfo.hpp:47
Definition ShipInfo.hpp:38
static constexpr std::string_view shipInfo
Definition ShipInfo.hpp:39
Definition ShipInfo.hpp:12
ShipInfo & operator=(const ShipInfo &other)
Definition ShipInfo.cpp:17
bool load(const iv::file::xml::node &nodeDataProject)
Loads ship info from the XML node.
Definition ShipInfo.cpp:48
std::string shipOwner
Definition ShipInfo.hpp:33
std::string hull
Definition ShipInfo.hpp:30
std::string shipName
Definition ShipInfo.hpp:32
std::string classificationSociety
Definition ShipInfo.hpp:29
ShipInfo(const ShipInfo &other)
std::string imoNumber
Definition ShipInfo.hpp:31
bool save(iv::file::xml::node &nodeDataProject) const
Definition ShipInfo.cpp:62
std::string shipyard
Definition ShipInfo.hpp:34