Line |
Branch |
Exec |
Source |
1 |
|
|
/***************************************************************************** |
2 |
|
|
* |
3 |
|
|
* $Id$ |
4 |
|
|
* |
5 |
|
|
* Copyright 2010 Richard Hacker (lerichi at gmx dot net) |
6 |
|
|
* |
7 |
|
|
* This file is part of the pdserv library. |
8 |
|
|
* |
9 |
|
|
* The pdserv library is free software: you can redistribute it and/or modify |
10 |
|
|
* it under the terms of the GNU Lesser General Public License as published |
11 |
|
|
* by the Free Software Foundation, either version 3 of the License, or (at |
12 |
|
|
* your option) any later version. |
13 |
|
|
* |
14 |
|
|
* The pdserv library is distributed in the hope that it will be useful, but |
15 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
16 |
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
17 |
|
|
* License for more details. |
18 |
|
|
* |
19 |
|
|
* You should have received a copy of the GNU Lesser General Public License |
20 |
|
|
* along with the pdserv library. If not, see <http://www.gnu.org/licenses/>. |
21 |
|
|
* |
22 |
|
|
*****************************************************************************/ |
23 |
|
|
|
24 |
|
|
#ifndef MSRVARIABLE_H |
25 |
|
|
#define MSRVARIABLE_H |
26 |
|
|
|
27 |
|
|
#include "../Variable.h" |
28 |
|
|
#include "DirectoryNode.h" |
29 |
|
|
|
30 |
|
|
namespace PdServ { |
31 |
|
|
class Variable; |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
namespace MsrProto { |
35 |
|
|
|
36 |
|
|
class XmlElement; |
37 |
|
|
|
38 |
|
5236 |
class Variable: public DirectoryNode { |
39 |
|
|
public: |
40 |
|
|
Variable(const PdServ::Variable *v, size_t index, |
41 |
|
|
const PdServ::DataType& dtype, |
42 |
|
|
const PdServ::DataType::DimType& dim, size_t offset); |
43 |
|
|
|
44 |
|
|
const PdServ::Variable * const variable; |
45 |
|
|
|
46 |
|
|
const size_t index; |
47 |
|
|
const PdServ::DataType& dtype; |
48 |
|
|
const PdServ::DataType::DimType dim; |
49 |
|
|
const size_t offset; |
50 |
|
|
const size_t memSize; |
51 |
|
|
bool hidden; |
52 |
|
|
|
53 |
|
|
void setAttributes(XmlElement &element, |
54 |
|
|
bool shortReply, bool derived) const; |
55 |
|
|
void addCompoundFields(XmlElement &element, |
56 |
|
|
const PdServ::DataType& ) const; |
57 |
|
|
|
58 |
|
|
bool hasChildren(const Variable*) const; |
59 |
|
|
|
60 |
|
|
private: |
61 |
|
|
void setDataType(XmlElement &element, const PdServ::DataType& dtype, |
62 |
|
|
const PdServ::DataType::DimType& dim) const; |
63 |
|
|
}; |
64 |
|
|
|
65 |
|
|
} |
66 |
|
|
|
67 |
|
|
#endif //MSRVARIABLE_H |
68 |
|
|
|