492a2603e4452f96db3ae9f6f691aa3870f89712
[public/netxms.git] / src / server / core / rootobj.cpp
1 /*
2 ** NetXMS - Network Management System
3 ** Copyright (C) 2003, 2004 Victor Kirhenshtein
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 **
19 ** $module: rootobj.cpp
20 **
21 **/
22
23 #include "nxcore.h"
24
25
26 //
27 // Service root class default constructor
28 //
29
30 ServiceRoot::ServiceRoot()
31 :UniversalRoot()
32 {
33 m_dwId = BUILTIN_OID_SERVICEROOT;
34 strcpy(m_szName, "All Services");
35 }
36
37
38 //
39 // Service root class destructor
40 //
41
42 ServiceRoot::~ServiceRoot()
43 {
44 }
45
46
47 //
48 // Template root class default constructor
49 //
50
51 TemplateRoot::TemplateRoot()
52 :UniversalRoot()
53 {
54 m_dwId = BUILTIN_OID_TEMPLATEROOT;
55 strcpy(m_szName, "Templates");
56 }
57
58
59 //
60 // Template root class destructor
61 //
62
63 TemplateRoot::~TemplateRoot()
64 {
65 }
66
67
68 //
69 // Redefined status calculation for template root
70 //
71
72 void TemplateRoot::CalculateCompoundStatus(BOOL bForcedRecalc)
73 {
74 m_iStatus = STATUS_NORMAL;
75 }
76
77
78 //
79 // Policy root class default constructor
80 //
81
82 PolicyRoot::PolicyRoot()
83 :UniversalRoot()
84 {
85 m_dwId = BUILTIN_OID_POLICYROOT;
86 strcpy(m_szName, "Policies");
87 }
88
89
90 //
91 // Policy root class destructor
92 //
93
94 PolicyRoot::~PolicyRoot()
95 {
96 }
97
98
99 //
100 // Redefined status calculation for policy root
101 //
102
103 void PolicyRoot::CalculateCompoundStatus(BOOL bForcedRecalc)
104 {
105 m_iStatus = STATUS_NORMAL;
106 }