Merge lp:~zorba-coders/zorba/bug-1188058 into lp:zorba/system-module

Proposed by Chris Hillery
Status: Merged
Merged at revision: 37
Proposed branch: lp:~zorba-coders/zorba/bug-1188058
Merge into: lp:zorba/system-module
Diff against target: 718 lines (+217/-140)
8 files modified
src/CMakeLists.txt (+1/-3)
src/com/CMakeLists.txt (+0/-14)
src/com/zorba-xquery/CMakeLists.txt (+0/-14)
src/com/zorba-xquery/www/CMakeLists.txt (+0/-14)
src/com/zorba-xquery/www/modules/CMakeLists.txt (+0/-14)
src/system.xq (+52/-35)
src/system.xq.src/system.cpp (+128/-45)
src/system.xq.src/system.h (+36/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1188058
Reviewer Review Type Date Requested Status
Chris Hillery Approve
Luis Rodriguez Gonzalez Approve
Review via email: mp+178905@code.launchpad.net

Commit message

Update non-core "system" module to Zorba 3.0 standards. Added system:all-properties() function.

To post a comment you must log in.
lp:~zorba-coders/zorba/bug-1188058 updated
37. By Luis Rodriguez Gonzalez

Changes for Zorba 3.0 done

38. By Luis Rodriguez Gonzalez

Forgot to add SystemModule::getKey()

Revision history for this message
Luis Rodriguez Gonzalez (kuraru) :
review: Approve
Revision history for this message
Chris Hillery (ceejatec) wrote :

Looks very good, nice work. However, the moduleDocumentation test doesn't pass, so there must be a typo somewhere in the XQDoc. Also, I suspect once you fix that, it will complain that all those public variable declarations need to have XQDoc; you'll probably need to restore the doc from the old version. (%private variables, like errors codes, don't need XQDoc, but public ones do as far as I know.)

review: Needs Fixing
lp:~zorba-coders/zorba/bug-1188058 updated
39. By Luis Rodriguez Gonzalez

Fixed XQDoc

Revision history for this message
Luis Rodriguez Gonzalez (kuraru) wrote :

> Looks very good, nice work. However, the moduleDocumentation test doesn't
> pass, so there must be a typo somewhere in the XQDoc. Also, I suspect once you
> fix that, it will complain that all those public variable declarations need to
> have XQDoc; you'll probably need to restore the doc from the old version.
> (%private variables, like errors codes, don't need XQDoc, but public ones do
> as far as I know.)

Done.

Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188058/+merge/178905

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting criteria failed for the following merge proposals:

https://code.launchpad.net/~zorba-coders/zorba/bug-1188058/+merge/178905 :
Votes: {'Approve': 2, 'Needs commit message': 1}

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1188058/+merge/178905

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu/job/CommitZorba/111/console to view the results.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188058/+merge/178905

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2011-07-26 10:43:21 +0000
+++ src/CMakeLists.txt 2013-08-08 20:52:48 +0000
@@ -14,6 +14,4 @@
1414
15# all external module libraries are generated in the directory15# all external module libraries are generated in the directory
16# of the corresponding .xq file16# of the corresponding .xq file
17MESSAGE(STATUS "Add com")17DECLARE_ZORBA_MODULE (URI "http://zorba.io/modules/system" VERSION 1.0 FILE "system.xq")
18ADD_SUBDIRECTORY(com)
19MESSAGE(STATUS "End modules")
2018
=== removed directory 'src/com'
=== removed file 'src/com/CMakeLists.txt'
--- src/com/CMakeLists.txt 2011-10-06 08:19:44 +0000
+++ src/com/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
1# Copyright 2006-2008 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14ADD_SUBDIRECTORY(zorba-xquery)
150
=== removed directory 'src/com/zorba-xquery'
=== removed file 'src/com/zorba-xquery/CMakeLists.txt'
--- src/com/zorba-xquery/CMakeLists.txt 2011-10-06 08:19:44 +0000
+++ src/com/zorba-xquery/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
1# Copyright 2006-2008 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14ADD_SUBDIRECTORY(www)
150
=== removed directory 'src/com/zorba-xquery/www'
=== removed file 'src/com/zorba-xquery/www/CMakeLists.txt'
--- src/com/zorba-xquery/www/CMakeLists.txt 2011-10-06 08:19:44 +0000
+++ src/com/zorba-xquery/www/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
1# Copyright 2006-2008 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14ADD_SUBDIRECTORY(modules)
150
=== removed directory 'src/com/zorba-xquery/www/modules'
=== removed file 'src/com/zorba-xquery/www/modules/CMakeLists.txt'
--- src/com/zorba-xquery/www/modules/CMakeLists.txt 2011-07-01 09:24:04 +0000
+++ src/com/zorba-xquery/www/modules/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
1# Copyright 2006-2008 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/system" VERSION 1.0 FILE "system.xq")
150
=== renamed file 'src/com/zorba-xquery/www/modules/system.xq' => 'src/system.xq'
--- src/com/zorba-xquery/www/modules/system.xq 2013-06-15 19:49:56 +0000
+++ src/system.xq 2013-08-08 20:52:48 +0000
@@ -1,4 +1,4 @@
1xquery version "3.0";1jsoniq version "1.0";
22
3(:3(:
4 : Copyright 2006-2009 The FLWOR Foundation.4 : Copyright 2006-2009 The FLWOR Foundation.
@@ -18,12 +18,10 @@
18(:~18(:~
19 : The system module allows developers to access system properties.19 : The system module allows developers to access system properties.
20 : Part of these system properties are environment variables,20 : Part of these system properties are environment variables,
21 : local variable to the process running Zorba, and properties defined by Zorba.21 : local variable to the process running Zorba, and properties defined by Zorba.<p/>
22 : <br />
23 : To avoid conflicts between environment variables and properties defined by Zorba,22 : To avoid conflicts between environment variables and properties defined by Zorba,
24 : all environment variables are prefixed with <i>env.</i>.23 : all environment variables are prefixed with <i>env.</i>.<p/>
25 : <br />24 : For instance, the following query: <p/>
26 : For instance, the following query: <br />
27 : <pre class="ace-static">25 : <pre class="ace-static">
28 : import module namespace system = "http://www.zorba-xquery.com/modules/system";26 : import module namespace system = "http://www.zorba-xquery.com/modules/system";
29 : 27 :
@@ -31,19 +29,19 @@
31 : return concat($prop, ": ", system:property($prop), "29 : return concat($prop, ": ", system:property($prop), "
32 : ")30 : ")
33 : </pre>31 : </pre>
34 : <br />32 : <p/>
35 : Will output:33 : Will output:
36 : <pre class="ace-static">34 : <pre class="ace-static">
37 : env.TERM_PROGRAM: Apple_Terminal35 : env.TERM_PROGRAM: Apple_Terminal
38 : ...36 : ...
39 : </pre>37 : </pre>
40 : In this example, it is important to notice that the environnement variable PATH38 : In this example, it is important to notice that the environnement variable PATH
41 : with the key env.PATH.39 : with the key env.PATH.<p/>
42 :40 :
43 : @author Markus Pilman41 : @author Markus Pilman
44 : @project Zorba/Input Output/System42 : @project Zorba/Input Output/System
45 :)43 :)
46module namespace system = 'http://www.zorba-xquery.com/modules/system';44module namespace system = "http://zorba.io/modules/system";
4745
48declare namespace an = "http://www.zorba-xquery.com/annotations";46declare namespace an = "http://www.zorba-xquery.com/annotations";
4947
@@ -53,12 +51,12 @@
53(:~51(:~
54 : The name of the operating system (os.name).52 : The name of the operating system (os.name).
55 :)53 :)
56declare variable $system:os-name as xs:string := "os.name";54declare variable $system:OS-NAME as xs:string := "os.name";
5755
58(:~56(:~
59 : The name of the computer the process is running on (os.node.name).57 : The name of the computer the process is running on (os.node.name).
60 :)58 :)
61declare variable $system:os-node-name as xs:string := "os.node.name";59declare variable $system:OS-NODE-NAME as xs:string := "os.node.name";
6260
63(:~61(:~
64 : The major version number of the Windows installation or62 : The major version number of the Windows installation or
@@ -66,7 +64,7 @@
66 : (os.version.major).64 : (os.version.major).
67 : <b>Works on Windows only.</b>65 : <b>Works on Windows only.</b>
68 :)66 :)
69declare variable $system:os-version-major as xs:string := "os.version.major";67declare variable $system:OS-VERSION-MAJOR as xs:string := "os.version.major";
7068
71(:~69(:~
72 : The minor version number of the Windows installation or70 : The minor version number of the Windows installation or
@@ -74,7 +72,7 @@
74 : (os.version.minor).72 : (os.version.minor).
75 : <b>Works on Windows only.</b>73 : <b>Works on Windows only.</b>
76 :)74 :)
77declare variable $system:os-version-minor as xs:string := "os.version.minor";75declare variable $system:OS-VERSION-MINOR as xs:string := "os.version.minor";
7876
79(:~77(:~
80 : The build number of the Windows installation or78 : The build number of the Windows installation or
@@ -82,7 +80,7 @@
82 : (os.version.build).80 : (os.version.build).
83 : <b>Works on Windows only.</b>81 : <b>Works on Windows only.</b>
84 :)82 :)
85declare variable $system:os-version-build as xs:string := "os.version.build";83declare variable $system:OS-VERSION-BUILD as xs:string := "os.version.build";
8684
87(:~85(:~
88 : The release of this UNIX installation or86 : The release of this UNIX installation or
@@ -90,105 +88,108 @@
90 : (os.version.release).88 : (os.version.release).
91 : <b>Works on UNIX based operating systems only.</b>89 : <b>Works on UNIX based operating systems only.</b>
92 :)90 :)
93declare variable $system:os-version-release as xs:string := "os.version.release";91declare variable $system:OS-VERSION-RELEASE as xs:string := "os.version.release";
92
94(:~93(:~
95 : The version of this UNIX installation or94 : The version of this UNIX installation or
96 : an empty string if the process does not run on a UNIX/Linux installation95 : an empty string if the process does not run on a UNIX/Linux installation
97 : (os.version.version).96 : (os.version.version).
98 : <b>Works on UNIX based operating systems only.</b>97 : <b>Works on UNIX based operating systems only.</b>
99 :)98 :)
100declare variable $system:os-version-version as xs:string := "os.version.version";99declare variable $system:OS-VERSION-VERSION as xs:string := "os.version.version";
101100
102(:~101(:~
103 : The version of the Operating System.102 : The version of the Operating System.
104 :)103 :)
105declare variable $system:os-version as xs:string := "os.version";104declare variable $system:OS-VERSION as xs:string := "os.version";
106105
107(:~106(:~
108 : The name of the processor architecture (os.arch).107 : The name of the processor architecture (os.arch).
109 : For example x86 or x86_64.108 : For example x86 or x86_64.
110 :)109 :)
111declare variable $system:os-arch as xs:string := "os.arch";110declare variable $system:OS-ARCH as xs:string := "os.arch";
112111
113(:~112(:~
114 : True if system architecture is 64bits (os.is64).113 : True if system architecture is 64bits (os.is64).
115 :)114 :)
116declare variable $system:os-is64 as xs:string := "os.is64";115declare variable $system:OS-IS64 as xs:string := "os.is64";
117116
118(:~117(:~
119 : Number of logical processors in the system (hardware.logical.cpu).118 : Number of logical processors in the system (hardware.logical.cpu).
120 : This information is not available under Mac OS X.119 : This information is not available under Mac OS X.
121 :)120 :)
122declare variable $system:hardware-logical-cpu as xs:string := "hardware.logical.cpu";121declare variable $system:HARDWARE-LOGICAL-CPU as xs:string := "hardware.logical.cpu";
123122
124(:~123(:~
125 : Number of physical processors in the system (hardware.logical.cpu).124 : Number of physical processors in the system (hardware.physical.cpu).
126 :)125 :)
127declare variable $system:hardware-physical-cpu as xs:string := "hardware.physical.cpu";126declare variable $system:HARDWARE-PHYSICAL-CPU as xs:string := "hardware.physical.cpu";
128127
129(:~128(:~
130 : number of logical per physical processors in the system (hardware.logical.per.physical.cpu).129 : number of logical per physical processors in the system (hardware.logical.per.physical.cpu).
131 : This information is not available under Mac OS X.130 : This information is not available under Mac OS X.
132 :)131 :)
133declare variable $system:hardware-logical-per-physical-cpu as xs:string := "hardware.logical.per.physical.cpu";132declare variable $system:HARDWARE-LOGICAL-PER-PHYSICAL-CPU as xs:string := "hardware.logical.per.physical.cpu";
134133
135(:~134(:~
136 : Physical memory available (hardware.physical.memory).135 : Physical memory available (hardware.physical.memory).
137 :)136 :)
138declare variable $system:hardware-physical-memory as xs:string := "hardware.physical.memory";137declare variable $system:HARDWARE-PHSICAL-MEMORY as xs:string := "hardware.physical.memory";
138
139(:~139(:~
140 : Virtual memory available (hardware.virtual.memory).140 : Virtual memory available (hardware.virtual.memory).
141 :)141 :)
142declare variable $system:hardware-virtual-memory as xs:string := "hardware.virtual.memory";142declare variable $system:HARDWARE-VIRTUAL-MEMORY as xs:string := "hardware.virtual.memory";
143
143(:~144(:~
144 : Gets the hardware manufacturer (hardware.manufacturer).145 : Gets the hardware manufacturer (hardware.manufacturer).
145 :)146 :)
146declare variable $system:hardware-manufacturer as xs:string := "hardware.manufacturer";147declare variable $system:HARDWARE-MANUFACTURER as xs:string := "hardware.manufacturer";
147148
148(:~149(:~
149 : The Linux distribution, Zorba is running on (linux.distributor).150 : The Linux distribution, Zorba is running on (linux.distributor).
150 : <b>Works on UNIX based operating systems only.</b>151 : <b>Works on UNIX based operating systems only.</b>
151 :)152 :)
152declare variable $system:linux-distributor as xs:string := "linux.distributor";153declare variable $system:LINUX-DISTRIBUTOR as xs:string := "linux.distributor";
153154
154(:~155(:~
155 : The version of the Linux distribution, Zorba is running on (linux.distributor.version).156 : The version of the Linux distribution, Zorba is running on (linux.distributor.version).
156 : <b>Works on UNIX based operating systems only.</b>157 : <b>Works on UNIX based operating systems only.</b>
157 :)158 :)
158declare variable $system:linux-distributor-version as xs:string := "linux.distributor.version";159declare variable $system:LINUX-DISTRIBUTOR-VERSION as xs:string := "linux.distributor.version";
159160
160(:~161(:~
161 : The username, with which this process was started (user.name).162 : The username, with which this process was started (user.name).
162 : On Unix, this variable is only available if the USER environment163 : On Unix, this variable is only available if the USER environment
163 : variable is set (e.g. it might not be available in a cronjob).164 : variable is set (e.g. it might not be available in a cronjob).
164 :)165 :)
165declare variable $system:user-name as xs:string := "user.name";166declare variable $system:USER-NAME as xs:string := "user.name";
166167
167(:~168(:~
168 : The Zorba module path, that is the paths in which Zorba looks169 : The Zorba module path, that is the paths in which Zorba looks
169 : for modules (zorba.module.path).170 : for modules (zorba.module.path).
170 :)171 :)
171declare variable $system:zorba-module-path as xs:string := "zorba.module.path";172declare variable $system:ZORBA-MODULE-PATH as xs:string := "zorba.module.path";
172173
173(:~174(:~
174 : Zorba version in the format Major.Minor.Patch (zorba.version).175 : Zorba version in the format Major.Minor.Patch (zorba.version).
175 :)176 :)
176declare variable $system:zorba-version as xs:string := "zorba.version";177declare variable $system:ZORBA-VERSION as xs:string := "zorba.version";
177178
178(:~179(:~
179 : Zorba major version (zorba.version.major).180 : Zorba major version (zorba.version.major).
180 :)181 :)
181declare variable $system:zorba-version-major as xs:string := "zorba.version.major";182declare variable $system:ZORBA-VERSION-MAJOR as xs:string := "zorba.version.major";
182183
183(:~184(:~
184 : Zorba minor version (zorba.version.minor).185 : Zorba minor version (zorba.version.minor).
185 :)186 :)
186declare variable $system:zorba-version-minor as xs:string := "zorba.version.minor";187declare variable $system:ZORBA-VERSION-MINOR as xs:string := "zorba.version.minor";
187188
188(:~189(:~
189 : Zorba patch version (zorba.version.patch).190 : Zorba patch version (zorba.version.patch).
190 :)191 :)
191declare variable $system:zorba-version-patch as xs:string := "zorba.version.patch";192declare variable $system:ZORBA-VERSION-PATCH as xs:string := "zorba.version.patch";
192193
193(:~194(:~
194 : Gets the system property indicated by the specified key.195 : Gets the system property indicated by the specified key.
@@ -201,7 +202,7 @@
201(:~202(:~
202 : This function retrieves the names of the current system properties.203 : This function retrieves the names of the current system properties.
203 : This list includes environment variables, local variable to the process running Zorba, and properties defined by Zorba.204 : This list includes environment variables, local variable to the process running Zorba, and properties defined by Zorba.
204 : <br />205 : <p/>
205 : To avoid conflicts between environment variables and properties defined by Zorba,206 : To avoid conflicts between environment variables and properties defined by Zorba,
206 : all environment variables are prefixed with <i>env.</i>.207 : all environment variables are prefixed with <i>env.</i>.
207 :208 :
@@ -209,3 +210,19 @@
209 :)210 :)
210declare %an:nondeterministic function system:properties() as xs:string* external;211declare %an:nondeterministic function system:properties() as xs:string* external;
211212
213(:~
214 : This function retrieves all names and values from the current system properties.
215 : This list includes environment variables, local variable to the process running Zorba, and properties defined by Zorba.
216 : <p/>
217 : To avoid conflicts between environment variables and properties defined by Zorba,
218 : all environment variables are prefixed with <i>env.</i>.
219 :
220 : @return List of all system properties as a JSONiq Object sequence.
221 :)
222declare %an:nondeterministic function system:all-properties() as object() {
223 {
224 for $prop in system:properties()
225 return { $prop : system:property($prop) }
226 }
227};
228
212229
=== renamed directory 'src/com/zorba-xquery/www/modules/system.xq.src' => 'src/system.xq.src'
=== modified file 'src/system.xq.src/system.cpp'
--- src/com/zorba-xquery/www/modules/system.xq.src/system.cpp 2012-07-19 12:29:57 +0000
+++ src/system.xq.src/system.cpp 2013-08-08 20:52:48 +0000
@@ -55,7 +55,33 @@
5555
56namespace zorba { namespace system {56namespace zorba { namespace system {
5757
58 const String SystemModule::SYSTEM_MODULE_NAMESPACE = "http://www.zorba-xquery.com/modules/system";58 const String SystemModule::SYSTEM_MODULE_NAMESPACE = "http://zorba.io/modules/system";
59
60 // global keys
61 zorba::Item SystemModule::globalOSName;
62 zorba::Item SystemModule::globalOSNodeName;
63 zorba::Item SystemModule::globalOSVersionMajor;
64 zorba::Item SystemModule::globalOSVersionMinor;
65 zorba::Item SystemModule::globalOSVersionBuild;
66 zorba::Item SystemModule::globalOSVersionRelease;
67 zorba::Item SystemModule::globalOSVersionVersion;
68 zorba::Item SystemModule::globalOSVersion;
69 zorba::Item SystemModule::globalOSArch;
70 zorba::Item SystemModule::globalOSis64;
71 zorba::Item SystemModule::globalHWLogicalCPU;
72 zorba::Item SystemModule::globalHWPhysicalCPU;
73 zorba::Item SystemModule::globalHWLogicalPerPhysicalCPU;
74 zorba::Item SystemModule::globalHWPhysicalMemory;
75 zorba::Item SystemModule::globalHWVirtualMemory;
76 zorba::Item SystemModule::globalHWManufacturer;
77 zorba::Item SystemModule::globalLinuxDistributor;
78 zorba::Item SystemModule::globalLinuxDistributorVersion;
79 zorba::Item SystemModule::globalUserName;
80 zorba::Item SystemModule::globalZorbaModulePath;
81 zorba::Item SystemModule::globalZorbaVersion;
82 zorba::Item SystemModule::globalZorbaVersionMajor;
83 zorba::Item SystemModule::globalZorbaVersionMinor;
84 zorba::Item SystemModule::globalZorbaVersionPatch;
5985
60#ifdef WIN3286#ifdef WIN32
61 typedef BOOL (WINAPI *LPFN_GLPI)(87 typedef BOOL (WINAPI *LPFN_GLPI)(
@@ -252,6 +278,30 @@
252 SystemModule::SystemModule()278 SystemModule::SystemModule()
253 : thePropertyFunction(0), thePropertiesFunction(0)279 : thePropertyFunction(0), thePropertiesFunction(0)
254 {280 {
281 globalOSName = Zorba::getInstance(0)->getItemFactory()->createString("os.name");
282 globalOSNodeName = Zorba::getInstance(0)->getItemFactory()->createString("os.node.name");
283 globalOSVersionMajor = Zorba::getInstance(0)->getItemFactory()->createString("os.version.major");
284 globalOSVersionMinor = Zorba::getInstance(0)->getItemFactory()->createString("os.version.minor");
285 globalOSVersionBuild = Zorba::getInstance(0)->getItemFactory()->createString("os.version.build");
286 globalOSVersionRelease = Zorba::getInstance(0)->getItemFactory()->createString("os.version.release");
287 globalOSVersionVersion = Zorba::getInstance(0)->getItemFactory()->createString("os.version.version");
288 globalOSVersion = Zorba::getInstance(0)->getItemFactory()->createString("os.version");
289 globalOSArch = Zorba::getInstance(0)->getItemFactory()->createString("os.arch");
290 globalOSis64 = Zorba::getInstance(0)->getItemFactory()->createString("os.is64");
291 globalHWLogicalCPU = Zorba::getInstance(0)->getItemFactory()->createString("hardware.logical.cpu");
292 globalHWPhysicalCPU = Zorba::getInstance(0)->getItemFactory()->createString("hardware.physical.cpu");
293 globalHWLogicalPerPhysicalCPU = Zorba::getInstance(0)->getItemFactory()->createString("hardware.logical.per.physical.cpu");
294 globalHWPhysicalMemory = Zorba::getInstance(0)->getItemFactory()->createString("hardware.physical.memory");
295 globalHWVirtualMemory = Zorba::getInstance(0)->getItemFactory()->createString("hardware.virtual.memory");
296 globalHWManufacturer = Zorba::getInstance(0)->getItemFactory()->createString("hardware.manufacturer");
297 globalLinuxDistributor = Zorba::getInstance(0)->getItemFactory()->createString("linux.distributor");
298 globalLinuxDistributorVersion = Zorba::getInstance(0)->getItemFactory()->createString("linux.distributor.version");
299 globalUserName = Zorba::getInstance(0)->getItemFactory()->createString("user.name");
300 globalZorbaModulePath = Zorba::getInstance(0)->getItemFactory()->createString("zorba.module.path");
301 globalZorbaVersion = Zorba::getInstance(0)->getItemFactory()->createString("zorba.version");
302 globalZorbaVersionMajor = Zorba::getInstance(0)->getItemFactory()->createString("zorba.version.major");
303 globalZorbaVersionMinor = Zorba::getInstance(0)->getItemFactory()->createString("zorba.version.minor");
304 globalZorbaVersionPatch = Zorba::getInstance(0)->getItemFactory()->createString("zorba.version.patch");
255 }305 }
256306
257 ExternalFunction* SystemModule::getExternalFunction(const String& localName) {307 ExternalFunction* SystemModule::getExternalFunction(const String& localName) {
@@ -276,6 +326,39 @@
276 delete thePropertiesFunction;326 delete thePropertiesFunction;
277 }327 }
278328
329 zorba::Item&
330 SystemModule::getGlobalKey(SystemModule::GLOBAL_KEY g)
331 {
332 switch(g)
333 {
334 case OS_NAME: return globalOSName;
335 case OS_NODE_NAME: return globalOSNodeName;
336 case OS_VER_MAJOR: return globalOSVersionMajor;
337 case OS_VER_MINOR: return globalOSVersionMinor;
338 case OS_VER_BUILD: return globalOSVersionBuild;
339 case OS_VER_RELEASE: return globalOSVersionRelease;
340 case OS_VER_VERSION: return globalOSVersionVersion;
341 case OS_VER: return globalOSVersion;
342 case OS_ARCH: return globalOSArch;
343 case OS_IS64: return globalOSis64;
344 case HARDWARE_lOGICAL_CPU: return globalHWLogicalCPU;
345 case HARDWARE_PHYSICAL_CPU: return globalHWPhysicalCPU;
346 case HARDWARE_LOGICAL_PER_PHYSICAL_CPU: return globalHWLogicalPerPhysicalCPU;
347 case HARDWARE_PHYSICAL_MEMORY: return globalHWPhysicalMemory;
348 case HARDWARE_VIRTUAL_MEMORY: return globalHWVirtualMemory;
349 case HARDWARE_MANUFACTURER: return globalHWManufacturer;
350 case LINUX_DISTRIBUTOR: return globalLinuxDistributor;
351 case LINUX_DISTRIBUTOR_VERSION: return globalLinuxDistributorVersion;
352 case USER_NAME: return globalUserName;
353 case ZORBA_MODULE_PATH: return globalZorbaModulePath;
354 case ZORBA_VER: return globalZorbaVersion;
355 case ZORBA_VER_MAJOR: return globalZorbaVersionMajor;
356 case ZORBA_VER_MINOR: return globalZorbaVersionMinor;
357 case ZORBA_VER_PATCH: return globalZorbaVersionPatch;
358 // should never hit this code but still ...
359 default: return globalOSName;
360 }
361 }
279362
280 SystemFunction::SystemFunction(const ExternalModule* aModule)363 SystemFunction::SystemFunction(const ExternalModule* aModule)
281 : theModule(aModule), theFactory(Zorba::getInstance(0)->getItemFactory())364 : theModule(aModule), theFactory(Zorba::getInstance(0)->getItemFactory())
@@ -291,7 +374,7 @@
291 nodeNameC[i] = static_cast<char>(nodeName[i]);374 nodeNameC[i] = static_cast<char>(nodeName[i]);
292 }375 }
293 nodeNameC[nodeNameLength] = NULL; // Terminate string376 nodeNameC[nodeNameLength] = NULL; // Terminate string
294 theProperties.insert(std::make_pair("os.node.name", nodeNameC));377 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_NODE_NAME).getStringValue(), nodeNameC));
295 }378 }
296379
297 {380 {
@@ -325,13 +408,13 @@
325 minor = sMinor.str();408 minor = sMinor.str();
326 build = sBuild.str();409 build = sBuild.str();
327 }410 }
328 theProperties.insert(std::make_pair("os.version.major", major));411 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_VER_MAJOR).getStringValue(), major));
329 theProperties.insert(std::make_pair("os.version.minor", minor));412 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_VER_MINOR).getStringValue(), minor));
330 theProperties.insert(std::make_pair("os.version.build", build));413 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_VER_BUILD).getStringValue(), build));
331 theProperties.insert(std::make_pair("os.version", major + "." + minor + "." + build));414 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_VER).getString(), major + "." + minor + "." + build));
332 // http://msdn.microsoft.com/en-us/library/ms724832(v=VS.85).aspx415 // http://msdn.microsoft.com/en-us/library/ms724832(v=VS.85).aspx
333 std::string operativeSystem;416 std::string operativeSystem;
334 theProperties.insert(std::make_pair("os.name", "Windows"));417 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_NAME).getStringValue(), "Windows"));
335 {418 {
336 countProcessors();419 countProcessors();
337 std::stringstream logicalProcessors;420 std::stringstream logicalProcessors;
@@ -340,9 +423,9 @@
340 physicalProcessors << logicalProcessorCount;423 physicalProcessors << logicalProcessorCount;
341 std::stringstream logicalPerPhysicalProcessors;424 std::stringstream logicalPerPhysicalProcessors;
342 logicalPerPhysicalProcessors << (logicalProcessorCount / processorPackageCount );425 logicalPerPhysicalProcessors << (logicalProcessorCount / processorPackageCount );
343 theProperties.insert(std::make_pair("hardware.physical.cpu", logicalProcessors.str() ));426 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_PHYSICAL_CPU).getStringValue(), logicalProcessors.str() ));
344 theProperties.insert(std::make_pair("hardware.logical.cpu", physicalProcessors.str() ));427 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_lOGICAL_CPU).getStringValue(), physicalProcessors.str() ));
345 theProperties.insert(std::make_pair("hardware.logical.per.physical.cpu", logicalPerPhysicalProcessors.str() ));428 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_LOGICAL_PER_PHYSICAL_CPU).getStringValue(), logicalPerPhysicalProcessors.str() ));
346 }429 }
347 {430 {
348 MEMORYSTATUSEX statex;431 MEMORYSTATUSEX statex;
@@ -352,8 +435,8 @@
352 virtualMemory << statex.ullTotalVirtual;435 virtualMemory << statex.ullTotalVirtual;
353 std::stringstream physicalMemory;436 std::stringstream physicalMemory;
354 physicalMemory << statex.ullTotalPhys;437 physicalMemory << statex.ullTotalPhys;
355 theProperties.insert(std::make_pair("hardware.virtual.memory", virtualMemory.str() ));438 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_VIRTUAL_MEMORY).getStringValue(), virtualMemory.str() ));
356 theProperties.insert(std::make_pair("hardware.physical.memory", physicalMemory.str() ));439 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_PHYSICAL_MEMORY).getStringValue(), physicalMemory.str() ));
357 }440 }
358441
359 }442 }
@@ -365,20 +448,20 @@
365 for (DWORD i = 0; i < userNameLength; ++i) {448 for (DWORD i = 0; i < userNameLength; ++i) {
366 userNameC[i] = static_cast<char>(userName[i]);449 userNameC[i] = static_cast<char>(userName[i]);
367 }450 }
368 theProperties.insert(std::make_pair("user.name", userNameC));451 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::USER_NAME).getStringValue(), userNameC));
369 }452 }
370 {453 {
371 SYSTEM_INFO info;454 SYSTEM_INFO info;
372 GetSystemInfo(&info);455 GetSystemInfo(&info);
373 if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {456 if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
374 theProperties.insert(std::make_pair("os.arch", "x86_64"));457 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_ARCH).getStringValue(), "x86_64"));
375 theProperties.insert(std::make_pair("os.is64", "true"));458 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_IS64).getStringValue(), "true"));
376 } else if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) {459 } else if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) {
377 theProperties.insert(std::make_pair("os.arch", "ia64"));460 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_ARCH).getStringValue(), "ia64"));
378 theProperties.insert(std::make_pair("os.is64", "true"));461 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_IS64).getStringValue(), "true"));
379 } else if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) {462 } else if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) {
380 theProperties.insert(std::make_pair("os.arch", "i386"));463 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_ARCH).getStringValue(), "i386"));
381 theProperties.insert(std::make_pair("os.is64", "false"));464 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_IS64).getStringValue(), "false"));
382 }465 }
383 }466 }
384467
@@ -395,7 +478,7 @@
395 valueC[i] = static_cast<char>(value[i]);478 valueC[i] = static_cast<char>(value[i]);
396 }479 }
397 if (size > 0)480 if (size > 0)
398 theProperties.insert(std::make_pair("hardware.manufacturer", valueC));481 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_MANUFACTURER).getStringValue(), valueC));
399 }482 }
400 RegCloseKey(keyHandle);483 RegCloseKey(keyHandle);
401 }484 }
@@ -405,19 +488,19 @@
405 struct utsname osname;488 struct utsname osname;
406 if (uname(&osname) == 0)489 if (uname(&osname) == 0)
407 {490 {
408 theProperties.insert(std::make_pair("os.name", osname.sysname));491 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_NAME).getStringValue(), osname.sysname));
409 theProperties.insert(std::make_pair("os.node.name", osname.nodename));492 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_NODE_NAME).getStringValue(), osname.nodename));
410 theProperties.insert(std::make_pair("os.version.release", osname.release));493 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_VER_RELEASE).getStringValue(), osname.release));
411 theProperties.insert(std::make_pair("os.version.version", osname.version));494 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_VER_VERSION).getStringValue(), osname.version));
412 theProperties.insert(std::make_pair("os.version", osname.release));495 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_VER).getStringValue(), osname.release));
413 theProperties.insert(std::make_pair("os.arch", osname.machine));496 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_ARCH).getStringValue(), osname.machine));
414 }497 }
415 char* lUser = getenv("USER");498 char* lUser = getenv("USER");
416 if (lUser)499 if (lUser)
417 {500 {
418 theProperties.insert(std::make_pair("user.name", lUser));501 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::USER_NAME).getStringValue(), lUser));
419 }502 }
420 theProperties.insert(std::make_pair("os.is64", "false"));503 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::OS_IS64).getStringValue(), "false"));
421 {504 {
422#ifdef __APPLE__505#ifdef __APPLE__
423 int mib[2];506 int mib[2];
@@ -429,7 +512,7 @@
429 sysctl(mib, 2, &res, &len, NULL, NULL);512 sysctl(mib, 2, &res, &len, NULL, NULL);
430 std::stringstream lStream;513 std::stringstream lStream;
431 lStream << res;514 lStream << res;
432 theProperties.insert(std::make_pair("hardware.physical.cpu", lStream.str()));515 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_PHYSICAL_CPU).getStringValue(), lStream.str()));
433#else516#else
434 countProcessors();517 countProcessors();
435 std::stringstream logicalProcessor;518 std::stringstream logicalProcessor;
@@ -438,9 +521,9 @@
438 logicalProcessor << logical;521 logicalProcessor << logical;
439 physicalProcessor << physical;522 physicalProcessor << physical;
440 logicalPerPhysicalProcessors << cores;523 logicalPerPhysicalProcessors << cores;
441 theProperties.insert(std::make_pair("hardware.logical.per.physical.cpu", logicalPerPhysicalProcessors.str() ));524 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_LOGICAL_PER_PHYSICAL_CPU).getStringValue(), logicalPerPhysicalProcessors.str() ));
442 theProperties.insert(std::make_pair("hardware.physical.cpu", physicalProcessor.str() ));525 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_PHYSICAL_CPU).getStringValue(), physicalProcessor.str() ));
443 theProperties.insert(std::make_pair("hardware.logical.cpu", logicalProcessor.str() ));526 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_lOGICAL_CPU).getStringValue(), logicalProcessor.str() ));
444#endif527#endif
445 }528 }
446 {529 {
@@ -451,8 +534,8 @@
451 memory << sys_info.totalram;534 memory << sys_info.totalram;
452 std::stringstream swap;535 std::stringstream swap;
453 swap << sys_info.totalswap;536 swap << sys_info.totalswap;
454 theProperties.insert(std::make_pair("hardware.virtual.memory", swap.str() ));537 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_VIRTUAL_MEMORY).getStringValue(), swap.str() ));
455 theProperties.insert(std::make_pair("hardware.physical.memory", memory.str() ));538 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_PHYSICAL_MEMORY).getStringValue(), memory.str() ));
456 }539 }
457# elif defined __APPLE__540# elif defined __APPLE__
458 int mib[2];541 int mib[2];
@@ -464,19 +547,19 @@
464 sysctl(mib, 2, &res, &len, NULL, NULL);547 sysctl(mib, 2, &res, &len, NULL, NULL);
465 std::stringstream lStream;548 std::stringstream lStream;
466 lStream << res;549 lStream << res;
467 theProperties.insert(std::make_pair("hardware.physical.memory", lStream.str()));550 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::HARDWARE_PHYSICAL_MEMORY).getStringValue(), lStream.str()));
468# endif551# endif
469 }552 }
470553
471#endif554#endif
472#ifdef LINUX555#ifdef LINUX
473 theProperties.insert(std::make_pair("linux.distributor", ""));556 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::LINUX_DISTRIBUTOR).getStringValue(), ""));
474 theProperties.insert(std::make_pair("linux.distributor.version", ""));557 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::LINUX_DISTRIBUTOR_VERSION).getStringValue(), ""));
475#endif558#endif
476 theProperties.insert(std::make_pair("zorba.version", Zorba::version().getVersion()));559 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::ZORBA_VER).getStringValue(), Zorba::version().getVersion()));
477 theProperties.insert(std::make_pair("zorba.version.major", intToString(Zorba::version().getMajorVersion())));560 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::ZORBA_VER_MAJOR).getStringValue(), intToString(Zorba::version().getMajorVersion())));
478 theProperties.insert(std::make_pair("zorba.version.minor", intToString(Zorba::version().getMinorVersion())));561 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::ZORBA_VER_MINOR).getStringValue(), intToString(Zorba::version().getMinorVersion())));
479 theProperties.insert(std::make_pair("zorba.version.patch", intToString(Zorba::version().getPatchVersion())));562 theProperties.insert(std::make_pair(SystemModule::getGlobalKey(SystemModule::ZORBA_VER_PATCH).getStringValue(), intToString(Zorba::version().getPatchVersion())));
480 }563 }
481564
482 String SystemFunction::intToString(int v) {565 String SystemFunction::intToString(int v) {
@@ -552,7 +635,7 @@
552 lRes.push_back(lItem);635 lRes.push_back(lItem);
553 }636 }
554 // insert the zorba module path637 // insert the zorba module path
555 lRes.push_back(theFactory->createString("zorba.module.path"));638 lRes.push_back(SystemModule::getGlobalKey(SystemModule::ZORBA_MODULE_PATH));
556 return ItemSequence_t(new VectorItemSequence(lRes));639 return ItemSequence_t(new VectorItemSequence(lRes));
557 }640 }
558641
@@ -567,7 +650,7 @@
567 arg0_iter->close();650 arg0_iter->close();
568 String envS = item.getStringValue();651 String envS = item.getStringValue();
569 String lRes;652 String lRes;
570 if (envS == "zorba.module.path") {653 if (envS == SystemModule::getGlobalKey(SystemModule::ZORBA_MODULE_PATH).getStringValue().str()) {
571 std::vector<String> lModulePaths;654 std::vector<String> lModulePaths;
572 sctx->getFullModulePaths(lModulePaths);655 sctx->getFullModulePaths(lModulePaths);
573 if (lModulePaths.size() == 0)656 if (lModulePaths.size() == 0)
@@ -587,9 +670,9 @@
587 return ItemSequence_t(new EmptySequence());670 return ItemSequence_t(new EmptySequence());
588 }671 }
589#ifdef LINUX672#ifdef LINUX
590 } else if (envS == "linux.distributor") {673 } else if (envS == SystemModule::getGlobalKey(SystemModule::LINUX_DISTRIBUTOR).getStringValue().str()) {
591 lRes = getDistribution().first;674 lRes = getDistribution().first;
592 } else if (envS == "linux.distributor.version") {675 } else if (envS == SystemModule::getGlobalKey(SystemModule::LINUX_DISTRIBUTOR_VERSION).getStringValue().str()) {
593 lRes = getDistribution().second;676 lRes = getDistribution().second;
594#endif677#endif
595 } else {678 } else {
596679
=== modified file 'src/system.xq.src/system.h'
--- src/com/zorba-xquery/www/modules/system.xq.src/system.h 2011-08-05 02:22:28 +0000
+++ src/system.xq.src/system.h 2013-08-08 20:52:48 +0000
@@ -25,19 +25,54 @@
2525
26namespace zorba { namespace system {26namespace zorba { namespace system {
27 class SystemModule : public ExternalModule {27 class SystemModule : public ExternalModule {
28 protected:
29 static zorba::Item globalOSName;
30 static zorba::Item globalOSNodeName;
31 static zorba::Item globalOSVersionMajor;
32 static zorba::Item globalOSVersionMinor;
33 static zorba::Item globalOSVersionBuild;
34 static zorba::Item globalOSVersionRelease;
35 static zorba::Item globalOSVersionVersion;
36 static zorba::Item globalOSVersion;
37 static zorba::Item globalOSArch;
38 static zorba::Item globalOSis64;
39 static zorba::Item globalHWLogicalCPU;
40 static zorba::Item globalHWPhysicalCPU;
41 static zorba::Item globalHWLogicalPerPhysicalCPU;
42 static zorba::Item globalHWPhysicalMemory;
43 static zorba::Item globalHWVirtualMemory;
44 static zorba::Item globalHWManufacturer;
45 static zorba::Item globalLinuxDistributor;
46 static zorba::Item globalLinuxDistributorVersion;
47 static zorba::Item globalUserName;
48 static zorba::Item globalZorbaModulePath;
49 static zorba::Item globalZorbaVersion;
50 static zorba::Item globalZorbaVersionMajor;
51 static zorba::Item globalZorbaVersionMinor;
52 static zorba::Item globalZorbaVersionPatch;
28 private:53 private:
29 ExternalFunction* thePropertyFunction;54 ExternalFunction* thePropertyFunction;
30 ExternalFunction* thePropertiesFunction;55 ExternalFunction* thePropertiesFunction;
31 const static String SYSTEM_MODULE_NAMESPACE;56 const static String SYSTEM_MODULE_NAMESPACE;
32 public:57 public:
58 enum GLOBAL_KEY { OS_NAME, OS_NODE_NAME, OS_VER_MAJOR, OS_VER_MINOR,
59 OS_VER_BUILD, OS_VER_RELEASE, OS_VER_VERSION, OS_VER,
60 OS_ARCH, OS_IS64, HARDWARE_lOGICAL_CPU, HARDWARE_PHYSICAL_CPU,
61 HARDWARE_LOGICAL_PER_PHYSICAL_CPU, HARDWARE_PHYSICAL_MEMORY,
62 HARDWARE_VIRTUAL_MEMORY, HARDWARE_MANUFACTURER, LINUX_DISTRIBUTOR,
63 LINUX_DISTRIBUTOR_VERSION, USER_NAME, ZORBA_MODULE_PATH, ZORBA_VER, ZORBA_VER_MAJOR,
64 ZORBA_VER_MINOR, ZORBA_VER_PATCH };
65
33 SystemModule();66 SystemModule();
34 virtual ~SystemModule();67 virtual ~SystemModule();
35 public:68
36 virtual String getURI() const { return SYSTEM_MODULE_NAMESPACE; }69 virtual String getURI() const { return SYSTEM_MODULE_NAMESPACE; }
3770
38 virtual ExternalFunction* getExternalFunction(const String& localName);71 virtual ExternalFunction* getExternalFunction(const String& localName);
3972
40 virtual void destroy();73 virtual void destroy();
74
75 static zorba::Item& getGlobalKey(enum GLOBAL_KEY g);
41 };76 };
4277
43 class SystemFunction {78 class SystemFunction {

Subscribers

People subscribed via source and target branches

to all changes: