═══ 1. OOxBase - Object-Oriented Access to dBase Databases. ═══ Version 2.10 Beta OOxBase is a dBase database engine for programmers using SOM. SOM - System Object Module is a object-oriented programming interface that remains language neutral. For more information on SOM please review IBM documentation and other user guides. By providing a language neutral interface, OOxBase allows any language that is SOM aware to access dBase files. OOxBase - Object Oriented xBase Version 2.10 Beta Jan. 1, 1996 American Coders, LTD P. O. Box 97462 Raleigh, NC 27624 USA 1-919-846-2014 joe@usacoder.rtp.nc.us Information in this and all related documents are subject to change without notice. This software, as described, is provided under a license agreement. The OOxBase product and documentation may be reproduced and transmitted in any form. American Coders, Ltd is no way liable or responsible for any loss of time, productivity or property associated with using this product. ═══ 1.1. Other Caveats and Warnings ═══ The is beta version will expire on June 30, 1997. Future releases. Server or Control program interface. SQL interface ═══ 1.2. Trademarks and copyrights ═══ OOxBase is a trademark of American Coders LTD. All other companies, products and brand names are trademarks of theri respective holders. OOxBase is a dbase engine using the SOM development tool sold by IBM. The DLL was built using SOM Version 3.00 Beta. At this time, the SOM Version 3.00 Beta is available free from IBM from their file server. http://www.software.ibm.com/clubopendoc/som30tk.html ═══ 1.3. Languages Supported ═══ Languages supported C, C++, Visual Age COBOL, Visual Age Basic OOREXX. Languages tested against C, C++. ═══ 1.4. American Coders Ltd. ═══ American Coders, LTD. Post Office Box 97462 Raleigh, NC 27624 (919); 846-2014 Compuserve ID: 74150,2370 Internet ID: joe@usacoder.rtp.nc.us. Copyright 1995 American Coders LTD Raleigh NC USA Programming Solutions For Your Business ═══ 1.5. How To Register Your Copy ═══ We have several methods for you to register your copy of OOxBase. o Registration Form. The cost for registering OOxBase is $95.00.At this time, the program is limited in functionality so the price may seem high. But we will grant early registers of the product an extension on the number of updates and not just fixes. There is also a shipping and handling charge. For U.S.and Canada registrations it is $5.00, all other international orders $105.00. If you are planning to order ten (10); or more copies use the SITELICE.DOC in your package. ═══ 1.5.1. Registration Form. ═══ Print out the file REGISTER.FRM. Attach a check and mail to us using the address on the form (or see above);. ═══ 1.6. Version Changes. ═══ Version 1.00 Sept 30,1995. Initial release. Known as SOMXBASE Version 2.00 Nov 15, 1996 Change underlying database engine using SOM technology. All classes and methods compiled with SOM V2.1. Version 2.10 Jan 1, 1997 Included ENVIRONMENT variable to all SOM Calls. Error handling is now done with the SOM exception interface. All classes and methods compiled with SOM V3.00. Beta code available from the IBM Server. Go to http://www.software.ibm.com/clubopendoc/som30tk.html ═══ 2. What Is OOxBase & What It Isn't ═══ OOxBase is a programmer's tool to access dBase III and IV files. It provides a object-oriented interface to DBF, NDX, MDX and DBT files. By providing a class object, known as ooxdbf, a program is provided a simple API to read, write, and update the database. Using an object-oriented tool, we will be able to enhance and extend the functionality of OOxBase through the use of such features as Inheritance and Polymorhphism. And by encapsulating the data and methods of OOxBase we can provide an upwardly compatible interface without comprimising future development. Though OOxBase is an object-oriented programming tool, the database is not and should not be considered object-oriented. Though, hopefully, over the life of this project we will be able to allow dBase databases to become more object-oriented-like. ═══ 2.1. Requirements. ═══ The following is a brief discussion of what is needed to develop with OOxBase. An operating system environment. OS/2 Version 2.x and Warp. A SOM Enabled Compiler At this time, OOxBase has been tested with IBM C/Set++. A Requirement To Develop An Object-Oriented Application. Sorry, we can't help you there. ═══ 2.2. Compatability with Borland (TM) dBase Files. ═══ OOxBase code is fully compatible with dbf, and dbt files. NDX and MDX are not 100% compatible OOxBase stores numeric fields as ASCII strings in an index when the index defines a numeric field as concatenated with other fields. Date fields are stored as ASCII strings, not double word. MDX files written to by OOxBase MAYl not work properly with dBase IV and V. MDX files with logic definitions will not work with properly with OOxBase. ═══ 3. Included Code. ═══ Along with the OOxBase.DLL there are several other files that you will need to compile a client program. At this time only C and C++ language based files are included. ═══ 4. Document ═══ This document was generated using the SOMDOC program and SOM IPF emitter. ═══ Integral Types ═══ IDL supports only the integral types short, long, unsigned short, and unsigned long, which represent the following value ranges: short -32768 .. 32767 long -2147483648 .. 2147483647 unsigned short 0 .. 65535 unsigned long 0 .. 4294967295 ═══ Floating Point Types ═══ IDL supports the float and double floating point types. The float type represents the IEEE single precision floating point numbers. The double represents the IEEE double precision floating point numbers. Note for Windows: Since returning floats and doubles by value may not be compatible across Windows compilers, client programs should return floats and doubles by reference. ═══ Character Type ═══ IDL supports a char type, which represents an 8 bit quantity. The ISO Latin 1 (8859.1) character set defines the meaning and representation of graphic characters. The meaning and representation of null and formatting characters is the numerical value of the character as defined in the ASCII (ISO 646) standard. Unlike C/C++, the char type cannot be qualified as signed or unsigned. ═══ Boolean Type ═══ IDL supports a boolean type for data items that can take only the values TRUE and FALSE. ═══ Octet Type ═══ IDL supports an octet type, an 8 bit quantity guaranteed not to undergo conversion when transmitted by the communication system. The octet type can be used in place of the unsigned char type. ═══ Any Type ═══ IDL supports an any type, which permits the specification of values of any IDL type. In the SOM C and C++ bindings, the any type is mapped onto the following struct: typedef struct any { TypeCode _type; void *_value; } any; The _value member for an any type is a pointer to the actual value. The _type member is a pointer to an instance of a TypeCode that represents the type of the value. The TypeCode provides functions for obtaining information about an IDL type. ═══ Constructed Type ═══ IDL supports three constructed types: struct, union, and enum. The structure and enumeration types are specified in IDL the same as they are in C and C++ with the following restrictions: Unlike C/C++, recursive type specifications are allowed only through the use of the sequence template type. Unlike C/C++, structures, discriminated unions, and enumerations in IDL must be tagged. In IDL, constructed type definitions need not be part of a typedef statement; furthermore, if they are part of a typedef statement, the tag of the struct must differ from the type name being defined by the typedef. When an enumeration is defined within an interface statement for a class, then within C/C++ programs, the enumeration names must be referenced by prefixing the class name. Notice the first identifier in an enumeration is assigned the value 1. Note for Windows: Since returning structs may not be compatible across all Windows compilers, client programs should, in general, return an object that contains a struct. All types and constants generated by the SOM Compiler are fully qualified. That is, prepended to them is the fully qualified name of the interface or module in which they appear. For programmer convenience, the SOM Compiler also generates shorter bindings, without the interface qualification. IDL supports a union type, which is a cross between the C union and switch statements. The syntax of a union type declaration is as follows: union identifier switch ( switch-type ) { case+ } The identifier following the union keyword defines a new legal type. (Union types may also be named using a typedef declaration.) The switch-type specifies an integral, character, boolean, or enumeration type, or the name of a previously defined integral, boolean, character, or enumeration type. Each case of the union is specified with the following syntax: case-label+ type-spec declarator ; where type-spec is any valid type specification; declarator is an identifier, an array declarator (such as, foo[3][5]), or a pointer declarator (such as, *foo); and each case-label has one of the following forms: case const-expr: default: The const-expr is a constant expression that must match or be automatically castable to the switch-type. A default case can appear no more than once. Note: Unions are mapped onto C/C++ structs. ═══ Template Type ═══ IDL defines two template types not found in C and C++: sequences and strings. A sequence is a one dimensional array with two characteristics: a maximum size (specified at compile time) and a length (determined at run time). Sequences permit passing unbounded arrays between objects. Sequences are specified as follows: sequence < simple-type [, positive-integer-const] > where simple-type specifies any valid IDL type, and the optional positive-integer-const is a constant expression that specifies the maximum size of the sequence (as a positive integer). Note: The simple-type cannot have a '*' directly in the sequence statement. Instead, a typedef for the pointer type must be used. In SOM's C and C++ bindings, sequences are mapped onto structs with the following members: unsigned long _maximum; unsigned long _length; simple-type *_buffer; where simple-type is the specified type of the sequence. The _maximum member designates the actual size of storage allocated for the sequence and the _length member designates the number of values contained in the _buffer member. For bounded sequences, it is an error to set the _length or _maximum member to a value larger than the specified bound of the sequence. Before a sequence is passed as the value of an "in" or "inout" method parameter, the _buffer member must point to an array of elements of the appropriate type, and the _length member must contain the number of elements to be passed. (If the parameter is "inout" and the sequence is unbounded, the _maximum member must also be set to the actual size of the array. Upon return, _length will contain the number of values copied into _buffer, which must be less than _maximum) When a sequence is passed as an out method parameter or received as the return value, the method procedure allocates storage for _buffer as needed, the _length member contains the number of elements returned, and the _maximum member contains the number of elements allocated. (The client is responsible for subsequently freeing the memory pointed to by _buffer.) C and C++ programs using SOM's language bindings can refer to sequence types as: _IDL_SEQUENCE_type where type is the effective type of the sequence members. If the typedef is for a pointer type, then the effective type is the name of the pointer type. A string is similar to a sequence of type char. It can contain all possible 8 bit quantities except NULL. Strings are specified as follows: string [ < positive-integer-const > ] where the optional positive-integer-const is a constant expression that specifies the maximum size of the string (as a positive integer, which does not include the extra byte to hold a NULL as required in C/C++). In SOM's C and C++ bindings, strings are mapped onto zero byte terminated character arrays. The length of the string is encoded by the position of the zero byte. C and C++ programs using SOM's language bindings can refer to string types by the type name string. When an unbounded string is passed as the value of an "inout" method parameter, the returned value is constrained to be no longer than the input value. Note: Using unbounded strings as "inout" parameters is not advised. ═══ Void Type ═══ IDL supports the void type indicating that the method returns no value. Unlike C and C++ procedures, methods that do not return a result must specify void as their return type. ═══ Forward Declaration ═══ Forward declarations can be used to declare the name of an interface before it is defined. Use the Search or Index buttons to locate the actual interface declaration. ═══ 5. ::ooxdbf ═══ Class is defined in IDL file: ooxbase.idl The ooxdbf class is derived from the following classes: SOMObject ooxdbf has defined the following structures/exceptions: ooxdbf_error ooxdbf has defined the following attributes: current_record record_count field_count deleted ooxdbf has the following introduced and overridden methods. Method: long _get_current_record () Method: long _get_record_count () Method: long _get_field_count () Method: boolean _get_deleted () Method: short Open (in string dbfname) raises (ooxdbf_error) Method: short Read () raises (ooxdbf_error) Method: short Read_prev () raises (ooxdbf_error) Method: short Write () raises (ooxdbf_error) Method: short GoTo (in long recno) raises (ooxdbf_error) Method: short Update () raises (ooxdbf_error) Method: short Delete () raises (ooxdbf_error) Method: short Undelete () raises (ooxdbf_error) Method: short Pack () raises (ooxdbf_error) Method: short Close () raises (ooxdbf_error) Method: ooxfield field (in long i) raises (ooxdbf_error) Method: ooxfield field_by_name (in string name) raises (ooxdbf_error) Method: void reset_index (in long from) raises (ooxdbf_error) Method: short find (in string key) raises (ooxdbf_error) Method: short reindex () raises (ooxdbf_error) Method: long attach_index (in string ndxdata) raises (ooxdbf_error) Method: long use_index (in string ndxdata) raises (ooxdbf_error) Method: long createindex (in string name, in string ndxdata) raises (ooxdbf_error) Method: long buildindex (in string ndxdata) raises (ooxdbf_error) Method: long add_tag (in string ndxdata, in string key) raises (ooxdbf_error) Method: long drop_tag (in string ndxdata) raises (ooxdbf_error) Method: long export (in string filename, in char delimiter) raises (ooxdbf_error) Method: long import (in string filename, in char delimiter) raises (ooxdbf_error) Method: long sort (in string filename, in string fields) raises (ooxdbf_error) Method: void usingfilename (inout somInitCtrl ctrl, in string Name) raises (ooxdbf_error) Method: void defineDBF (inout somInitCtrl ctrl, in string Name, in ooxfield field) raises (ooxdbf_error) Method: void defineDBFusing (inout somInitCtrl ctrl, in string Name, in ooxdbf usingDBF) raises (ooxdbf_error) Method: long DBFdefined () raises (ooxdbf_error) Method: long addfld (in ooxfield field) raises (ooxdbf_error) Method: long dropfld (in ooxfield field) raises (ooxdbf_error) Method: long modifyfld (in ooxfield oldfield, in ooxfield newfield) raises (ooxdbf_error) ooxdbf has defined the following instance variables: current_record record_count field_count deleted ═══ ooxdbf_error ═══ ═══ Type - ooxdbf_error ═══ Exception ooxdbf_error exception ooxdbf_error { long ErrCode; string Reason; }; ═══ ooxdbf_error ═══ Syntax view IDL ═══ current_record ═══ ═══ Attribute - current_record ═══ Attribute current_record readonly attribute long current_record; ═══ current_record ═══ Syntax view IDL ═══ record_count ═══ ═══ Attribute - record_count ═══ Attribute record_count readonly attribute long record_count; ═══ record_count ═══ Syntax view IDL ═══ field_count ═══ ═══ Attribute - field_count ═══ Attribute field_count readonly attribute long field_count; ═══ field_count ═══ Syntax view IDL ═══ deleted ═══ ═══ Attribute - deleted ═══ Attribute deleted readonly attribute boolean deleted; ═══ deleted ═══ Syntax view IDL ═══ 5.1. _get_current_record ═══ ═══ Syntax - _get_current_record ═══ Method _get_current_record long _get_current_record () Method from the IDL attribute statement: "readonly attribute long current_record" ═══ _get_current_record ═══ Syntax view IDL ═══ 5.2. _get_record_count ═══ ═══ Syntax - _get_record_count ═══ Method _get_record_count long _get_record_count () Method from the IDL attribute statement: "readonly attribute long record_count" ═══ _get_record_count ═══ Syntax view IDL ═══ 5.3. _get_field_count ═══ ═══ Syntax - _get_field_count ═══ Method _get_field_count long _get_field_count () Method from the IDL attribute statement: "readonly attribute long field_count" ═══ _get_field_count ═══ Syntax view IDL ═══ 5.4. _get_deleted ═══ ═══ Syntax - _get_deleted ═══ Method _get_deleted boolean _get_deleted () Method from the IDL attribute statement: "readonly attribute boolean deleted" ═══ _get_deleted ═══ Syntax view IDL ═══ 5.5. Open ═══ ═══ Syntax - Open ═══ Method Open short Open (in string dbfname) raises (ooxdbf_error) ═══ Open ═══ Syntax view IDL ═══ 5.6. Read ═══ ═══ Syntax - Read ═══ Method Read short Read () raises (ooxdbf_error) ═══ Read ═══ Syntax view IDL ═══ 5.7. Read_prev ═══ ═══ Syntax - Read_prev ═══ Method Read_prev short Read_prev () raises (ooxdbf_error) ═══ Read_prev ═══ Syntax view IDL ═══ 5.8. Write ═══ ═══ Syntax - Write ═══ Method Write short Write () raises (ooxdbf_error) ═══ Write ═══ Syntax view IDL ═══ 5.9. GoTo ═══ ═══ Syntax - GoTo ═══ Method GoTo short GoTo (in long recno) raises (ooxdbf_error) ═══ GoTo ═══ Syntax view IDL ═══ 5.10. Update ═══ ═══ Syntax - Update ═══ Method Update short Update () raises (ooxdbf_error) ═══ Update ═══ Syntax view IDL ═══ 5.11. Delete ═══ ═══ Syntax - Delete ═══ Method Delete short Delete () raises (ooxdbf_error) ═══ Delete ═══ Syntax view IDL ═══ 5.12. Undelete ═══ ═══ Syntax - Undelete ═══ Method Undelete short Undelete () raises (ooxdbf_error) ═══ Undelete ═══ Syntax view IDL ═══ 5.13. Pack ═══ ═══ Syntax - Pack ═══ Method Pack short Pack () raises (ooxdbf_error) ═══ Pack ═══ Syntax view IDL ═══ 5.14. Close ═══ ═══ Syntax - Close ═══ Method Close short Close () raises (ooxdbf_error) ═══ Close ═══ Syntax view IDL ═══ 5.15. field ═══ ═══ Syntax - field ═══ Method field ooxfield field (in long i) raises (ooxdbf_error) ═══ field ═══ Syntax view IDL ═══ 5.16. field_by_name ═══ ═══ Syntax - field_by_name ═══ Method field_by_name ooxfield field_by_name (in string name) raises (ooxdbf_error) ═══ field_by_name ═══ Syntax view IDL ═══ 5.17. reset_index ═══ ═══ Syntax - reset_index ═══ Method reset_index void reset_index (in long from) raises (ooxdbf_error) ═══ reset_index ═══ Syntax view IDL ═══ 5.18. find ═══ ═══ Syntax - find ═══ Method find short find (in string key) raises (ooxdbf_error) ═══ find ═══ Syntax view IDL ═══ 5.19. reindex ═══ ═══ Syntax - reindex ═══ Method reindex short reindex () raises (ooxdbf_error) ═══ reindex ═══ Syntax view IDL ═══ 5.20. attach_index ═══ ═══ Syntax - attach_index ═══ Method attach_index long attach_index (in string ndxdata) raises (ooxdbf_error) ═══ attach_index ═══ Syntax view IDL ═══ 5.21. use_index ═══ ═══ Syntax - use_index ═══ Method use_index long use_index (in string ndxdata) raises (ooxdbf_error) ═══ use_index ═══ Syntax view IDL ═══ 5.22. createindex ═══ ═══ Syntax - createindex ═══ Method createindex long createindex (in string name, in string ndxdata) raises (ooxdbf_error) ═══ createindex ═══ Syntax view IDL ═══ 5.23. buildindex ═══ ═══ Syntax - buildindex ═══ Method buildindex long buildindex (in string ndxdata) raises (ooxdbf_error) ═══ buildindex ═══ Syntax view IDL ═══ 5.24. add_tag ═══ ═══ Syntax - add_tag ═══ Method add_tag long add_tag (in string ndxdata, in string key) raises (ooxdbf_error) ═══ add_tag ═══ Syntax view IDL ═══ 5.25. drop_tag ═══ ═══ Syntax - drop_tag ═══ Method drop_tag long drop_tag (in string ndxdata) raises (ooxdbf_error) ═══ drop_tag ═══ Syntax view IDL ═══ 5.26. export ═══ ═══ Syntax - export ═══ Method export long export (in string filename, in char delimiter) raises (ooxdbf_error) ═══ export ═══ Syntax view IDL ═══ 5.27. import ═══ ═══ Syntax - import ═══ Method import long import (in string filename, in char delimiter) raises (ooxdbf_error) ═══ import ═══ Syntax view IDL ═══ 5.28. sort ═══ ═══ Syntax - sort ═══ Method sort long sort (in string filename, in string fields) raises (ooxdbf_error) ═══ sort ═══ Syntax view IDL ═══ 5.29. usingfilename ═══ ═══ Syntax - usingfilename ═══ Method usingfilename void usingfilename (inout somInitCtrl ctrl, in string Name) raises (ooxdbf_error) ═══ usingfilename ═══ Syntax view IDL ═══ 5.30. defineDBF ═══ ═══ Syntax - defineDBF ═══ Method defineDBF void defineDBF (inout somInitCtrl ctrl, in string Name, in ooxfield field) raises (ooxdbf_error) ═══ defineDBF ═══ Syntax view IDL ═══ 5.31. defineDBFusing ═══ ═══ Syntax - defineDBFusing ═══ Method defineDBFusing void defineDBFusing (inout somInitCtrl ctrl, in string Name, in ooxdbf usingDBF) raises (ooxdbf_error) ═══ defineDBFusing ═══ Syntax view IDL ═══ 5.32. DBFdefined ═══ ═══ Syntax - DBFdefined ═══ Method DBFdefined long DBFdefined () raises (ooxdbf_error) ═══ DBFdefined ═══ Syntax view IDL ═══ 5.33. addfld ═══ ═══ Syntax - addfld ═══ Method addfld long addfld (in ooxfield field) raises (ooxdbf_error) ═══ addfld ═══ Syntax view IDL ═══ 5.34. dropfld ═══ ═══ Syntax - dropfld ═══ Method dropfld long dropfld (in ooxfield field) raises (ooxdbf_error) ═══ dropfld ═══ Syntax view IDL ═══ 5.35. modifyfld ═══ ═══ Syntax - modifyfld ═══ Method modifyfld long modifyfld (in ooxfield oldfield, in ooxfield newfield) raises (ooxdbf_error) ═══ modifyfld ═══ Syntax view IDL ═══ current_record ═══ ═══ data - current_record ═══ Data current_record long current_record; ═══ current_record ═══ Syntax view IDL ═══ record_count ═══ ═══ data - record_count ═══ Data record_count long record_count; ═══ record_count ═══ Syntax view IDL ═══ field_count ═══ ═══ data - field_count ═══ Data field_count long field_count; ═══ field_count ═══ Syntax view IDL ═══ deleted ═══ ═══ data - deleted ═══ Data deleted boolean deleted; ═══ deleted ═══ Syntax view IDL ═══ 6. ::ooxfield ═══ Class is defined in IDL file: ooxfield.idl The ooxfield class is derived from the following classes: SOMObject ooxfield has defined the following structures/exceptions: ooxfield_error ooxfield has the following introduced and overridden methods. Method: string get_name () raises (ooxfield_error) Method: string get () raises (ooxfield_error) Method: long put (in string datum) raises (ooxfield_error) Method: char get_type () raises (ooxfield_error) Method: short get_length () raises (ooxfield_error) Method: short get_dec_point () raises (ooxfield_error) Method: somDefaultInit defined in SOMObject. Method: somUninit defined in SOMObject. ooxfield has defined the following instance variables: buffer ═══ ooxfield_error ═══ ═══ Type - ooxfield_error ═══ Exception ooxfield_error exception ooxfield_error { long ErrCode; string Reason; }; ═══ ooxfield_error ═══ Syntax view IDL ═══ 6.1. get_name ═══ ═══ Syntax - get_name ═══ Method get_name string get_name () raises (ooxfield_error) ═══ get_name ═══ Syntax view IDL ═══ 6.2. get ═══ ═══ Syntax - get ═══ Method get string get () raises (ooxfield_error) ═══ get ═══ Syntax view IDL ═══ 6.3. put ═══ ═══ Syntax - put ═══ Method put long put (in string datum) raises (ooxfield_error) ═══ put ═══ Syntax view IDL ═══ 6.4. get_type ═══ ═══ Syntax - get_type ═══ Method get_type char get_type () raises (ooxfield_error) ═══ get_type ═══ Syntax view IDL ═══ 6.5. get_length ═══ ═══ Syntax - get_length ═══ Method get_length short get_length () raises (ooxfield_error) ═══ get_length ═══ Syntax view IDL ═══ 6.6. get_dec_point ═══ ═══ Syntax - get_dec_point ═══ Method get_dec_point short get_dec_point () raises (ooxfield_error) ═══ get_dec_point ═══ Syntax view IDL ═══ buffer ═══ ═══ data - buffer ═══ Data buffer char *buffer; ═══ buffer ═══ Syntax view IDL ═══ 7. ::ooxcharacter ═══ Class is defined in IDL file: ooxcharacter.idl The ooxcharacter class is derived from the following classes: ooxfield ooxcharacter has defined the following structures/exceptions: ooxfield_error ooxcharacter has the following introduced and overridden methods. Method: void define (inout somInitCtrl ctrl, in string name, in short length) Method: somDefaultInit defined in SOMObject. Method: somUninit defined in SOMObject. ═══ ooxfield_error ═══ ═══ Type - ooxfield_error ═══ Exception ooxfield_error exception ooxfield_error { long ErrCode; string Reason; }; ═══ ooxfield_error ═══ Syntax view IDL ═══ 7.1. define ═══ ═══ Syntax - define ═══ Method define void define (inout somInitCtrl ctrl, in string name, in short length) ═══ define ═══ Syntax view IDL ═══ 8. ::ooxdate ═══ Class is defined in IDL file: ooxdate.idl The ooxdate class is derived from the following classes: ooxfield ooxdate has defined the following structures/exceptions: ooxfield_error ooxdate has the following introduced and overridden methods. Method: void define (inout somInitCtrl ctrl, in string name) Method: short get_month () Method: short get_day () Method: short get_year () Method: void put_month (in short month) Method: void put_day (in short day) Method: void put_year (in short year) Method: somDefaultInit defined in SOMObject. Method: somUninit defined in SOMObject. ═══ ooxfield_error ═══ ═══ Type - ooxfield_error ═══ Exception ooxfield_error exception ooxfield_error { long ErrCode; string Reason; }; ═══ ooxfield_error ═══ Syntax view IDL ═══ 8.1. define ═══ ═══ Syntax - define ═══ Method define void define (inout somInitCtrl ctrl, in string name) ═══ define ═══ Syntax view IDL ═══ 8.2. get_month ═══ ═══ Syntax - get_month ═══ Method get_month short get_month () ═══ get_month ═══ Syntax view IDL ═══ 8.3. get_day ═══ ═══ Syntax - get_day ═══ Method get_day short get_day () ═══ get_day ═══ Syntax view IDL ═══ 8.4. get_year ═══ ═══ Syntax - get_year ═══ Method get_year short get_year () ═══ get_year ═══ Syntax view IDL ═══ 8.5. put_month ═══ ═══ Syntax - put_month ═══ Method put_month void put_month (in short month) ═══ put_month ═══ Syntax view IDL ═══ 8.6. put_day ═══ ═══ Syntax - put_day ═══ Method put_day void put_day (in short day) ═══ put_day ═══ Syntax view IDL ═══ 8.7. put_year ═══ ═══ Syntax - put_year ═══ Method put_year void put_year (in short year) ═══ put_year ═══ Syntax view IDL ═══ 9. ::ooxlogical ═══ Class is defined in IDL file: ooxlogical.idl The ooxlogical class is derived from the following classes: ooxfield ooxlogical has defined the following structures/exceptions: ooxfield_error ooxlogical has the following introduced and overridden methods. Method: void define (inout somInitCtrl ctrl, in string name) Method: void put_boolean (in boolean booleanv) Method: boolean get_boolean () Method: somDefaultInit defined in SOMObject. Method: somUninit defined in SOMObject. ═══ ooxfield_error ═══ ═══ Type - ooxfield_error ═══ Exception ooxfield_error exception ooxfield_error { long ErrCode; string Reason; }; ═══ ooxfield_error ═══ Syntax view IDL ═══ 9.1. define ═══ ═══ Syntax - define ═══ Method define void define (inout somInitCtrl ctrl, in string name) ═══ define ═══ Syntax view IDL ═══ 9.2. put_boolean ═══ ═══ Syntax - put_boolean ═══ Method put_boolean void put_boolean (in boolean booleanv) ═══ put_boolean ═══ Syntax view IDL ═══ 9.3. get_boolean ═══ ═══ Syntax - get_boolean ═══ Method get_boolean boolean get_boolean () ═══ get_boolean ═══ Syntax view IDL ═══ 10. ::ooxmemo ═══ Class is defined in IDL file: ooxmemo.idl The ooxmemo class is derived from the following classes: ooxfield ooxmemo has defined the following structures/exceptions: ooxfield_error ooxmemo has the following introduced and overridden methods. Method: void define (inout somInitCtrl ctrl, in string name) Method: put defined in ooxfield. Method: get defined in ooxfield. Method: somDefaultInit defined in SOMObject. Method: somUninit defined in SOMObject. ooxmemo has defined the following instance variables: blocks mdbt ═══ ooxfield_error ═══ ═══ Type - ooxfield_error ═══ Exception ooxfield_error exception ooxfield_error { long ErrCode; string Reason; }; ═══ ooxfield_error ═══ Syntax view IDL ═══ 10.1. define ═══ ═══ Syntax - define ═══ Method define void define (inout somInitCtrl ctrl, in string name) ═══ define ═══ Syntax view IDL ═══ blocks ═══ ═══ data - blocks ═══ Data blocks long blocks; ═══ blocks ═══ Syntax view IDL ═══ mdbt ═══ ═══ data - mdbt ═══ Data mdbt dbt mdbt; ═══ mdbt ═══ Syntax view IDL ═══ 11. ::ooxnumeric ═══ Class is defined in IDL file: ooxnumeric.idl The ooxnumeric class is derived from the following classes: ooxfield ooxnumeric has defined the following structures/exceptions: ooxfield_error ooxnumeric has the following introduced and overridden methods. Method: void define (inout somInitCtrl ctrl, in string name, in short length, in short decimal) Method: void put_long (in long longv) Method: void put_float (in float floatv) Method: long get_long () Method: float get_float () Method: somDefaultInit defined in SOMObject. Method: somUninit defined in SOMObject. ═══ ooxfield_error ═══ ═══ Type - ooxfield_error ═══ Exception ooxfield_error exception ooxfield_error { long ErrCode; string Reason; }; ═══ ooxfield_error ═══ Syntax view IDL ═══ 11.1. define ═══ ═══ Syntax - define ═══ Method define void define (inout somInitCtrl ctrl, in string name, in short length, in short decimal) ═══ define ═══ Syntax view IDL ═══ 11.2. put_long ═══ ═══ Syntax - put_long ═══ Method put_long void put_long (in long longv) ═══ put_long ═══ Syntax view IDL ═══ 11.3. put_float ═══ ═══ Syntax - put_float ═══ Method put_float void put_float (in float floatv) ═══ put_float ═══ Syntax view IDL ═══ 11.4. get_long ═══ ═══ Syntax - get_long ═══ Method get_long long get_long () ═══ get_long ═══ Syntax view IDL ═══ 11.5. get_float ═══ ═══ Syntax - get_float ═══ Method get_float float get_float () ═══ get_float ═══ Syntax view IDL ═══ 12. ::SOMClass ═══ This is the SOM metaclass. That is, the instances of this class are class objects. When the SOM environment is created an instance of SOMClass is created and a pointer to it is placed in the external data location (SOMClassClassData.classObject). Bindings provide the macro _SOMClass for this expression. _SOMClass is unique in that it is its own class object. I.e., _SOMClass == _somGetClass(_SOMClass). SOMClass can be subclassed just like any SOM class. The subclasses of SOMClass are new metaclasses and can generate class objects with different implementations than those produced by _SOMClass. An important rule for metaclass programming is that no methods introduced by SOMClass should ever be overridden. While this limits the utility of metaclass programming in SOM, it guarantees that SOM will operate correctly. Special class frameworks may be available from IBM to alleviate this restriction. Also, the restriction may be lifted in the future. Class is defined in IDL file: somcls.idl The SOMClass class is derived from the following classes: SOMObject SOMClass has defined the following types: somTokenSequence SOMClassSequence somOffsets somIdSequence SOMClass has defined the following structures/exceptions: somOffsetInfo SOMClass has defined the following attributes: somDataAlignment somInstanceDataOffsets somDirectInitClasses SOMClass has the following introduced and overridden methods. Method: long _get_somDataAlignment () Method: somOffsets _get_somInstanceDataOffsets () Method: SOMClassSequence _get_somDirectInitClasses () Method: SOMObject somNew () Method: SOMObject somNewNoInit () Method: SOMObject somRenew (in void * obj) Method: SOMObject somRenewNoInit (in void * obj) Method: SOMObject somRenewNoZero (in void * obj) Method: SOMObject somRenewNoInitNoZero (in void * obj) Method: somToken somAllocate (in long size) Method: void somDeallocate (in somToken memptr) Method: void somInitClass (in string className, in SOMClass parentClass, in long dataSize, in long maxStaticMethods, in long majorVersion, in long minorVersion) Method: void somInitMIClass (in long inherit_vars, in string className, in SOMClassSequence parentClasses, in long dataSize, in long dataAlignment, in long maxStaticMethods, in long majorVersion, in long minorVersion) Method: somMToken somAddStaticMethod (in somId methodId, in somId methodDescriptor, in somMethodPtr method, in somMethodPtr redispatchStub, in somMethodPtr applyStub) Method: void somAddDynamicMethod (in somId methodId, in somId methodDescriptor, in somMethodPtr method, in somMethodPtr applyStub) Method: void somOverrideSMethod (in somId methodId, in somMethodPtr method) Method: void somClassReady () Method: somMethodPtr somGetApplyStub (in somId methodId) Method: somClassDataStructure *somGetClassData () Method: void somSetClassData (in somClassDataStructure cds) Method: somMethodTab *somGetClassMtab () Method: long somGetInstanceOffset () Method: long somGetInstancePartSize () Method: long somGetInstanceSize () Method: somDToken somGetInstanceToken () Method: somDToken somGetMemberToken (in long memberOffset, in somDToken instanceToken) Method: boolean somGetMethodData (in somId methodId, out somMethodData md) Method: somMethodProc *somGetRdStub (in somId methodId) Method: somId somGetMethodDescriptor (in somId methodId) Method: long somGetMethodIndex (in somId id) Method: somMToken somGetMethodToken (in somId methodId) Method: string somGetName () Method: boolean somGetNthMethodData (in long n, out somMethodData md) Method: somId somGetNthMethodInfo (in long n, out somId descriptor) Method: long somGetNumMethods () Method: long somGetNumStaticMethods () Method: SOMClass somGetParent () Method: SOMClassSequence somGetParents () Method: void somGetVersionNumbers (out long majorVersion, out long minorVersion) Method: boolean somFindMethod (in somId methodId, out somMethodPtr m) Method: boolean somFindMethodOk (in somId methodId, out somMethodPtr m) Method: somMethodPtr somFindSMethod (in somId methodId) Method: somMethodPtr somFindSMethodOk (in somId methodId) Method: somMethodPtr somLookupMethod (in somId methodId) Method: somToken somGetMarshalPlan (in somId methodId) Method: boolean somCheckVersion (in long majorVersion, in long minorVersion) Method: boolean somDescendedFrom (in SOMClass aClassObj) Method: boolean somSupportsMethod (in somId mId) Method: somMethodPtr somDefinedMethod (in somMToken method) Method: void somOverrideMtab () SOMClass has defined the following instance variables: somDataAlignment somDirectInitClasses ═══ somTokenSequence ═══ ═══ Type - somTokenSequence ═══ Type somTokenSequence typedef sequence somTokenSequence; a (generic) sequence of somTokens ═══ somTokenSequence ═══ Syntax view IDL ═══ SOMClassSequence ═══ ═══ Type - SOMClassSequence ═══ Type SOMClassSequence typedef sequence SOMClassSequence; a sequence of classes ═══ SOMClassSequence ═══ Syntax view IDL ═══ somOffsets ═══ ═══ Type - somOffsets ═══ Type somOffsets typedef sequence somOffsets; a sequence of class-related offsets ═══ somOffsets ═══ Syntax view IDL ═══ somIdSequence ═══ ═══ Type - somIdSequence ═══ Type somIdSequence typedef sequence somIdSequence; a sequence of somIds ═══ somIdSequence ═══ Syntax view IDL ═══ somOffsetInfo ═══ ═══ Type - somOffsetInfo ═══ Structure somOffsetInfo struct somOffsetInfo { SOMClass cls; long offset; }; a structure to describe a class-related offset ═══ somOffsetInfo ═══ Syntax view IDL ═══ somDataAlignment ═══ ═══ Attribute - somDataAlignment ═══ Attribute somDataAlignment readonly attribute long somDataAlignment; The alignment required for the instance data structure introduced by the receiving class. ═══ somDataAlignment ═══ Syntax view IDL ═══ somInstanceDataOffsets ═══ ═══ Attribute - somInstanceDataOffsets ═══ Attribute somInstanceDataOffsets readonly attribute somOffsets somInstanceDataOffsets; A sequence of the instance data offsets for all classes used in the derivation of the receiving class (including the receiver). ═══ somInstanceDataOffsets ═══ Syntax view IDL ═══ somDirectInitClasses ═══ ═══ Attribute - somDirectInitClasses ═══ Attribute somDirectInitClasses readonly attribute SOMClassSequence somDirectInitClasses; The ancestors whose initializers the receiving class wants to directly invoke. ═══ somDirectInitClasses ═══ Syntax view IDL ═══ 12.1. _get_somDataAlignment ═══ ═══ Syntax - _get_somDataAlignment ═══ Method _get_somDataAlignment long _get_somDataAlignment () The alignment required for the instance data structure introduced by the receiving class. ═══ _get_somDataAlignment ═══ Syntax view IDL ═══ 12.2. _get_somInstanceDataOffsets ═══ ═══ Syntax - _get_somInstanceDataOffsets ═══ Method _get_somInstanceDataOffsets somOffsets _get_somInstanceDataOffsets () A sequence of the instance data offsets for all classes used in the derivation of the receiving class (including the receiver). ═══ _get_somInstanceDataOffsets ═══ Syntax view IDL ═══ 12.3. _get_somDirectInitClasses ═══ ═══ Syntax - _get_somDirectInitClasses ═══ Method _get_somDirectInitClasses SOMClassSequence _get_somDirectInitClasses () The ancestors whose initializers the receiving class wants to directly invoke. ═══ _get_somDirectInitClasses ═══ Syntax view IDL ═══ 12.4. somNew ═══ ═══ Syntax - somNew ═══ Method somNew SOMObject somNew () Uses SOMMalloc to allocate storage for a new instance of the receiving class, and then calls somRenewNoInitNoZero to load the new object's method table pointer. Then somDefaultInit is called to initialize the new object. Note: If the instance is a class object, somInitMIClass must then be invoked to declare parents and initialize the class's instance method table. Upon failure, NULL is returned. ═══ somNew ═══ Syntax view IDL ═══ 12.5. somNewNoInit ═══ ═══ Syntax - somNewNoInit ═══ Method somNewNoInit SOMObject somNewNoInit () Equivalent to somNew except that somDefaultInit is not called. ═══ somNewNoInit ═══ Syntax view IDL ═══ 12.6. somRenew ═══ ═══ Syntax - somRenew ═══ Method somRenew SOMObject somRenew (in void * obj) Equivalent to somNew except that storage is not allocated. is taken as the address of the new object. ═══ somRenew ═══ Syntax view IDL ═══ 12.7. somRenewNoInit ═══ ═══ Syntax - somRenewNoInit ═══ Method somRenewNoInit SOMObject somRenewNoInit (in void * obj) Equivalent to somRenew except that somDefaultInit is not called. ═══ somRenewNoInit ═══ Syntax view IDL ═══ 12.8. somRenewNoZero ═══ ═══ Syntax - somRenewNoZero ═══ Method somRenewNoZero SOMObject somRenewNoZero (in void * obj) Equivalent to somRenew except that memory is not zeroed out. ═══ somRenewNoZero ═══ Syntax view IDL ═══ 12.9. somRenewNoInitNoZero ═══ ═══ Syntax - somRenewNoInitNoZero ═══ Method somRenewNoInitNoZero SOMObject somRenewNoInitNoZero (in void * obj) The purpose of this method is to load an object's method table. The SOM API requires that somRenewNoInitNoZero always be called when creating a new object whose metaclass is not SOMClass. This is because metaclasses must be guaranteed that they can use somRenewNoInitNoZero to track object creation if this is desired. ═══ somRenewNoInitNoZero ═══ Syntax view IDL ═══ 12.10. somAllocate ═══ ═══ Syntax - somAllocate ═══ Method somAllocate somToken somAllocate (in long size) Allocates memory to hold an object and returns a pointer to this memory. This is a nonstatic method, and cannot be overridden. The default implementation calls SOMMalloc, but a class designer can specify a different implementation using the somallocate modifier in IDL. The allocator takes the same parameters as this method. ═══ somAllocate ═══ Syntax view IDL ═══ 12.11. somDeallocate ═══ ═══ Syntax - somDeallocate ═══ Method somDeallocate void somDeallocate (in somToken memptr) Zeros out the method table pointer stored in the word pointed to by memptr, and then deallocates the block of memory pointed to by memptr. This is a nonstatic method and cannot be overridden. The default deallocator called is SOMFree, but a class designer can specify a different deallocator using the somdeallocate modifier in IDL. The deallocator takes a char* (memptr) and a long (size) as arguments. ═══ somDeallocate ═══ Syntax view IDL ═══ 12.12. somInitClass ═══ ═══ Syntax - somInitClass ═══ Method somInitClass void somInitClass (in string className, in SOMClass parentClass, in long dataSize, in long maxStaticMethods, in long majorVersion, in long minorVersion) somInitClass is obsolete, and should no longer be used. The SOM 2.0 kernel provides special handling for redispatch stubs in the case of SOM 1.0 classes, and use of this method is what tells the kernel that old-style redispatch stubs will be registered. ═══ somInitClass ═══ Syntax view IDL ═══ 12.13. somInitMIClass ═══ ═══ Syntax - somInitMIClass ═══ Method somInitMIClass void somInitMIClass (in long inherit_vars, in string className, in SOMClassSequence parentClasses, in long dataSize, in long dataAlignment, in long maxStaticMethods, in long majorVersion, in long minorVersion) somInitMIClass implements the second phase of dynamic class creation: inheritance of interface and possibly implementation (instance variables) by suitable initialization of (a class object). For somInitMIClass, the inherit_vars argument controls whether abstract or implementation inheritance is used. Inherit_vars is a 32 bit bit-vector. Implementation is inherited from parent i iff the bit 1<=32. On a class-by-class basis, for each class ancestor, implementation inheritance always takes precidence over abstract inheritance. This is necessary to guarantee that procedures supporting parent method calls (available on non-abstract parents) are always supported by parent instance variables. is a string containing the class name. A copy is made, so the string may be freed upon return to the caller if this is desired. is a SOMClassSequence containing pointers to the parent classes. somInitMIClass makes a copy of this, so it may be freed upon return to the caller if this is desired. is the space needed for the instance variables introduced by this class. specifies the desired byte alignment for instance data introduced by this class. A value of 0 selects a system-wide default; any other argument is taken as the desired byte alignment multiple. Thus, for example, even if a byte multiple of 8 is needed for double precision values on a given system (so 8 is the default), a class whose instance data doesn't require this can indicate otherwise. If A is the next memory address available for holding instance data, the address that will be used is A + (A mod byte-alignment). is the maximum number of static methods that will be added to the initialized class using addStaticMethod. indicates the major version number for this implementation of the class definition, and indicates the minor version number. ═══ somInitMIClass ═══ Syntax view IDL ═══ 12.14. somAddStaticMethod ═══ ═══ Syntax - somAddStaticMethod ═══ Method somAddStaticMethod somMToken somAddStaticMethod (in somId methodId, in somId methodDescriptor, in somMethodPtr method, in somMethodPtr redispatchStub, in somMethodPtr applyStub) Adds the indicated method, creating and returning a new method token. is the somId for an identifier that can be used to access signature information about the method from an interface repository. is the actual method procedure for this method is a procedure with the same calling sequence as that invokes somDispatch for the method. is a procedure used to support somApply. ═══ somAddStaticMethod ═══ Syntax view IDL ═══ 12.15. somAddDynamicMethod ═══ ═══ Syntax - somAddDynamicMethod ═══ Method somAddDynamicMethod void somAddDynamicMethod (in somId methodId, in somId methodDescriptor, in somMethodPtr method, in somMethodPtr applyStub) Adds the indicated method to the class's name lookup list. If this happens to override a static method then this operation is equivalent to and the and arguments are ignored (the overridden method's values will be used). is the somId for an identifier that can be used to access signature information about the method from an interface repository. is the actual method procedure for this method is a procedure that takes a standard variable argument list data structure applies it to its target object by calling with arguments derived from the data structure. Its calling sequence is the same as the calling sequence of the dispatch methods defined in SOMObject. This stub is used in the support of the dispatch methods used in some classes. In classes where the dispatch functions do not need such a function this parameter may be null. ═══ somAddDynamicMethod ═══ Syntax view IDL ═══ 12.16. somOverrideSMethod ═══ ═══ Syntax - somOverrideSMethod ═══ Method somOverrideSMethod void somOverrideSMethod (in somId methodId, in somMethodPtr method) This method can be used instead of or when it is known that the class' parent class already supports this method. This call does not require the method descriptor and stub methods that the others do. ═══ somOverrideSMethod ═══ Syntax view IDL ═══ 12.17. somClassReady ═══ ═══ Syntax - somClassReady ═══ Method somClassReady void somClassReady () This method is invoked when all of the static initialization for the class has been finished. The default implementation simply registers the newly constructed class with the SOMClassMgr. ═══ somClassReady ═══ Syntax view IDL ═══ 12.18. somGetApplyStub ═══ ═══ Syntax - somGetApplyStub ═══ Method somGetApplyStub somMethodPtr somGetApplyStub (in somId methodId) Returns the apply stub associated with the specified method, if one exists; otherwise NULL is returned. This method is obsolete, and retained for binary compatability. In SOMr2, users never access apply stubs directly; The function somApply is used to invoke apply stubs. See somApply documentation for further information on apply stubs, and see somAddStaticMethod documentation for information on how apply stubs are registered by class implementations. ═══ somGetApplyStub ═══ Syntax view IDL ═══ 12.19. somGetClassData ═══ ═══ Syntax - somGetClassData ═══ Method somGetClassData somClassDataStructure *somGetClassData () ═══ somGetClassData ═══ Syntax view IDL ═══ 12.20. somSetClassData ═══ ═══ Syntax - somSetClassData ═══ Method somSetClassData void somSetClassData (in somClassDataStructure cds) The class' pointer to the static ClassData structure. ═══ somSetClassData ═══ Syntax view IDL ═══ 12.21. somGetClassMtab ═══ ═══ Syntax - somGetClassMtab ═══ Method somGetClassMtab somMethodTab *somGetClassMtab () A pointer to the method table used by instances of this class. This method was misnamed; it should have been called somGetInstanceMtab. ═══ somGetClassMtab ═══ Syntax view IDL ═══ 12.22. somGetInstanceOffset ═══ ═══ Syntax - somGetInstanceOffset ═══ Method somGetInstanceOffset long somGetInstanceOffset () Returns the offset of instance data introduced by the receiver in an instance of the receiver. This method is obsolete and not useful in multiple-inheritance situations. The attribute somInstanceDataOffsets replaces this method. ═══ somGetInstanceOffset ═══ Syntax view IDL ═══ 12.23. somGetInstancePartSize ═══ ═══ Syntax - somGetInstancePartSize ═══ Method somGetInstancePartSize long somGetInstancePartSize () The size in bytes of the instance data introduced by the receiving class. ═══ somGetInstancePartSize ═══ Syntax view IDL ═══ 12.24. somGetInstanceSize ═══ ═══ Syntax - somGetInstanceSize ═══ Method somGetInstanceSize long somGetInstanceSize () The total size of an instance of the receiving class. ═══ somGetInstanceSize ═══ Syntax view IDL ═══ 12.25. somGetInstanceToken ═══ ═══ Syntax - somGetInstanceToken ═══ Method somGetInstanceToken somDToken somGetInstanceToken () A data token that identifies the introduced portion of this class within itself or any derived class. This token can be subsequently passed to the run-time somDataResolve function to locate the instance data introduced by this class in any object derived from this class. ═══ somGetInstanceToken ═══ Syntax view IDL ═══ 12.26. somGetMemberToken ═══ ═══ Syntax - somGetMemberToken ═══ Method somGetMemberToken somDToken somGetMemberToken (in long memberOffset, in somDToken instanceToken) Returns a data token that for the data member at offset "memberOffset" within the introduced portion of the class identified by instanceToken. The instance token must have been obtained from a previous invocation of somGetInstanceToken. The returned member token can be subsequently passed to the run-time somDataResolve function to locate the data member. ═══ somGetMemberToken ═══ Syntax view IDL ═══ 12.27. somGetMethodData ═══ ═══ Syntax - somGetMethodData ═══ Method somGetMethodData boolean somGetMethodData (in somId methodId, out somMethodData md) If a method with id is supported by the target class, the structure pointed to by is loaded with method information and the value 1 is returned. In this case, if the method is not dynamic, md->method is loaded with the result of somClassResolve on the target class for the method. If the method is not supported, md->id is loaded with 0, and the value 0 is returned. ═══ somGetMethodData ═══ Syntax view IDL ═══ 12.28. somGetRdStub ═══ ═══ Syntax - somGetRdStub ═══ Method somGetRdStub somMethodProc *somGetRdStub (in somId methodId) Returns a redispatch stub for the indicated method, if possible. If not possible (because a valid redispatch stub has not been registered, and there is insufficient information to dynamically construct one), then a NULL is returned. ═══ somGetRdStub ═══ Syntax view IDL ═══ 12.29. somGetMethodDescriptor ═══ ═══ Syntax - somGetMethodDescriptor ═══ Method somGetMethodDescriptor somId somGetMethodDescriptor (in somId methodId) Returns the method descriptor for the indicated method. If this object does not support the indicated method then NULL is returned. ═══ somGetMethodDescriptor ═══ Syntax view IDL ═══ 12.30. somGetMethodIndex ═══ ═══ Syntax - somGetMethodIndex ═══ Method somGetMethodIndex long somGetMethodIndex (in somId id) Returns the index for the specified method. (A number that may change if any methods are added or deleted to this class object or any of its ancestors). This number is the basis for other calls to get info about the method. Indexes start at 0. A -1 is returned if the method cannot be found. ═══ somGetMethodIndex ═══ Syntax view IDL ═══ 12.31. somGetMethodToken ═══ ═══ Syntax - somGetMethodToken ═══ Method somGetMethodToken somMToken somGetMethodToken (in somId methodId) Returns the specified method's access token. This token can then be passed to method resolution routines, which use the token to select a method pointer from a method table. ═══ somGetMethodToken ═══ Syntax view IDL ═══ 12.32. somGetName ═══ ═══ Syntax - somGetName ═══ Method somGetName string somGetName () This object's class name as a NULL terminated string. ═══ somGetName ═══ Syntax view IDL ═══ 12.33. somGetNthMethodData ═══ ═══ Syntax - somGetNthMethodData ═══ Method somGetNthMethodData boolean somGetNthMethodData (in long n, out somMethodData md) loads *md with the method data associated with the the nth method, or NULL if there is no such method. Returns true is successful; false otherwise. ═══ somGetNthMethodData ═══ Syntax view IDL ═══ 12.34. somGetNthMethodInfo ═══ ═══ Syntax - somGetNthMethodInfo ═══ Method somGetNthMethodInfo somId somGetNthMethodInfo (in long n, out somId descriptor) Returns the id of the th method if one exists and NULL otherwise. The ordering of the methods is unpredictable, but will not change unless some change is made to the class or one of its ancestor classes. See CORBA documentation for info on method descriptors. ═══ somGetNthMethodInfo ═══ Syntax view IDL ═══ 12.35. somGetNumMethods ═══ ═══ Syntax - somGetNumMethods ═══ Method somGetNumMethods long somGetNumMethods () The number of methods currently supported by this class, including inherited methods (both static and dynamic). ═══ somGetNumMethods ═══ Syntax view IDL ═══ 12.36. somGetNumStaticMethods ═══ ═══ Syntax - somGetNumStaticMethods ═══ Method somGetNumStaticMethods long somGetNumStaticMethods () The number of static methods that this class has. Can be used by a child class when initializing its method table. ═══ somGetNumStaticMethods ═══ Syntax view IDL ═══ 12.37. somGetParent ═══ ═══ Syntax - somGetParent ═══ Method somGetParent SOMClass somGetParent () Returns the parent class of self (along its "left-hand" derivation path), if one exists and NULL otherwise. ═══ somGetParent ═══ Syntax view IDL ═══ 12.38. somGetParents ═══ ═══ Syntax - somGetParents ═══ Method somGetParents SOMClassSequence somGetParents () The parent classes of self. ═══ somGetParents ═══ Syntax view IDL ═══ 12.39. somGetVersionNumbers ═══ ═══ Syntax - somGetVersionNumbers ═══ Method somGetVersionNumbers void somGetVersionNumbers (out long majorVersion, out long minorVersion) Returns the class' major and minor version numbers in the corresponding output parameters. ═══ somGetVersionNumbers ═══ Syntax view IDL ═══ 12.40. somFindMethod ═══ ═══ Syntax - somFindMethod ═══ Method somFindMethod boolean somFindMethod (in somId methodId, out somMethodPtr m) Finds the method procedure associated with for this class and sets to it. 1 (true) is returned when the method procedure is a static method and 0 (false) is returned when the method procedure is dynamic method. If the class does not support the specified method then is set to NULL and the return value is meaningless. ═══ somFindMethod ═══ Syntax view IDL ═══ 12.41. somFindMethodOk ═══ ═══ Syntax - somFindMethodOk ═══ Method somFindMethodOk boolean somFindMethodOk (in somId methodId, out somMethodPtr m) Just like except that if the method is not supported then an error is raised and execution is halted. ═══ somFindMethodOk ═══ Syntax view IDL ═══ 12.42. somFindSMethod ═══ ═══ Syntax - somFindSMethod ═══ Method somFindSMethod somMethodPtr somFindSMethod (in somId methodId) Finds the indicated method, which must be a static method supported by this class, and returns a pointer to its method procedure. If the method is not supported by the receiver (as a static method or at all) then a NULL pointer is returned. ═══ somFindSMethod ═══ Syntax view IDL ═══ 12.43. somFindSMethodOk ═══ ═══ Syntax - somFindSMethodOk ═══ Method somFindSMethodOk somMethodPtr somFindSMethodOk (in somId methodId) Uses , and raises an error if the result is NULL. ═══ somFindSMethodOk ═══ Syntax view IDL ═══ 12.44. somLookupMethod ═══ ═══ Syntax - somLookupMethod ═══ Method somLookupMethod somMethodPtr somLookupMethod (in somId methodId) Like , but without restriction to static methods. ═══ somLookupMethod ═══ Syntax view IDL ═══ 12.45. somGetMarshalPlan ═══ ═══ Syntax - somGetMarshalPlan ═══ Method somGetMarshalPlan somToken somGetMarshalPlan (in somId methodId) uses namelookup from the target class to locate a method that has the indicated methodId, and returns that method's marshal plan if there is one. Otherwise, null is returned. ═══ somGetMarshalPlan ═══ Syntax view IDL ═══ 12.46. somCheckVersion ═══ ═══ Syntax - somCheckVersion ═══ Method somCheckVersion boolean somCheckVersion (in long majorVersion, in long minorVersion) Returns 1 (true) if the implementation of this class is compatible with the specified major and minor version number and false (0) otherwise. An implementation is compatible with the specified version numbers if it has the same major version number and a minor version number that is equal to or greater than . The major, minor version number pair (0,0) is considered to match any version. This method is usually called immediately after creating the class object to verify that a dynamically loaded class definition is compatible with a using application. ═══ somCheckVersion ═══ Syntax view IDL ═══ 12.47. somDescendedFrom ═══ ═══ Syntax - somDescendedFrom ═══ Method somDescendedFrom boolean somDescendedFrom (in SOMClass aClassObj) Returns 1 (true) if is a descendent class of and 0 (false) otherwise. Note: a class object is considered to be descended itself for the purposes of this method. ═══ somDescendedFrom ═══ Syntax view IDL ═══ 12.48. somSupportsMethod ═══ ═══ Syntax - somSupportsMethod ═══ Method somSupportsMethod boolean somSupportsMethod (in somId mId) Returns 1 (true) if the indicated method is supported by this class and 0 (false) otherwise. ═══ somSupportsMethod ═══ Syntax view IDL ═══ 12.49. somDefinedMethod ═══ ═══ Syntax - somDefinedMethod ═══ Method somDefinedMethod somMethodPtr somDefinedMethod (in somMToken method) if the receiving class either introduces or overrides the indicated method, then its somMethodPtr is returned, otherwise NULL is returned. ═══ somDefinedMethod ═══ Syntax view IDL ═══ 12.50. somOverrideMtab ═══ ═══ Syntax - somOverrideMtab ═══ Method somOverrideMtab void somOverrideMtab () Overrides the method table pointers to point to the redispatch stubs. All the methods except somDispatch methods are overriden. ═══ somOverrideMtab ═══ Syntax view IDL ═══ somDataAlignment ═══ ═══ data - somDataAlignment ═══ Data somDataAlignment long somDataAlignment; The alignment required for the instance data structure introduced by the receiving class. ═══ somDataAlignment ═══ Syntax view IDL ═══ somDirectInitClasses ═══ ═══ data - somDirectInitClasses ═══ Data somDirectInitClasses SOMClassSequence somDirectInitClasses; The ancestors whose initializers the receiving class wants to directly invoke. ═══ somDirectInitClasses ═══ Syntax view IDL ═══ somBooleanVector ═══ ═══ Type - somBooleanVector ═══ Type somBooleanVector typedef octet *somBooleanVector; ═══ somBooleanVector ═══ Syntax view IDL ═══ somCClassDataStructurePtr ═══ ═══ Type - somCClassDataStructurePtr ═══ Type somCClassDataStructurePtr typedef somCClassDataStructure *somCClassDataStructurePtr; ═══ somCClassDataStructurePtr ═══ Syntax view IDL ═══ somParentMtabStructPtr ═══ ═══ Type - somParentMtabStructPtr ═══ Type somParentMtabStructPtr typedef somMethodTabList *somParentMtabStructPtr; ═══ somParentMtabStructPtr ═══ Syntax view IDL ═══ somMethodTabs ═══ ═══ Type - somMethodTabs ═══ Type somMethodTabs typedef somMethodTabList *somMethodTabs; ═══ somMethodTabs ═══ Syntax view IDL ═══ somClasses ═══ ═══ Type - somClasses ═══ Type somClasses typedef somClassList *somClasses; ═══ somClasses ═══ Syntax view IDL ═══ somObjects ═══ ═══ Type - somObjects ═══ Type somObjects typedef somObjectList *somObjects; ═══ somObjects ═══ Syntax view IDL ═══ somMethodData ═══ ═══ Type - somMethodData ═══ Type somMethodData typedef somMethodDataStruct somMethodData; -- Public Method descriptor structure */ ═══ somMethodData ═══ Syntax view IDL ═══ somRdAppType ═══ ═══ Type - somRdAppType ═══ Type somRdAppType typedef unsigned long somRdAppType; method signature encoding ═══ somRdAppType ═══ Syntax view IDL ═══ somAssignCtrl ═══ ═══ Type - somAssignCtrl ═══ Type somAssignCtrl typedef somGenericCtrl somAssignCtrl; ═══ somAssignCtrl ═══ Syntax view IDL ═══ somDestructCtrl ═══ ═══ Type - somDestructCtrl ═══ Type somDestructCtrl typedef somGenericCtrl somDestructCtrl; ═══ somDestructCtrl ═══ Syntax view IDL ═══ somInitCtrl ═══ ═══ Type - somInitCtrl ═══ Type somInitCtrl typedef somGenericCtrl somInitCtrl; ═══ somInitCtrl ═══ Syntax view IDL ═══ som3AssignCtrl ═══ ═══ Type - som3AssignCtrl ═══ Type som3AssignCtrl typedef somGenericCtrl som3AssignCtrl; ═══ som3AssignCtrl ═══ Syntax view IDL ═══ som3DestructCtrl ═══ ═══ Type - som3DestructCtrl ═══ Type som3DestructCtrl typedef somGenericCtrl som3DestructCtrl; ═══ som3DestructCtrl ═══ Syntax view IDL ═══ som3InitCtrl ═══ ═══ Type - som3InitCtrl ═══ Type som3InitCtrl typedef somGenericCtrl som3InitCtrl; ═══ som3InitCtrl ═══ Syntax view IDL ═══ SOMTokBuf ═══ ═══ Type - SOMTokBuf ═══ Type SOMTokBuf typedef somToken SOMTokBuf; ═══ SOMTokBuf ═══ Syntax view IDL ═══ somClassInfo ═══ ═══ Type - somClassInfo ═══ Type somClassInfo typedef somToken somClassInfo; ═══ somClassInfo ═══ Syntax view IDL ═══ somDLocator ═══ ═══ Type - somDLocator ═══ Type somDLocator typedef somToken somDLocator; ═══ somDLocator ═══ Syntax view IDL ═══ somDToken ═══ ═══ Type - somDToken ═══ Type somDToken typedef somToken somDToken; ═══ somDToken ═══ Syntax view IDL ═══ somMLocator ═══ ═══ Type - somMLocator ═══ Type somMLocator typedef somToken somMLocator; ═══ somMLocator ═══ Syntax view IDL ═══ somMToken ═══ ═══ Type - somMToken ═══ Type somMToken typedef somToken somMToken; ═══ somMToken ═══ Syntax view IDL ═══ somMethodPtr ═══ ═══ Type - somMethodPtr ═══ Type somMethodPtr typedef somToken somMethodPtr; ═══ somMethodPtr ═══ Syntax view IDL ═══ somMethodProc ═══ ═══ Type - somMethodProc ═══ Type somMethodProc typedef somToken somMethodProc; ═══ somMethodProc ═══ Syntax view IDL ═══ fString ═══ ═══ Type - fString ═══ Type fString typedef string fString; non-terminated string -- Special procedure pointer types */ ═══ fString ═══ Syntax view IDL ═══ zString ═══ ═══ Type - zString ═══ Type zString typedef string zString; NULL terminated string ═══ zString ═══ Syntax view IDL ═══ float8 ═══ ═══ Type - float8 ═══ Type float8 typedef double float8; ═══ float8 ═══ Syntax view IDL ═══ float4 ═══ ═══ Type - float4 ═══ Type float4 typedef float float4; ═══ float4 ═══ Syntax view IDL ═══ uinteger4 ═══ ═══ Type - uinteger4 ═══ Type uinteger4 typedef unsigned long uinteger4; ═══ uinteger4 ═══ Syntax view IDL ═══ integer4 ═══ ═══ Type - integer4 ═══ Type integer4 typedef long integer4; ═══ integer4 ═══ Syntax view IDL ═══ uinteger2 ═══ ═══ Type - uinteger2 ═══ Type uinteger2 typedef unsigned short uinteger2; ═══ uinteger2 ═══ Syntax view IDL ═══ integer2 ═══ ═══ Type - integer2 ═══ Type integer2 typedef short integer2; ═══ integer2 ═══ Syntax view IDL ═══ integer1 ═══ ═══ Type - integer1 ═══ Type integer1 typedef char integer1; ═══ integer1 ═══ Syntax view IDL ═══ int ═══ ═══ Type - int ═══ Type int typedef long int; Provide the type "int". Although the mapping of a user-defined type named "int" to the IDL type long, given here, is both binary and source compatible on AIX and OS/2 2.x, it is still bad form, since the C type "int" can vary from platform to platform. This is here only for migration of OIDL to IDL. All new IDL files should explicitly select long or short (as appropriate) instead of "int." ═══ int ═══ Syntax view IDL ═══ size_t ═══ ═══ Type - size_t ═══ Type size_t typedef unsigned long size_t; Provide the type "size_t". ═══ size_t ═══ Syntax view IDL ═══ uchar_t ═══ ═══ Type - uchar_t ═══ Type uchar_t typedef octet uchar_t; Provide the type "uchar_t". ═══ uchar_t ═══ Syntax view IDL ═══ somId ═══ ═══ Type - somId ═══ Type somId typedef SOMFOREIGN somId; ═══ somId ═══ Syntax view IDL ═══ SOMHANDLE ═══ ═══ Type - SOMHANDLE ═══ Type SOMHANDLE typedef SOMFOREIGN SOMHANDLE; "SOMHANDLE" is used within SOM to represent arguments whose value is uninterpretted. ═══ SOMHANDLE ═══ Syntax view IDL ═══ va_list ═══ ═══ Type - va_list ═══ Type va_list typedef SOMFOREIGN va_list; "va_list" is used to represent a standard parameter list constructed by a caller for functions or methods that can accept a variable number of arguments. ═══ va_list ═══ Syntax view IDL ═══ FILE ═══ ═══ Type - FILE ═══ Type FILE typedef SOMFOREIGN FILE; ═══ FILE ═══ Syntax view IDL ═══ SOMFOREIGN ═══ ═══ Type - SOMFOREIGN ═══ Type SOMFOREIGN typedef somToken SOMFOREIGN; ═══ SOMFOREIGN ═══ Syntax view IDL ═══ somToken ═══ ═══ Type - somToken ═══ Type somToken typedef void * somToken; A somToken is word-sized data whose type and use is private. ═══ somToken ═══ Syntax view IDL ═══ Environment ═══ ═══ Type - Environment ═══ Structure Environment struct Environment { exception_type major; octet opaque_data[12]; }; ═══ Environment ═══ Syntax view IDL ═══ somCClassDataStructure ═══ ═══ Type - somCClassDataStructure ═══ Structure somCClassDataStructure struct somCClassDataStructure { somMethodTabs parentMtab; void instanceDataToken; void ptrs[1]; }; -- Generic Auxiliary Class Data Structure */ ═══ somCClassDataStructure ═══ Syntax view IDL ═══ somClassDataStructure ═══ ═══ Type - somClassDataStructure ═══ Structure somClassDataStructure struct somClassDataStructure { SOMClass classObject; void tokens[1]; }; -- Generic ClassData structure */ ═══ somClassDataStructure ═══ Syntax view IDL ═══ somMethodTabList ═══ ═══ Type - somMethodTabList ═══ Structure somMethodTabList struct somMethodTabList { somMethodTab *mtab; somMethodTabList *next; }; -- For building lists of method tables */ ═══ somMethodTabList ═══ Syntax view IDL ═══ somClassList ═══ ═══ Type - somClassList ═══ Structure somClassList struct somClassList { SOMClass cls; somClassList *next; }; -- For building lists of class objects */ ═══ somClassList ═══ Syntax view IDL ═══ somObjectList ═══ ═══ Type - somObjectList ═══ Structure somObjectList struct somObjectList { SOMObject cls; somObjectList *next; }; -- For building lists of objects */ ═══ somObjectList ═══ Syntax view IDL ═══ somMethodInfo ═══ ═══ Type - somMethodInfo ═══ Structure somMethodInfo struct somMethodInfo { unsigned long callType; long va_listSize; unsigned long *float_map; }; ═══ somMethodInfo ═══ Syntax view IDL ═══ somGenericCtrl ═══ ═══ Type - somGenericCtrl ═══ Structure somGenericCtrl struct somGenericCtrl { void mask; void info; long infoSize; void ctrlInfo; }; -- Public InitCtrl Structs -- */ ═══ somGenericCtrl ═══ Syntax view IDL ═══ SOMAny ═══ ═══ Type - SOMAny ═══ Structure SOMAny struct SOMAny { somMethodTab *mtab; }; -- Public Object Instance Structure */ ═══ SOMAny ═══ Syntax view IDL ═══ somMethodTab ═══ ═══ Type - somMethodTab ═══ Structure somMethodTab struct somMethodTab { SOMClass classObject; }; -- Public Method Table Structure */ ═══ somMethodTab ═══ Syntax view IDL ═══ exception_type ═══ ═══ Type - exception_type ═══ Enum exception_type enum exception_type { NO_EXCEPTION, USER_EXCEPTION, SYSTEM_EXCEPTION }; exception enum constants found in somcorba.h ═══ exception_type ═══ Syntax view IDL ═══ TCKind ═══ ═══ Type - TCKind ═══ Enum TCKind enum TCKind { tk_null, tk_void, tk_short, tk_long, tk_ushort, tk_ulong, tk_float, tk_double, tk_boolean, tk_char, tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref, tk_struct, tk_union, tk_enum, tk_string, tk_sequence, tk_array, tk_pointer, tk_self, tk_foreign }; Kinds of TypeCodes, per CORBA 1.1, p.139 ═══ TCKind ═══ Syntax view IDL ═══ 13. ::SOMObject ═══ This is the SOM root class, all SOM classes must be descended from . has no instance data so there is no per-instance cost to to being descended from it. Class is defined in IDL file: somobj.idl The SOMObject class is derived from the following classes: SOMObject has defined the following global types: somBooleanVector somCClassDataStructurePtr somParentMtabStructPtr somMethodTabs somClasses somObjects somMethodData somRdAppType somAssignCtrl somDestructCtrl somInitCtrl som3AssignCtrl som3DestructCtrl som3InitCtrl SOMTokBuf somClassInfo somDLocator somDToken somMLocator somMToken somMethodPtr somMethodProc fString zString float8 float4 uinteger4 integer4 uinteger2 integer2 integer1 int size_t uchar_t somId SOMHANDLE va_list FILE SOMFOREIGN somToken SOMObject has defined the following global structures/exceptions: Environment somCClassDataStructure somClassDataStructure somMethodTabList somClassList somObjectList somMethodInfo somGenericCtrl SOMAny somMethodTab SOMObject has defined the following global enumerated types: exception_type TCKind SOMObject has defined the following types: SOMObjectSequence BooleanSequence somObjectOffsets SOMObject has defined the following structures/exceptions: somObjectOffset SOMObject has the following introduced and overridden methods. Method: void somDefaultInit (in som3InitCtrl *ctrl) Method: void somDestruct (in octet doFree, in som3DestructCtrl *ctrl) Method: void somDefaultCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) Method: SOMObject somDefaultAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) Method: void somDefaultConstCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) Method: void somDefaultVCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) Method: void somDefaultConstVCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) Method: SOMObject somDefaultConstAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) Method: SOMObject somDefaultVAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) Method: SOMObject somDefaultConstVAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) Method: void somInit () Method: void somFree () Method: void somUninit () Method: SOMClass somGetClass () Method: string somGetClassName () Method: long somGetSize () Method: boolean somIsA (in SOMClass aClassObj) Method: boolean somIsInstanceOf (in SOMClass aClassObj) Method: boolean somRespondsTo (in somId mId) Method: boolean somDispatch (out somToken retValue, in somId methodId, in va_list ap) Method: boolean somClassDispatch (in SOMClass clsObj, out somToken retValue, in somId methodId, in va_list ap) Method: boolean somCastObj (in SOMClass cls) Method: boolean somResetObj () Method: void somDispatchV (in somId methodId, in somId descriptor, in va_list ap) Method: long somDispatchL (in somId methodId, in somId descriptor, in va_list ap) Method: void somDispatchA (in somId methodId, in somId descriptor, in va_list ap) Method: double somDispatchD (in somId methodId, in somId descriptor, in va_list ap) Method: SOMObject somPrintSelf () Method: void somDumpSelf (in long level) Method: void somDumpSelfInt (in long level) ═══ SOMObjectSequence ═══ ═══ Type - SOMObjectSequence ═══ Type SOMObjectSequence typedef sequence SOMObjectSequence; a sequence of SOM Objects ═══ SOMObjectSequence ═══ Syntax view IDL ═══ BooleanSequence ═══ ═══ Type - BooleanSequence ═══ Type BooleanSequence typedef sequence BooleanSequence; a sequence of booleans. ═══ BooleanSequence ═══ Syntax view IDL ═══ somObjectOffsets ═══ ═══ Type - somObjectOffsets ═══ Type somObjectOffsets typedef sequence somObjectOffsets; a sequence of object-related offsets ═══ somObjectOffsets ═══ Syntax view IDL ═══ somObjectOffset ═══ ═══ Type - somObjectOffset ═══ Structure somObjectOffset struct somObjectOffset { SOMObject obj; long offset; }; a structure to describe an object-related offset ═══ somObjectOffset ═══ Syntax view IDL ═══ 13.1. somDefaultInit ═══ ═══ Syntax - somDefaultInit ═══ Method somDefaultInit void somDefaultInit (in som3InitCtrl *ctrl) A default initializer for a SOM object. Passing a null ctrl indicates to the receiver that its class is the class of the object being initialized, whereby the initializer will determine an appropriate control structure. ═══ somDefaultInit ═══ Syntax view IDL ═══ 13.2. somDestruct ═══ ═══ Syntax - somDestruct ═══ Method somDestruct void somDestruct (in octet doFree, in som3DestructCtrl *ctrl) The default destructor for a SOM object. A nonzero indicates that the object storage should be freed by the object's class (via somDeallocate) after uninitialization. As with somDefaultInit, a null ctrl can be passed. ═══ somDestruct ═══ Syntax view IDL ═══ 13.3. somDefaultCopyInit ═══ ═══ Syntax - somDefaultCopyInit ═══ Method somDefaultCopyInit void somDefaultCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) A default copy constructor. Use this to make copies of objects for calling methods with "by-value" argument semantics. ═══ somDefaultCopyInit ═══ Syntax view IDL ═══ 13.4. somDefaultAssign ═══ ═══ Syntax - somDefaultAssign ═══ Method somDefaultAssign SOMObject somDefaultAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) A default assignment operator. Use this to "assign" the state of one object to another. ═══ somDefaultAssign ═══ Syntax view IDL ═══ 13.5. somDefaultConstCopyInit ═══ ═══ Syntax - somDefaultConstCopyInit ═══ Method somDefaultConstCopyInit void somDefaultConstCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) A default copy constructor that uses a const fromObj. ═══ somDefaultConstCopyInit ═══ Syntax view IDL ═══ 13.6. somDefaultVCopyInit ═══ ═══ Syntax - somDefaultVCopyInit ═══ Method somDefaultVCopyInit void somDefaultVCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) A default copy constructor that uses a volatile fromObj. ═══ somDefaultVCopyInit ═══ Syntax view IDL ═══ 13.7. somDefaultConstVCopyInit ═══ ═══ Syntax - somDefaultConstVCopyInit ═══ Method somDefaultConstVCopyInit void somDefaultConstVCopyInit (in som3InitCtrl *ctrl, in SOMObject fromObj) A default copy constructor that uses a const volatile fromObj. ═══ somDefaultConstVCopyInit ═══ Syntax view IDL ═══ 13.8. somDefaultConstAssign ═══ ═══ Syntax - somDefaultConstAssign ═══ Method somDefaultConstAssign SOMObject somDefaultConstAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) A default assignment operator that uses a const fromObj. ═══ somDefaultConstAssign ═══ Syntax view IDL ═══ 13.9. somDefaultVAssign ═══ ═══ Syntax - somDefaultVAssign ═══ Method somDefaultVAssign SOMObject somDefaultVAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) A default assignment operator that uses a volatile fromObj. ═══ somDefaultVAssign ═══ Syntax view IDL ═══ 13.10. somDefaultConstVAssign ═══ ═══ Syntax - somDefaultConstVAssign ═══ Method somDefaultConstVAssign SOMObject somDefaultConstVAssign (in som3AssignCtrl *ctrl, in SOMObject fromObj) A default assignment operator that uses a const volatile fromObj. ═══ somDefaultConstVAssign ═══ Syntax view IDL ═══ 13.11. somInit ═══ ═══ Syntax - somInit ═══ Method somInit void somInit () Obsolete but still supported. Override somDefaultInit instead of somInit. ═══ somInit ═══ Syntax view IDL ═══ 13.12. somFree ═══ ═══ Syntax - somFree ═══ Method somFree void somFree () Use as directed by framework implementations. ═══ somFree ═══ Syntax view IDL ═══ 13.13. somUninit ═══ ═══ Syntax - somUninit ═══ Method somUninit void somUninit () Obsolete but still supported. Override somDestruct instead of somUninit. ═══ somUninit ═══ Syntax view IDL ═══ 13.14. somGetClass ═══ ═══ Syntax - somGetClass ═══ Method somGetClass SOMClass somGetClass () Return the receiver's class. ═══ somGetClass ═══ Syntax view IDL ═══ 13.15. somGetClassName ═══ ═══ Syntax - somGetClassName ═══ Method somGetClassName string somGetClassName () Return the name of the receiver's class. ═══ somGetClassName ═══ Syntax view IDL ═══ 13.16. somGetSize ═══ ═══ Syntax - somGetSize ═══ Method somGetSize long somGetSize () Return the size of the receiver. ═══ somGetSize ═══ Syntax view IDL ═══ 13.17. somIsA ═══ ═══ Syntax - somIsA ═══ Method somIsA boolean somIsA (in SOMClass aClassObj) Returns 1 (true) if the receiver responds to methods introduced by , and 0 (false) otherwise. ═══ somIsA ═══ Syntax view IDL ═══ 13.18. somIsInstanceOf ═══ ═══ Syntax - somIsInstanceOf ═══ Method somIsInstanceOf boolean somIsInstanceOf (in SOMClass aClassObj) Returns 1 (true) if the receiver is an instance of and 0 (false) otherwise. ═══ somIsInstanceOf ═══ Syntax view IDL ═══ 13.19. somRespondsTo ═══ ═══ Syntax - somRespondsTo ═══ Method somRespondsTo boolean somRespondsTo (in somId mId) Returns 1 (true) if the indicated method can be invoked on the receiver and 0 (false) otherwise. ═══ somRespondsTo ═══ Syntax view IDL ═══ 13.20. somDispatch ═══ ═══ Syntax - somDispatch ═══ Method somDispatch boolean somDispatch (out somToken retValue, in somId methodId, in va_list ap) This method provides a generic, class-specific dispatch mechanism. It accepts as input a pointer to the memory area to be loaded with the result of dispatching the method indicated by using the arguments in . contains the object on which the method is to be invoked as the first argument. ═══ somDispatch ═══ Syntax view IDL ═══ 13.21. somClassDispatch ═══ ═══ Syntax - somClassDispatch ═══ Method somClassDispatch boolean somClassDispatch (in SOMClass clsObj, out somToken retValue, in somId methodId, in va_list ap) Like somDispatch, but method resolution for static methods is done according to the clsObj instance method table. ═══ somClassDispatch ═══ Syntax view IDL ═══ 13.22. somCastObj ═══ ═══ Syntax - somCastObj ═══ Method somCastObj boolean somCastObj (in SOMClass cls) cast the receiving object to cls (which must be an ancestor of the objects true class. Returns true on success. ═══ somCastObj ═══ Syntax view IDL ═══ 13.23. somResetObj ═══ ═══ Syntax - somResetObj ═══ Method somResetObj boolean somResetObj () reset an object to its true class. Returns true always. ═══ somResetObj ═══ Syntax view IDL ═══ 13.24. somDispatchV ═══ ═══ Syntax - somDispatchV ═══ Method somDispatchV void somDispatchV (in somId methodId, in somId descriptor, in va_list ap) Obsolete. Use somDispatch instead. ═══ somDispatchV ═══ Syntax view IDL ═══ 13.25. somDispatchL ═══ ═══ Syntax - somDispatchL ═══ Method somDispatchL long somDispatchL (in somId methodId, in somId descriptor, in va_list ap) Obsolete. Use somDispatch instead. ═══ somDispatchL ═══ Syntax view IDL ═══ 13.26. somDispatchA ═══ ═══ Syntax - somDispatchA ═══ Method somDispatchA void somDispatchA (in somId methodId, in somId descriptor, in va_list ap) Obsolete. Use somDispatch instead. ═══ somDispatchA ═══ Syntax view IDL ═══ 13.27. somDispatchD ═══ ═══ Syntax - somDispatchD ═══ Method somDispatchD double somDispatchD (in somId methodId, in somId descriptor, in va_list ap) Obsolete. Use somDispatch instead. ═══ somDispatchD ═══ Syntax view IDL ═══ 13.28. somPrintSelf ═══ ═══ Syntax - somPrintSelf ═══ Method somPrintSelf SOMObject somPrintSelf () Uses to write a brief string with identifying information about this object. The default implementation just gives the object's class name and its address in memory. is returned. ═══ somPrintSelf ═══ Syntax view IDL ═══ 13.29. somDumpSelf ═══ ═══ Syntax - somDumpSelf ═══ Method somDumpSelf void somDumpSelf (in long level) Uses to write a detailed description of this object and its current state. indicates the nesting level for describing compound objects it must be greater than or equal to zero. All lines in the description will be preceeded by <2*level> spaces. This routine only actually writes the data that concerns the object as a whole, such as class, and uses to describe the object's current state. This approach allows readable descriptions of compound objects to be constructed. Generally it is not necessary to override this method, if it is overriden it generally must be completely replaced. ═══ somDumpSelf ═══ Syntax view IDL ═══ 13.30. somDumpSelfInt ═══ ═══ Syntax - somDumpSelfInt ═══ Method somDumpSelfInt void somDumpSelfInt (in long level) Uses to write in the current state of this object. Generally this method will need to be overridden. When overriding it, begin by calling the parent class form of this method and then write in a description of your class's instance data. This will result in a description of all the object's instance data going from its root ancestor class to its specific class. ═══ somDumpSelfInt ═══ Syntax view IDL ═══ 14. Error Values and Descriptions. ═══ The exception handling routines is handled through the SOM ENVIRONMENT variable. Below is a snippet of code used to test errors. void check_error(Environment *ev) { string exceptName; ooxdbf_error *except; if (ev->_major != USER_EXCEPTION) return; except = (ooxdbf_error *) somExceptionValue(ev); printf("OOxBase Exception %d %s\n", except->ErrCode, except->Reason); SOMFree(except->Reason); exception_free(ev); } ┌────────┬───────────────────────────────────────────────────────┬────────────────────────────────┐ │ErrCode │Reason │Define │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │0 │okay │ │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │4 │warning │ │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1005 │File (%s) not found │open_no_file_found │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1010 │Error will opening file %d │open_no_handle │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1020 │Unable to read header. │open_bad_header │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1030 │Unable to allocate record memory │open_no_memory │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1040 │Unable to read file rc = %3.3d │open_cant_read_field │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1050 │Unable to read file rc = %3.3d │open_cant_read_after_field │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1100 │end of file │read_unexpected_eof │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1150 │top of file │read_prev_unexpected_tof │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1200 │Invalid record number │go_to_bad_record_number │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1250 │invalid record position │update_bad_record_number │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1300 │Record with duplicate key not written │find_no_index_defined │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1310 │record not found │find_record_not_found │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1320 │end of file │find_eof │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │4 │No records to index │warning │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1 │Method not available │1 │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1400 │tag not found │drop_tag_not_found │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1500 │Error will opening file %d │export_open_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1550 │Error will opening file %d │import_open_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1600 │Unknown field %s │sort_unknown_field_name │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1610 │Not Enough Memory For Summarizing or Sorting │sort_no_memory │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1620 │Can't Open Output/Sort DBF File %d │sort_open_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1630 │Can't Write To Sort DBF file │sort_write_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1630 │Internal File Processing Error │sort_read_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1620 │Error will opening file %d │sort_open_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │4 │No changes applied to database for definitions │warning │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1700 │Field name in use │addfld_field_name_already_in_use│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1700 │Field name in use │addfld_field_name_already_in_use│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1710 │Record size too large │addfld_record_size_too_large │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1770 │Unknown field │modifyfld_unknown_field │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1800 │Unable to read file rc = %3.3d │read_rec_read_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1900 │%f\0 │write_rec_duplicate_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │1950 │ Unable to write file rc = %3.3d │write_rec_unable_to_write │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2000 │Unable to reposition file rc = %3.3d │goto_rec_seek_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2100 │%f\0 │update_rec_duplicate_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2110 │ Unable to write file rc = %3.3d │update_rec_unable_to_write │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2200 │ Unable to write file rc = %3.3d │mark_eof_cant_write │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2300 │Unable to reposition file rc = %3.3d │read_db_header_reposition_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2310 │Unable to read header %d │read_db_header_read_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2400 │Unable to reposition file rc = %3.3d │update_db_header_reposition_erro│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2410 │Unable to write record. dos err = %d . │update_db_header_write_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2500 │%f\0 │pack_duplicate_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │2510 │ Unable to write file rc = %3.3d │pack_write_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5600 │%s │dbt_tclose_close_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5710 │error while writing to memo file, unexpected encounter │dbt_iv_pack_unexpected_marker_er│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5720 │error while writing to memo file, unexpected EOF │dbt_iv_pack_bad_read_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5730 │error while writing to memo file %2.2d │dbt_iv_pack_bad_marker_write_err│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5740 │error while writing to memo file %2.2d │dbt_iv_pack_bad_length_write_err│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5750 │error while writing to memo file %2.2d │dbt_iv_pack_bad_write_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5760 │error while writing to memo file %2.2d │dbt_iv_pack_bad_write_at_eof │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5770 │%s │dbt_iv_topen_bad_seek │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5780 │dbt_iv topen bad read %d │dbt_iv_topen_bad_read │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5800 │error while writing to memo file, unexpected encounter │dbt_iv_write_bad_marker_seek_err│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5810 │error while writing to memo file, unexpected EOF │dbt_iv_write_bad_marker_read_err│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5820 │error while writing to memo file %d │dbt_iv_write_bad_marker_write_er│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5830 │error while writing to memo file %d │dbt_iv_write_bad_length_write_er│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5840 │error while writing to memo file %d │dbt_iv_write_bad_write_error │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5850 │error while writing to memo file %d │ │ │ │ │dbt_iv_write_bad_next_stop_write│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5860 │error while writing to memo file %d │dbt_iv_write_bad_next_block_seek│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5870 │error while writing to memo file %d │dbt_iv_write_bad_next_block_writ│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5880 │error while writing to memo file %d │dbt_iv_write_bad_block_used_writ│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5890 │error while writing to memo file %d │dbt_iv_write_bad_last_used_write│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5900 │Cannot create unique temp filename │dbt_iv_bad_temp_file_create │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5910 │ │ dbt_iv_bad_build_file_create │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5200 │Invalid tag name │mdx_add_tag_invalid_tag_name │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5200 │Invalid tag name │mdx_add_tag_invalid_tag_name │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5200 │Invalid tag name │mdx_add_tag_invalid_tag_name │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5210 │Tag name already in use. │mdx_add_tag_tag_name_already_use│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5220 │Can't make memo field part of a key │mdx_create_index_memo_in_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5230 │Can't make logical field part of a key │mdx_create_index_logical_in_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5240 │Can't make float field part of a key │mdx_create_index_float_in_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5250 │Unknown field specified in key file define(%s) │mdx_create_index_unknown_field │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5260 │Key length too short │mdx_create_index_key_too_short │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5270 │Key length too long │mdx_create_index_key_too_long │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5290 │Unknown field specified in key file open (%s) │mdx_set_unknown_field │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5300 │Missing Node Indentifier │mdx_find_entry_no_key_yet │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5310 │Missing Node Indentifier │mdx_get_next_entry_no_node │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5320 │No previous record entry │mdx_get_next_entry_no_record │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5330 │No Previous Node │mdx_get_prev_entry_no_node │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5330 │No Previous Node │mdx_get_prev_entry_no_node │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5340 │No previous record number │mdx_get_prev_entry_no_record │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5520 │mdx │mdxfile_write_anchor_seek_failed│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5530 │Dos write anchor error %3.3d for MDX │mdxfile_write_anchor_write_faile│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5500 │Dos seek node error %3.3d for mdx file │mdxfile_write_node_seek_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5510 │Dos write node error %3.3d for mdx file │mdxfile_write_node_write_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5000 │Unknown field specified in key file open (%s) │ndx_set_unknown_field │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5010 │No key node yet │ndx_find_entry_no_key_defined │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5020 │Not enough memory for index sorting │ndx_reindex_not_enough_memory │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │0 │%*.*s │ndx_add_entry_duplicate │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │-1 │No key node yet │ndx_get_next_entry_no_node │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │-1 │No key node yet │ndx_get_next_entry_no_record │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │-1 │No previous key node yet │ndx_get_prev_entry_no_node │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │-1 │No previous key node yet │ndx_get_prev_entry_no_record │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │-1 │No previous record key yet │ndx_get_prev_entry_no_record │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5100 │Can't make memo field part of a key │ndx_create_index_memo_in_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5110 │Can't make logical field part of a key │ndx_create_index_logical_in_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5120 │Can't make float field part of a key │ndx_create_index_float_in_key │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5130 │Unknown field specified in key file define │ndx_create_index_unknown_field │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5140 │Key length too short │ndx_create_index_key_too_short │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5150 │Key length too long │ndx_create_index_key_too_long │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5160 │NDXFile Create failed │ndx_create_file_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5160 │NDXFile Create failed │ndx_create_file_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5400 │Dos open error %3.3d for file %s │ndxfile_mopen_open_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5410 │system rc = %d │ndxfile_mopen_create_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5420 │Dos seek anchor error %3.3d for file %s │ndxfile_write_anchor_seek_failed│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5430 │Dos write anchor error %3.3d for file %s │ndxfile_write_anchor_write_faile│ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5440 │Dos seek node error %3.3d for file %s │ndxfile_write_node_seek_failed │ ├────────┼───────────────────────────────────────────────────────┼────────────────────────────────┤ │5450 │Dos write node error %3.3d for file %s │ndxfile_write_node_write_failed │ └────────┴───────────────────────────────────────────────────────┴────────────────────────────────┘ ═══ 15. Sample Program ═══ The following two sections provide some sample code for C and C++ languages. ═══ 15.1. C examples ═══ The following sections provide some sample code for C language. ═══ 15.1.1. Reading, Writing, And Updating. ═══ #include "ooxfield.h" #include "ooxbase.h" #include #include main(int argc, char *argv[], char *envp[]) { ooxdbf database; Environment *ev = somGetGlobalEnvironment(); char here[64000]; char ch; int j, k, i; ooxfield afield; database = ooxdbfNew(); i = _Open(database, ev, argv[1]); printf("rc = %d\n", i); check_error(ev); /* if there is an index specified, use it */ if (argc == 3) { i = _use_index(database, ev, argv[2]); printf("rc = %d\n", i); check_error(ev); } /* endif */ /* dumps every field name and description in database */ printf("field count: %d\n", __get_field_count(database, ev)); for (i = 0; i < __get_field_count(database, ev); i++) { afield = _field(database, ev, i); printf(" field #%d: %s %c %d.%d\n", i, _get_name(afield, ev), _get_type(afield, ev), _get_length(afield, ev), _get_dec_point(afield, ev)); } puts(" "); /* dump every record in the database */ for (i = 1; i <= __get_record_count(database); i++) { printf("read %3d / %3d / %3d, rc = %d\n", i, __get_current_record(database, ev), __get_record_count(database, ev), _read(database, ev)); for (k = 0; k < __get_field_count(database, ev); k++) { afield = _field(database, ev, k); printf(" %s = %s\n", _get_name(afield, ev), _get_buffer(afield, ev)); strcpy(here, _get_buffer(afield, ev)); } check_error(ev); } for (i=1;i<10;i++) { char newvalue[10]; _go_to(database, , ev__get_record_count(database, ev)/i); afield = _field_by_name(database, ev, "score"); sprintf(newvalue, "%9.9d", i*6) _put(afield, ev, newvalue); _Write(database, ev); sprintf(newvalue, "%9.9d", i*60) _put(afield, ev, newvalue); _Update(database, ev); } /* endfor */ exit(0); } void check_error(Environment *ev) { string exceptName; ooxdbf_error *except; if (ev->_major != USER_EXCEPTION) return; except = (ooxdbf_error *) somExceptionValue(ev); printf("OOxBase Exception %s\n", except->Reason); SOMFree(except->Reason); exception_free(ev); } ═══ 15.1.2. Packing ═══ #include "ooxbase.h" #include #include main(int argc, char *argv[], char *envp[]) { int i; ooxdbf database = ooxdbfNew(ev); Environment *ev = somGetGlobalEnvironment(); i = _Open(database, ev, argv[1]); if (i) { printf("rc = %d\n", i); check_error(ev); exit(i); } /* endif */ if (argc == 3) { i = _attach_index(database, ev, argv[2]); if (i) { printf("rc = %d\n", i); check_error(ev); exit(i); } /* endif */ } /* endif */ i = _pack(database, ev); if (i) { printf("rc = %d\n", i); check_error(ev); exit(i); } /* endif */ _Close(database, ev); exit(0); } void check_error(Environment *ev) { string exceptName; ooxdbf_error *except; if (ev->_major != USER_EXCEPTION) return; except = (ooxdbf_error *) somExceptionValue(ev); printf("OOxBase Exception %s\n", except->Reason); SOMFree(except->Reason); exception_free(ev); } ═══ 15.1.3. Exporting ═══ Uses a semicolon ';' as the field delimiter #include "ooxbase.h" #include #include main(int argc, char *argv[], char *envp[]) { Environment *ev = somGetGlobalEnvironment(); ooxdbf database = ooxdbfNew(ev); _Open(database, ev, argv[1]); _export(database, ev,argv[2], ';'); _Close(database, ev); exit(0); } void check_error(Environment *ev) { string exceptName; ooxdbf_error *except; if (ev->_major != USER_EXCEPTION) return; except = (ooxdbf_error *) somExceptionValue(ev); printf("OOxBase Exception %s\n", except->Reason); SOMFree(except->Reason); exception_free(ev); } ═══ 15.1.4. Creating A Database ═══ #include "ooxbase.h" #include "ooxcharacter.h" #include "ooxdate.h" #include "ooxlogical.h" #include "ooxnumeric.h" #include "ooxmemo.h" #include #include main(int argc, char *argv[], char *envp[]) { ooxdbf database, newdbf; ooxfield newfld; int j, k, i; Environment *ev = somGetGlobalEnvironment(); database = ooxdbfNew_usingfilename(ev, argv[1]); newdbf = ooxdbfNew_defineDBFusing(ev, argv[2], database); newfld = ooxcharacterNew_define(ev, "Fld_", 25); _addfld(newdbf, ev, newfld); newfld = ooxdateNew_define(ev, "Fld_D"); _addfld(newdbf, ev, newfld); newfld = ooxlogicalNew_define(ev, "Fld_l"); _addfld(newdbf, ev, newfld); newfld = ooxnumericNew_define(ev, "Fld_N1",9,0); _addfld(newdbf, ev, newfld); newfld = ooxnumericNew_define(ev, "Fld_N2",10,2); _addfld(newdbf, ev, newfld); newfld = ooxmemoNew_define(ev, "Fld_Memo"); _addfld(newdbf, ev, newfld); _DBFdefined(newdbf, ev); exit(0); } void check_error(Environment *ev) { string exceptName; ooxdbf_error *except; if (ev->_major != USER_EXCEPTION) return; except = (ooxdbf_error *) somExceptionValue(ev); printf("OOxBase Exception %s\n", except->Reason); SOMFree(except->Reason); exception_free(ev); } ═══ 15.2. C++ examples ═══ The following sections provide some sample code for C++ language. ═══ 15.2.1. Reading, Writing, And Updating. ═══ #include "public\ooxbase.xh" #include "public\ooxfield.xh" #include void check_error(Environment *ev); main(int argc, char *argv[], char *envp[]) { int fldcnt, reccnt; ooxdbf *dbf; ooxfield *fld1; Environment *ev = somGetGlobalEnvironment(); dbf = new ooxdbf(ev, argv[1]); check_error(ev); for (fldcnt=0; fldcnt_get_field_count(ev); fldcnt++) { fld1 = dbf->field(ev, fldcnt); cout <<"Name is " <get_name(ev) <<" Type = " <get_type(ev) <<" Length = " <get_length(ev) <<" DecPoint = " <get_dec_point(ev) <_get_record_count(ev); reccnt++) { dbf->Read(ev); cout << "Record # " << reccnt << endl; for (fldcnt=0; fldcnt_get_field_count(ev); fldcnt++) { fld1 = dbf->field(ev, fldcnt); cout <<" " << fld1->get_name(ev) <<" = " <get(ev) <Close(ev); } void check_error(Environment *ev) { string exceptName; ooxdbf_error *except; if (ev->_major != USER_EXCEPTION) return; except = (ooxdbf_error *) somExceptionValue(ev); cout<<"OOxBase Exception "<Reason<Reason); exception_free(ev); }