LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
locationnode.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_LOCATIONNODE_HPP
8#define LOGICALACCESS_LOCATIONNODE_HPP
9
11
12#include <string>
13#include <vector>
14#include <iostream>
15
16#include <memory>
17
18namespace logicalaccess
19{
23class LLA_CORE_API LocationNode
24{
25 public:
30
34 virtual ~LocationNode();
35
40 void setName(const std::string &name);
41
46 std::string getName() const;
47
52 std::vector<std::shared_ptr<LocationNode>> &getChildrens();
53
58 void setParent(std::weak_ptr<LocationNode> parent);
59
64 std::shared_ptr<LocationNode> getParent() const;
65
70 void setNeedAuthentication(bool needed);
71
76 bool getNeedAuthentication() const;
77
82 void setHasProperties(bool hasProperties);
83
88 bool getHasProperties() const;
89
94 void setLength(size_t length);
95
100 size_t getLength() const;
101
106 void setLocation(std::shared_ptr<Location> location);
107
112 std::shared_ptr<Location> getLocation() const;
113
118 void setUnit(size_t unit);
119
124 size_t getUnit() const;
125
130 void setCanRead(bool can);
131
136 bool getCanRead() const;
137
142 void setCanWrite(bool can);
143
148 bool getCanWrite() const;
149
150 protected:
154 std::vector<std::shared_ptr<LocationNode>> d_childrens;
155
159 std::weak_ptr<LocationNode> d_parent;
160
165
170
174 size_t d_length;
175
179 std::string d_name;
180
184 std::shared_ptr<Location> d_location;
185
189 size_t d_unit;
190
195
200};
201}
202
203#endif /* LOGICALACCESS_LOCATIONNODE_HPP */
A location node description. This describe a location on a hierachical view.
Definition: locationnode.hpp:24
bool d_needAuthentication
Need authentication to access the node data.
Definition: locationnode.hpp:164
size_t d_length
The data node length.
Definition: locationnode.hpp:174
size_t d_unit
The byte unit.
Definition: locationnode.hpp:189
bool d_can_write
Write capability.
Definition: locationnode.hpp:199
bool d_hasProperties
The node has properties or not.
Definition: locationnode.hpp:169
std::vector< std::shared_ptr< LocationNode > > d_childrens
The childrens node.
Definition: locationnode.hpp:154
std::weak_ptr< LocationNode > d_parent
The parent node.
Definition: locationnode.hpp:159
std::shared_ptr< Location > d_location
The associated location.
Definition: locationnode.hpp:184
std::string d_name
The current location node name.
Definition: locationnode.hpp:179
bool d_can_read
Read capability.
Definition: locationnode.hpp:194
Location.
Definition: asn1.hpp:9