Clone
ixen <ixen@copyhandler.com>
committed
on 07 Jun 15
Bugfix: buffer size changes were not stored in the database (CH-171).
LoggerImprovements + 5 more
src/libchcore/ConfigNode.cpp (+23 -1)
6 6 //  it under the terms of the GNU Library General Public License
7 7 //  (version 2) as published by the Free Software Foundation;
8 8 //
9 9 //  This program is distributed in the hope that it will be useful,
10 10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 12 //  GNU General Public License for more details.
13 13 //
14 14 //  You should have received a copy of the GNU Library General Public
15 15 //  License along with this program; if not, write to the
16 16 //  Free Software Foundation, Inc.,
17 17 //  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 18 // ============================================================================
19 19 #include "stdafx.h"
20 20 #include "ConfigNode.h"
21 21
22 22 BEGIN_CHCORE_NAMESPACE
23 23
24 24 namespace details
25 25 {
26  
27 26         ConfigNode::ConfigNode(object_id_t oidObjectID, const TString& strNodeName, int iOrder, const TString& strValue) :
28 27                 m_oidObjectID(oidObjectID),
29 28                 m_iOrder(m_setModifications, iOrder),
30 29                 m_strNodeName(m_setModifications, strNodeName),
31 30                 m_strValue(m_setModifications, strValue)
32 31         {
33 32                 m_setModifications[eMod_Added] = true;
34 33         }
35 34
  35         ConfigNode::ConfigNode(const ConfigNode& rSrc) :
  36                 m_oidObjectID(rSrc.m_oidObjectID),
  37                 m_iOrder(m_setModifications, rSrc.m_iOrder),
  38                 m_strNodeName(m_setModifications, rSrc.m_strNodeName),
  39                 m_strValue(m_setModifications, rSrc.m_strValue)
  40         {
  41                 m_setModifications = rSrc.m_setModifications;
  42         }
  43
  44         ConfigNode& ConfigNode::operator=(const ConfigNode& rSrc)
  45         {
  46                 if(this != &rSrc)
  47                 {
  48                         m_oidObjectID = rSrc.m_oidObjectID;
  49                         m_iOrder = rSrc.m_iOrder;
  50                         m_strNodeName = rSrc.m_strNodeName;
  51                         m_strValue = rSrc.m_strValue;
  52                         m_setModifications = rSrc.m_setModifications;
  53                 }
  54
  55                 return *this;
  56         }
  57
36 58         TString ConfigNode::GetNodeName() const
37 59         {
38 60                 return m_strNodeName;
39 61         }
40 62
41 63         int ConfigNode::GetOrder() const
42 64         {
43 65                 return m_iOrder;
44 66         }
45 67 }
46 68
47 69 END_CHCORE_NAMESPACE