nidas v1.2.3
XMLConfigWriter.h
Go to the documentation of this file.
1// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2// vim: set shiftwidth=4 softtabstop=4 expandtab:
3/*
4 ********************************************************************
5 ** NIDAS: NCAR In-situ Data Acquistion Software
6 **
7 ** 2005, Copyright University Corporation for Atmospheric Research
8 **
9 ** This program is free software; you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License as published by
11 ** the Free Software Foundation; either version 2 of the License, or
12 ** (at your option) any later version.
13 **
14 ** This program is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ** GNU General Public License for more details.
18 **
19 ** The LICENSE.txt file accompanying this software contains
20 ** a copy of the GNU General Public License. If it is not found,
21 ** write to the Free Software Foundation, Inc.,
22 ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 **
24 ********************************************************************
25*/
26
27#ifndef NIDAS_CORE_XMLCONFIGWRITER_H
28#define NIDAS_CORE_XMLCONFIGWRITER_H
29
30#include "DSMConfig.h"
31
32#include "XMLParser.h"
33#include "XMLWriter.h"
34
36
37#include <xercesc/framework/XMLFormatter.hpp>
38
39namespace nidas { namespace core {
40
42xercesc::DOMLSSerializerFilter
43{
44public:
45
50
51 xercesc::DOMNodeFilter::FilterAction
52 acceptNode(const xercesc::DOMNode* node) const;
53
54 unsigned long getWhatToShow() const;
55
56 void setWhatToShow(unsigned long val);
57
58 int getNumDSM() const { return _numDSM; }
59
60private:
61
63
64 unsigned long _whatToShow;
65
66 mutable int _numDSM;
67
68 xercesc::DOMNodeFilter::FilterAction
69 acceptDSMNode(const xercesc::DOMNode* node, bool count) const;
70
73
76};
77
82public:
83
85
86 XMLConfigWriter(const DSMConfig* dsm);
87
89
90 int getNumDSM() const { return _filter->getNumDSM(); }
91
92private:
93
95
98
101};
102
103}} // namespace nidas namespace core
104
105#endif
106
Class that should include all that is configurable about a DSM.
Definition DSMConfig.h:55
Definition XMLConfigWriter.h:43
int _numDSM
Definition XMLConfigWriter.h:66
XMLConfigWriterFilter & operator=(const XMLConfigWriterFilter &)
No assignment.
xercesc::DOMNodeFilter::FilterAction acceptDSMNode(const xercesc::DOMNode *node, bool count) const
Definition XMLConfigWriter.cc:108
void setWhatToShow(unsigned long val)
Definition XMLConfigWriter.cc:141
XMLConfigWriterFilter(const XMLConfigWriterFilter &)
No copying.
int getNumDSM() const
Definition XMLConfigWriter.h:58
unsigned long _whatToShow
Definition XMLConfigWriter.h:64
XMLConfigWriterFilter(const DSMConfig *dsm)
Only accept nodes for a certain dsm.
Definition XMLConfigWriter.cc:62
xercesc::DOMNodeFilter::FilterAction acceptNode(const xercesc::DOMNode *node) const
Definition XMLConfigWriter.cc:70
unsigned long getWhatToShow() const
Definition XMLConfigWriter.cc:146
const DSMConfig * _dsm
Definition XMLConfigWriter.h:62
An XMLWriter which writes the NIDAS XML configuration.
Definition XMLConfigWriter.h:81
XMLConfigWriter(const XMLConfigWriter &)
No copying.
int getNumDSM() const
Definition XMLConfigWriter.h:90
XMLConfigWriter()
Definition XMLConfigWriter.cc:42
XMLConfigWriterFilter * _filter
Definition XMLConfigWriter.h:94
~XMLConfigWriter()
Definition XMLConfigWriter.cc:56
XMLConfigWriter & operator=(const XMLConfigWriter &)
No assignment.
Wrapper class around xerces-c DOMWriter to write XML.
Definition XMLWriter.h:39
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31