zorbaCopyright 2006-2013 The FLWOR Foundation. This header includes utility functions for certain timing-related operations, namely getting current wall-clock time and current CPU-used time values in a platform-dependent fashion, and computing deltas for both types.Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.Types: cputime - type representing CPU time utilized thus far by this process walltime - type representing wall-clock time since some platform-dependent epochFunction signatures: void get_current_cputime(cputime& t) - returns current CPU timedouble get_cputime_elapsed(const cputime& t0, const cputime& t1) - calculates elapsed CPU time (in ms) between two cputimesvoid get_current_walltime(walltime& t) - returns current wall-clock timedouble get_walltime_elapsed(const walltime& t0, const walltime& t1) - calculates elapsed wall-clock time (in ms) between two walltimes TODO These functions should probably be defined in a .cpp file somewhere rather than here in time.h; as it is they will be compiled into every .o that uses them. So far, though, this is only zorbacmd and the implementation of fn:doc(), so it's not too bad.Enumerations
Type Definitions
Functions
Enumerationsboundary_space_mode_t boundary_space_mode_t Boundary-space policy as defined in http://www.w3.org/TR/xquery/#static_context.
construction_mode_t construction_mode_t Construction mode as defined in http://www.w3.org/TR/xquery/#static_context.
index_container_kind_t index_container_kind_t Container kind of an index as defined in the XQuery Data Definition Facility.
index_maintenance_mode_t index_maintenance_mode_t Maintenance mode of an index as defined in the XQuery Data Definition Facility.
inherit_mode_t inherit_mode_t Inherit part of the Copy-namespace mode as defined in http://www.w3.org/TR/xquery/#static_context.
jsoniq_version_t jsoniq_version_t The JSONiq version.
order_empty_mode_t order_empty_mode_t Default order for empty sequences as defined in http://www.w3.org/TR/xquery/#static_context.
ordering_mode_t ordering_mode_t Ordering mode as defined in http://www.w3.org/TR/xquery/#static_context.
preserve_mode_t preserve_mode_t Preserve part of the Copy-namespace mode as defined in http://www.w3.org/TR/xquery/#static_context.
validation_mode_t validation_mode_t Revalidation mode as defined in http://www.w3.org/TR/xquery-update-10/#id-revalidation-declaration Note: when DTD validation is needed the use of validate_lax_dtd is required.
xpath1_0compatib_mode_t xpath1_0compatib_mode_t XPath 1.0 compatibility mode as defined in http://www.w3.org/TR/xquery/#static_context.
Type DefinitionsNsBindingsUsed for Item::getNamespaceBindings() and ItemFactory::createElementNode().
XQueryWarningXQueryException XQueryWarning Re-use an XQueryException as an XQueryWarning to:
ZorbaDateTimeErrorCode
Functionsoperator!=bool operator!=(uuid const &u1, uuid const &u2) Compares two UUIDs for inequality.
Parameters
ReturnsReturns true only if the two UUIDs are not equal.operator!=bool operator!=(Diagnostic const &d1, Diagnostic const &d2) Compares two diagnostics for inequality.
Parameters
ReturnsReturns true only if the diagnostics' QNames are not equal.operator!=bool operator!=(String const &s1, String const &s2)
operator!=bool operator!=(String const &s1, std::string const &s2)
operator!=bool operator!=(String const &s1, String::const_pointer s2)
operator!=bool operator!=(std::string const &s1, String const &s2)
operator!=bool operator!=(String::const_pointer s1, String const &s2)
operator<bool operator<(uuid const &u1, uuid const &u2) Compares two UUIDs for less-than.
Parameters
ReturnsReturns true only if the first UUID is less than the second.operator<ZORBA_DLL_PUBLIC bool operator<(String const &s1, String const &s2)
operator<ZORBA_DLL_PUBLIC bool operator<(String const &s1, std::string const &s2)
operator<ZORBA_DLL_PUBLIC bool operator<(String const &s1, String::const_pointer s2)
operator<ZORBA_DLL_PUBLIC bool operator<(std::string const &s1, String const &s2)
operator<ZORBA_DLL_PUBLIC bool operator<(String::const_pointer s1, String const &s2)
operator<<ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &os, const QueryLocation &aQuery)
operator<<ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &os, const QueryLocation *aQuery)
operator<<ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &os, const Version &aVersion) Write the result of calling aVersiongetVersion() to the given output stream.
operator<<std::ostream & operator<<(std::ostream &o, ZorbaException const &e) Emits the given ZorbaException to the given ostream.
Parameters
ReturnsReturns o.operator<<std::ostream & operator<<(std::ostream &o, ZorbaException::print_format f) Sets the format for the next ZorbaException that's printed.
Parameters
ReturnsReturns o.operator<<ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &os, uuid const &u) Emits the given UUID to the given ostream in canonical UUID format.
Parameters
ReturnsReturns os.operator<<std::ostream & operator<<(std::ostream &o, XQueryException::print_trace t) Sets whether to include the XQuery stack trace for the next XQueryException that's printed.
Parameters
ReturnsReturns o.operator<<ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &os, const XQuery_t &aQuery)
operator<<ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &os, XQuery *aQuery)
operator<<ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &o, String const &s)
operator<=bool operator<=(uuid const &u1, uuid const &u2) Compares two UUIDs for less-than-or-equal-to.
Parameters
ReturnsReturns true only if the first UUID is less than or equal to the second.operator<=ZORBA_DLL_PUBLIC bool operator<=(String const &s1, String const &s2)
operator<=ZORBA_DLL_PUBLIC bool operator<=(String const &s1, std::string const &s2)
operator<=ZORBA_DLL_PUBLIC bool operator<=(String const &s1, String::const_pointer s2)
operator<=ZORBA_DLL_PUBLIC bool operator<=(std::string const &s1, String const &s2)
operator<=ZORBA_DLL_PUBLIC bool operator<=(String::const_pointer s1, String const &s2)
operator==bool operator==(uuid const &u1, uuid const &u2) Compares two UUIDs for equality.
Parameters
ReturnsReturns true only if the two UUIDs are equal.operator==bool operator==(Diagnostic const &d1, Diagnostic const &d2) Compares two diagnostics for equality.
Parameters
ReturnsReturns true only if the diagnostics' QNames are equal.operator==ZORBA_DLL_PUBLIC bool operator==(String const &s1, String const &s2)
operator==ZORBA_DLL_PUBLIC bool operator==(String const &s1, std::string const &s2)
operator==ZORBA_DLL_PUBLIC bool operator==(String const &s1, String::const_pointer s2)
operator==bool operator==(std::string const &s1, String const &s2)
operator==bool operator==(String::const_pointer s1, String const &s2)
operator>bool operator>(uuid const &u1, uuid const &u2) Compares two UUIDs for greater-than.
Parameters
ReturnsReturns true only if the first UUID is greater than the second.operator>bool operator>(String const &s1, String const &s2)
operator>bool operator>(String const &s1, std::string const &s2)
operator>bool operator>(String const &s1, String::const_pointer s2)
operator>bool operator>(std::string const &s1, String const &s2)
operator>bool operator>(String::const_pointer s1, String const &s2)
operator>=bool operator>=(uuid const &u1, uuid const &u2) Compares two UUIDs for greater-than-or-equal-to.
Parameters
ReturnsReturns true only if the first UUID is greater than or equal to the second.operator>=bool operator>=(String const &s1, String const &s2)
operator>=bool operator>=(String const &s1, std::string const &s2)
operator>=bool operator>=(String const &s1, String::const_pointer s2)
operator>=bool operator>=(std::string const &s1, String const &s2)
operator>=bool operator>=(String::const_pointer s1, String const &s2)
read_without_whitespaceZORBA_DLL_PUBLIC std::streamsize read_without_whitespace(std::istream &is, char *buf, std::streamsize n) Reads from the given istream until n non-whitespace characters are read or until EOF is encountered.
Parameters
ReturnsReturns the number of non-whitespace characters read.skip_utf8_bomZORBA_DLL_PUBLIC bool skip_utf8_bom(std::istream &is) Skips the UTF-8 byte order mark (BOM), if any.
Parameters
ReturnsReturns true only if a BOM was present and skipped.swapvoid swap(uuid &u1, uuid &u2) Swaps two UUIDs' data.
Parameters
|