If only one out of many OTL #define's (OTL_ORA7, OTL_ORA8, OTL_ODBC, OTL_DB2_CLI, OTL_ODBC_MYSQL) is specified, no namespaces are generated, since there is no need.
The following is the list of legitimate combinations of the OTL macro
definitions and namespaces to be generated:
OTL_ODBC or OTL_ODBC_MYSQL | No namespaces defined |
OTL_ORA7 | No namespaces defined |
OTL_ORA8 | No namespaces defined |
OTL_DB2_CLI | No namespace defined |
OTL_ODBC (or OTL_ODBC_MYSQL) &
OTL_ORA8 |
Namespace odbc is defined for OTL/ODBC &
namespace oracle is defined for OTL/OCI8 |
OTL_ODBC (or OTL_ODBC_MYSQL) &
OTL_ORA7 |
Namespace odbc is defined for OTL/ODBC &
namespace oracle is defined for OTL/OCI7 |
OTL_DB2_CLI &
OTL_ORA7 |
Namespace db2 is defined for OTL/DB2-CLI &
namespace oracle is defined for OTL/OCI7 |
OTL_DB2_CLI &
OTL_ORA8 |
Namespace db2 is defined for OTL/DB2-CLI &
namespace oracle is defined for OTL/OCI8 |
In case when namespaces are defined, OTL objects need to be prefixed with the namespace + the scope resolution operator, e.g.: oracle::otl_stream, odbc::otl_stream, db2::otl_stream. The only two objects that aredefined outside the namespaces are the otl_long_string and otl_null classes. OTL namespaces are useful for working with more than database at the same time. For more detail, see example 42.
The OTL namespace default behavior can be changed by the following macro definition: #define OTL_EXPLICIT_NAMESPACES. This #define forces OTL to always generate namespaces.
Copyright © 1996-2024, Sergei Kuchin, email: skuchin@gmail.com, skuchin@gmail.com .
Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.