[51] | 1 | #ifndef _DTS_HH_INCLUDED_somcls
|
---|
| 2 | #define _DTS_HH_INCLUDED_somcls
|
---|
| 3 | /* Start Class SOMClass */
|
---|
| 4 |
|
---|
| 5 | // This file was generated by the IBM "DirectToSOM" emitter for C++ (V1.77)
|
---|
| 6 | // Generated at 05/01/95 01:53:19 EDT
|
---|
| 7 | // This is class: SOMClass
|
---|
| 8 | // Mangled class name: SOMClass
|
---|
| 9 | // SE: May 19/94
|
---|
| 10 |
|
---|
| 11 | #include <som.hh>
|
---|
| 12 |
|
---|
| 13 | #pragma SOMAsDefault(on)
|
---|
| 14 | class SOMClass;
|
---|
| 15 | #pragma SOMAsDefault(pop)
|
---|
| 16 | #pragma SOMAsDefault(on)
|
---|
| 17 | class SOMObject;
|
---|
| 18 | #pragma SOMAsDefault(pop)
|
---|
| 19 | #include <somobj.hh>
|
---|
| 20 | #pragma SOMNonDTS(on)
|
---|
| 21 |
|
---|
| 22 | #pragma SOMAsDefault(on)
|
---|
| 23 | class SOMClass : public SOMObject {
|
---|
| 24 |
|
---|
| 25 | //
|
---|
| 26 | // This is the SOM metaclass. That is, the instances of this class
|
---|
| 27 | // are class objects. When the SOM environment is created an instance
|
---|
| 28 | // of SOMClass is created and a pointer to it is placed in the external
|
---|
| 29 | // data location (SOMClassClassData.classObject). Bindings provide the
|
---|
| 30 | // macro _SOMClass for this expression. _SOMClass is unique in that it
|
---|
| 31 | // is its own class object. I.e., _SOMClass == _somGetClass(_SOMClass).
|
---|
| 32 | // SOMClass can be subclassed just like any SOM class. The subclasses
|
---|
| 33 | // of SOMClass are new metaclasses and can generate class objects with
|
---|
| 34 | // different implementations than those produced by _SOMClass.
|
---|
| 35 | //
|
---|
| 36 | // An important rule for metaclass programming is that no methods
|
---|
| 37 | // introduced by SOMClass should ever be overridden. While this
|
---|
| 38 | // limits the utility of metaclass programming in SOM, it guarantees
|
---|
| 39 | // that SOM will operate correctly. Special class frameworks may be
|
---|
| 40 | // available from IBM to alleviate this restriction.
|
---|
| 41 | //
|
---|
| 42 |
|
---|
| 43 | #pragma SOMClassName(*, "SOMClass")
|
---|
| 44 | #pragma SOMNoMangling(*)
|
---|
| 45 | #pragma SOMNonDTS(*)
|
---|
| 46 |
|
---|
| 47 | #pragma SOMClassVersion (SOMClass, 1, 4)
|
---|
| 48 | #pragma SOMCallstyle (oidl)
|
---|
| 49 | #pragma SOMAsDefault(off)
|
---|
| 50 | public :
|
---|
| 51 | typedef struct {
|
---|
| 52 | unsigned long _maximum;
|
---|
| 53 | unsigned long _length;
|
---|
| 54 | somToken *_buffer;
|
---|
| 55 | } _IDL_SEQUENCE_somToken;
|
---|
| 56 | typedef /* seq< 0> */ _IDL_SEQUENCE_somToken somTokenSequence;
|
---|
| 57 | typedef struct {
|
---|
| 58 | unsigned long _maximum;
|
---|
| 59 | unsigned long _length;
|
---|
| 60 | SOMClass **_buffer;
|
---|
| 61 | } _IDL_SEQUENCE_SOMClass;
|
---|
| 62 | typedef /* seq< 0> */ _IDL_SEQUENCE_SOMClass SOMClassSequence;
|
---|
| 63 |
|
---|
| 64 | // a structure to describe a class-related offset
|
---|
| 65 | typedef struct somOffsetInfo {
|
---|
| 66 | SOMClass* cls;
|
---|
| 67 | long offset;
|
---|
| 68 | } somOffsetInfo;
|
---|
| 69 | typedef struct {
|
---|
| 70 | unsigned long _maximum;
|
---|
| 71 | unsigned long _length;
|
---|
| 72 | somOffsetInfo *_buffer;
|
---|
| 73 | } _IDL_SEQUENCE_somOffsetInfo;
|
---|
| 74 | typedef /* seq< 0> */ _IDL_SEQUENCE_somOffsetInfo somOffsets;
|
---|
| 75 | typedef struct {
|
---|
| 76 | unsigned long _maximum;
|
---|
| 77 | unsigned long _length;
|
---|
| 78 | somId *_buffer;
|
---|
| 79 | } _IDL_SEQUENCE_somId;
|
---|
| 80 | typedef /* seq< 0> */ _IDL_SEQUENCE_somId somIdSequence;
|
---|
| 81 | somOffsets somInstanceDataOffsets;
|
---|
| 82 |
|
---|
| 83 | #pragma SOMAttribute(somInstanceDataOffsets, readonly, virtualaccessors, nodata)
|
---|
| 84 | #pragma SOMAsDefault(pop)
|
---|
| 85 |
|
---|
| 86 | // Uses SOMMalloc to allocate storage for a new instance of the
|
---|
| 87 | // receiving class, and then calls somRenewNoInitNoZero to load the
|
---|
| 88 | // new object's method table pointer. Then somDefaultInit is called to
|
---|
| 89 | // initialize the new object. Note: If the instance is a class object,
|
---|
| 90 | // somInitMIClass must then be invoked to declare parents and
|
---|
| 91 | // initialize the class's instance method table. Upon failure, NULL
|
---|
| 92 | // is returned.
|
---|
| 93 | virtual SOMObject* somNew();
|
---|
| 94 |
|
---|
| 95 | // Equivalent to somNew except that somDefaultInit is not called.
|
---|
| 96 | virtual SOMObject* somNewNoInit();
|
---|
| 97 |
|
---|
| 98 | // Equivalent to somNew except that storage is not allocated.
|
---|
| 99 | // <obj> is taken as the address of the new object.
|
---|
| 100 | virtual SOMObject* somRenew(void* obj);
|
---|
| 101 |
|
---|
| 102 | // Equivalent to somRenew except that somDefaultInit is not called.
|
---|
| 103 | virtual SOMObject* somRenewNoInit(void* obj);
|
---|
| 104 |
|
---|
| 105 | // Equivalent to somRenew except that memory is not zeroed out.
|
---|
| 106 | virtual SOMObject* somRenewNoZero(void* obj);
|
---|
| 107 |
|
---|
| 108 | // The purpose of this method is to load an object's method table.
|
---|
| 109 | // The SOM API requires that somRenewNoInitNoZero always be
|
---|
| 110 | // called when creating a new object whose metaclass is not SOMClass.
|
---|
| 111 | // This is because metaclasses must be guaranteed that they can use
|
---|
| 112 | // somRenewNoInitNoZero to track object creation if this is desired.
|
---|
| 113 | virtual SOMObject* somRenewNoInitNoZero(void* obj);
|
---|
| 114 |
|
---|
| 115 | string somAllocate(long size);
|
---|
| 116 |
|
---|
| 117 | // Allocates memory to hold an object and returns a pointer to this memory.
|
---|
| 118 | // This is a nonstatic method, and cannot be overridden. The default
|
---|
| 119 | // implementation calls SOMMalloc, but a class designer can specify a
|
---|
| 120 | // different implementation using the somallocate modifier in IDL. The
|
---|
| 121 | // allocator takes the same parameters as this method.
|
---|
| 122 |
|
---|
| 123 | void somDeallocate(string memptr);
|
---|
| 124 |
|
---|
| 125 | // Zeros out the method table pointer stored in the word pointed to by
|
---|
| 126 | // memptr, and then deallocates the block of memory pointed to by memptr.
|
---|
| 127 | // This is a nonstatic method and cannot be overridden. The default
|
---|
| 128 | // deallocator called is SOMFree, but a class designer can specify a
|
---|
| 129 | // different deallocator using the somdeallocate modifier in IDL. The
|
---|
| 130 | // deallocator takes the same parameters as this method.
|
---|
| 131 |
|
---|
| 132 | // Loads a structure used to control calls to initializers.
|
---|
| 133 | // Computed when first requested (using the somDirectedInitClasses
|
---|
| 134 | // attribute) and then cached.
|
---|
| 135 | virtual somBooleanVector somGetInstanceInitMask(somInitCtrl* ctrl);
|
---|
| 136 |
|
---|
| 137 | // Loads a structure used to control calls to somDestruct.
|
---|
| 138 | // Computed at the same time as somInstanceConstructionMask
|
---|
| 139 | virtual somBooleanVector somGetInstanceDestructionMask(somDestructCtrl* ctrl);
|
---|
| 140 |
|
---|
| 141 | // Loads a structure used to control calls to assignment ops.
|
---|
| 142 | // Computed at the same time as somInstanceConstructionMask
|
---|
| 143 | virtual somBooleanVector somGetInstanceAssignmentMask(somAssignCtrl* ctrl);
|
---|
| 144 |
|
---|
| 145 | // somInitClass is obsolete, and should no longer be used. The SOM 2.0
|
---|
| 146 | // kernel provides special handling for redispatch stubs in the case
|
---|
| 147 | // of SOM 1.0 classes, and use of this method is what tells the kernel
|
---|
| 148 | // that old-style redispatch stubs will be registered.
|
---|
| 149 | virtual void somInitClass(string className, SOMClass* parentClass,
|
---|
| 150 | long dataSize, long maxStaticMethods,
|
---|
| 151 | long majorVersion, long minorVersion);
|
---|
| 152 |
|
---|
| 153 | // somInitMIClass implements the second phase of dynamic class creation:
|
---|
| 154 | // inheritance of interface and possibly implementation (instance
|
---|
| 155 | // variables) by suitable initialization of <self> (a class object).
|
---|
| 156 | //
|
---|
| 157 | // For somInitMIClass, the inherit_vars argument controls whether abstract
|
---|
| 158 | // or implementation inheritance is used. Inherit_vars is a 32 bit
|
---|
| 159 | // bit-vector. Implementation is inherited from parent i iff the bit
|
---|
| 160 | // 1<<i is on, or i>=32.
|
---|
| 161 | // On a class-by-class basis, for each class ancestor, implementation
|
---|
| 162 | // inheritance always takes precidence over abstract inheritance. This is
|
---|
| 163 | // necessary to guarantee that procedures supporting parent method calls
|
---|
| 164 | // (available on non-abstract parents) are always supported by parent
|
---|
| 165 | // instance variables.
|
---|
| 166 | //
|
---|
| 167 | // <className> is a string containing the class name. A copy is made, so
|
---|
| 168 | // the string may be freed upon return to the caller if this is desired.
|
---|
| 169 | //
|
---|
| 170 | // <parentClasses> is a SOMClassSequence containing pointers to the
|
---|
| 171 | // parent classes. somInitMIClass makes a copy of this, so it may
|
---|
| 172 | // be freed upon return to the caller if this is desired.
|
---|
| 173 | //
|
---|
| 174 | // <dataSize> is the space needed for the instance variables
|
---|
| 175 | // introduced by this class.
|
---|
| 176 | //
|
---|
| 177 | // <dataAlignment> specifies the desired byte alignment for instance
|
---|
| 178 | // data introduced by this class. A value of 0 selects a system-wide default;
|
---|
| 179 | // any other argument is taken as the desired byte alignment multiple. Thus,
|
---|
| 180 | // for example, even if a byte multiple of 8 is needed for double precision
|
---|
| 181 | // values on a given system (so 8 is the default), a class whose instance data
|
---|
| 182 | // doesn't require this can indicate otherwise. If A is the next memory
|
---|
| 183 | // address available for holding instance data, the address that will be
|
---|
| 184 | // used is A + (A mod byte-alignment).
|
---|
| 185 | //
|
---|
| 186 | // <maxStaticMethods> is the maximum number of static methods that will be
|
---|
| 187 | // added to the initialized class using addStaticMethod.
|
---|
| 188 | //
|
---|
| 189 | // <majorVersion> indicates the major version number for this
|
---|
| 190 | // implementation of the class definition, and <minorVersion>
|
---|
| 191 | // indicates the minor version number.
|
---|
| 192 | virtual void somInitMIClass(long inherit_vars, string className,
|
---|
| 193 | SOMClassSequence* parentClasses,
|
---|
| 194 | long dataSize, long dataAlignment,
|
---|
| 195 | long maxStaticMethods, long majorVersion,
|
---|
| 196 | long minorVersion);
|
---|
| 197 |
|
---|
| 198 | // Adds the indicated method, creating and returning a new method token.
|
---|
| 199 | //
|
---|
| 200 | // <methodDescriptor> is the somId for an identifier that can be used
|
---|
| 201 | // to access signature information about the method from an interface
|
---|
| 202 | // repository.
|
---|
| 203 | //
|
---|
| 204 | // <method> is the actual method procedure for this method
|
---|
| 205 | //
|
---|
| 206 | // <redispatchStub> is a procedure with the same calling sequence as
|
---|
| 207 | // <method> that invokes somDispatch for the method.
|
---|
| 208 | //
|
---|
| 209 | // <applyStub> is a procedure used to support somApply.
|
---|
| 210 | virtual somMToken somAddStaticMethod(somId methodId, somId methodDescriptor,
|
---|
| 211 | somMethodPtr method,
|
---|
| 212 | somMethodPtr redispatchStub,
|
---|
| 213 | somMethodPtr applyStub);
|
---|
| 214 |
|
---|
| 215 | // Adds the indicated method to the class's name lookup list.
|
---|
| 216 | // If this happens to override a static method then this operation is
|
---|
| 217 | // equivalent to <somOverrideSMethod> and the <methodDescriptor> and
|
---|
| 218 | // <applyStub> arguments are ignored (the overridden method's values
|
---|
| 219 | // will be used).
|
---|
| 220 | //
|
---|
| 221 | // <methodDescriptor> is the somId of a string describing the calling
|
---|
| 222 | // sequence to this method as described in <somcGetNthMethodInfo>
|
---|
| 223 | // defined in the SOMObject class definition.
|
---|
| 224 | //
|
---|
| 225 | // <method> is the actual method procedure for this method
|
---|
| 226 | //
|
---|
| 227 | // <applyStub> is a procedure that takes a standard variable argument
|
---|
| 228 | // list data structure applies it to its target object by calling
|
---|
| 229 | // <method> with arguments derived from the data structure. Its
|
---|
| 230 | // calling sequence is the same as the calling sequence of the
|
---|
| 231 | // dispatch methods defined in SOMObject. This stub is used in the
|
---|
| 232 | // support of the dispatch methods used in some classes. In classes
|
---|
| 233 | // where the dispatch functions do not need such a function this
|
---|
| 234 | // parameter may be null.
|
---|
| 235 | virtual void somAddDynamicMethod(somId methodId, somId methodDescriptor,
|
---|
| 236 | somMethodPtr method, somMethodPtr applyStub);
|
---|
| 237 |
|
---|
| 238 | // This method can be used instead of <somAddStaticMethod> or
|
---|
| 239 | // <somAddDynamicMethod> when it is known that the class' parent
|
---|
| 240 | // class already supports this method. This call does not require the
|
---|
| 241 | // method descriptor and stub methods that the others do.
|
---|
| 242 | virtual void somOverrideSMethod(somId methodId, somMethodPtr method);
|
---|
| 243 |
|
---|
| 244 | // This method is invoked when all of the static initialization for
|
---|
| 245 | // the class has been finished. The default implementation simply
|
---|
| 246 | // registers the newly constructed class with the SOMClassMgr.
|
---|
| 247 | virtual void somClassReady();
|
---|
| 248 |
|
---|
| 249 | // Returns the apply stub associated with the specified method,
|
---|
| 250 | // if one exists; otherwise NULL is returned. This method is obsolete,
|
---|
| 251 | // and retained for binary compatability. In SOMr2, users never access
|
---|
| 252 | // apply stubs directly; The function somApply is used to invoke apply
|
---|
| 253 | // stubs. See somApply documentation for further information on apply
|
---|
| 254 | // stubs, and see somAddStaticMethod documentation for information
|
---|
| 255 | // on how apply stubs are registered by class implementations.
|
---|
| 256 | virtual somMethodPtr somGetApplyStub(somId methodId);
|
---|
| 257 | virtual somClassDataStructure* somGetClassData();
|
---|
| 258 |
|
---|
| 259 | // The class' pointer to the static <className>ClassData structure.
|
---|
| 260 | virtual void somSetClassData(somClassDataStructure* cds);
|
---|
| 261 |
|
---|
| 262 | // A pointer to the method table used by instances of this class. This
|
---|
| 263 | // method was misnamed; it should have been called somGetInstanceMtab.
|
---|
| 264 | virtual somMethodTab* somGetClassMtab();
|
---|
| 265 |
|
---|
| 266 | // Returns the offset of instance data introduced by the receiver in
|
---|
| 267 | // an instance of the receiver. This method is obsolete and not useful in
|
---|
| 268 | // multiple-inheritance situations. The attribute somInstanceDataOffsets
|
---|
| 269 | // replaces this method.
|
---|
| 270 | virtual long somGetInstanceOffset();
|
---|
| 271 |
|
---|
| 272 | // The size in bytes of the instance data introduced by the receiving
|
---|
| 273 | // class.
|
---|
| 274 | virtual long somGetInstancePartSize();
|
---|
| 275 |
|
---|
| 276 | // The total size of an instance of the receiving class.
|
---|
| 277 | virtual long somGetInstanceSize();
|
---|
| 278 |
|
---|
| 279 | // A data token that identifies the introduced portion of this class
|
---|
| 280 | // within itself or any derived class. This token can be subsequently
|
---|
| 281 | // passed to the run-time somDataResolve function to locate the instance
|
---|
| 282 | // data introduced by this class in any object derived from this class.
|
---|
| 283 | virtual somDToken somGetInstanceToken();
|
---|
| 284 |
|
---|
| 285 | // Returns a data token that for the data member at offset
|
---|
| 286 | // "memberOffset" within the introduced portion of the class identified
|
---|
| 287 | // by instanceToken. The instance token must have been obtained from a
|
---|
| 288 | // previous invocation of somGetInstanceToken. The returned member
|
---|
| 289 | // token can be subsequently passed to the run-time somDataResolve
|
---|
| 290 | // function to locate the data member.
|
---|
| 291 | virtual somDToken somGetMemberToken(long memberOffset, somDToken instanceToken);
|
---|
| 292 |
|
---|
| 293 | // Sets the fields in the method descriptor block, <md>, to
|
---|
| 294 | // information about the method. 1 (true) is returned if the method is
|
---|
| 295 | // supported by this object and 0 (false) otherwise. The id field in
|
---|
| 296 | // the method descriptor block will also be set to NULL.
|
---|
| 297 | virtual boolean somGetMethodData(somId methodId, somMethodData* md);
|
---|
| 298 |
|
---|
| 299 | // Returns a redispatch stub for the indicated method, if possible.
|
---|
| 300 | // If not possible (because a valid redispatch stub has not been
|
---|
| 301 | // registered, and there is insufficient information to dynamically
|
---|
| 302 | // construct one), then a NULL is returned.
|
---|
| 303 | virtual somMethodProc* somGetRdStub(somId methodId);
|
---|
| 304 |
|
---|
| 305 | // Returns the method descriptor for the indicated method. If
|
---|
| 306 | // this object does not support the indicated method then NULL is
|
---|
| 307 | // returned.
|
---|
| 308 | virtual somId somGetMethodDescriptor(somId methodId);
|
---|
| 309 |
|
---|
| 310 | // Returns the index for the specified method. (A number that may
|
---|
| 311 | // change if any methods are added or deleted to this class object or
|
---|
| 312 | // any of its ancestors). This number is the basis for other calls to
|
---|
| 313 | // get info about the method. Indexes start at 0. A -1 is returned if
|
---|
| 314 | // the method cannot be found.
|
---|
| 315 | virtual long somGetMethodIndex(somId id);
|
---|
| 316 |
|
---|
| 317 | // Returns the specified method's access token. This token can then
|
---|
| 318 | // be passed to method resolution routines, which use the token
|
---|
| 319 | // to select a method pointer from a method table.
|
---|
| 320 | virtual somMToken somGetMethodToken(somId methodId);
|
---|
| 321 |
|
---|
| 322 | // This object's class name as a NULL terminated string.
|
---|
| 323 | virtual string somGetName();
|
---|
| 324 |
|
---|
| 325 | // loads *md with the method data associated with the the nth method,
|
---|
| 326 | // or NULL if there is no such method. Returns true is successful;
|
---|
| 327 | // false otherwise.
|
---|
| 328 | virtual boolean somGetNthMethodData(long n, somMethodData* md);
|
---|
| 329 |
|
---|
| 330 | // Returns the id of the <n>th method if one exists and NULL
|
---|
| 331 | // otherwise.
|
---|
| 332 | //
|
---|
| 333 | // The ordering of the methods is unpredictable, but will not change
|
---|
| 334 | // unless some change is made to the class or one of its ancestor classes.
|
---|
| 335 | //
|
---|
| 336 | // See CORBA documentation for info on method descriptors.
|
---|
| 337 | virtual somId somGetNthMethodInfo(long n, somId* descriptor);
|
---|
| 338 |
|
---|
| 339 | // The number of methods currently supported by this class,
|
---|
| 340 | // including inherited methods (both static and dynamic).
|
---|
| 341 | virtual long somGetNumMethods();
|
---|
| 342 |
|
---|
| 343 | // The number of static methods that this class has. Can
|
---|
| 344 | // be used by a child class when initializing its method table.
|
---|
| 345 | virtual long somGetNumStaticMethods();
|
---|
| 346 |
|
---|
| 347 | // Returns the parent class of self (along its "left-hand" derivation
|
---|
| 348 | // path), if one exists and NULL otherwise.
|
---|
| 349 | virtual SOMClass* somGetParent();
|
---|
| 350 |
|
---|
| 351 | // The parent classes of self.
|
---|
| 352 | virtual SOMClassSequence somGetParents();
|
---|
| 353 |
|
---|
| 354 | // Returns a list of the method tables of this class's parent classes in the
|
---|
| 355 | // specific format required by somParentNumResolve (for making parent method
|
---|
| 356 | // calls. The first entry on the list is actually the method table of the
|
---|
| 357 | // receiving class. Because the CClassData structure contains this list, the
|
---|
| 358 | // method table for any class with a CClassData structure is statically
|
---|
| 359 | // available. This method now returns a list because older SI emitters load
|
---|
| 360 | // CClassData.parentMtab with the result of this call, and the new runtime
|
---|
| 361 | // requires a list of classes in that position.
|
---|
| 362 | virtual somMethodTabs somGetPClsMtab();
|
---|
| 363 |
|
---|
| 364 | // Returns a list of the method tables of this class's parent classes in the
|
---|
| 365 | // specific format required by somParentNumResolve (for making parent method
|
---|
| 366 | // calls. The first entry on the list is actually the method table of the
|
---|
| 367 | // receiving class. Because the CClassData structure contains this list, the
|
---|
| 368 | // method table for any class with a CClassData structure is statically
|
---|
| 369 | // available.
|
---|
| 370 | virtual somMethodTabs somGetPClsMtabs();
|
---|
| 371 |
|
---|
| 372 | // Returns the class' major and minor version numbers in the corresponding
|
---|
| 373 | // output parameters.
|
---|
| 374 | virtual void somGetVersionNumbers(long* majorVersion, long* minorVersion);
|
---|
| 375 |
|
---|
| 376 | // Sets the method descriptor given by <descriptor> for the method
|
---|
| 377 | // <methodId> into the method information kept by the receiving class.
|
---|
| 378 | // 1 (true) is returned if the method is supported by this object
|
---|
| 379 | // and 0 (false) otherwise.
|
---|
| 380 | virtual boolean somSetMethodDescriptor(somId methodId, somId descriptor);
|
---|
| 381 |
|
---|
| 382 | // Finds the method procedure associated with <methodId> for this
|
---|
| 383 | // class and sets <m> to it. 1 (true) is returned when the
|
---|
| 384 | // method procedure is a static method and 0 (false) is returned
|
---|
| 385 | // when the method procedure is dynamic method.
|
---|
| 386 | //
|
---|
| 387 | // If the class does not support the specified method then
|
---|
| 388 | // <m> is set to NULL and the return value is meaningless.
|
---|
| 389 | //
|
---|
| 390 | virtual boolean somFindMethod(somId methodId, somMethodPtr* m);
|
---|
| 391 |
|
---|
| 392 | // Just like <somFindMethod> except that if the method is not
|
---|
| 393 | // supported then an error is raised and execution is halted.
|
---|
| 394 | virtual boolean somFindMethodOk(somId methodId, somMethodPtr* m);
|
---|
| 395 |
|
---|
| 396 | // Finds the indicated method, which must be a static method supported
|
---|
| 397 | // by this class, and returns a pointer to its method procedure.
|
---|
| 398 | // If the method is not supported by the receiver (as a static method
|
---|
| 399 | // or at all) then a NULL pointer is returned.
|
---|
| 400 | virtual somMethodPtr somFindSMethod(somId methodId);
|
---|
| 401 |
|
---|
| 402 | // Uses <somFindSMethod>, and raises an error if the result is NULL.
|
---|
| 403 | virtual somMethodPtr somFindSMethodOk(somId methodId);
|
---|
| 404 |
|
---|
| 405 | // Like <somFindSMethodOK>, but without restriction to static methods.
|
---|
| 406 | virtual somMethodPtr somLookupMethod(somId methodId);
|
---|
| 407 |
|
---|
| 408 | // Returns 1 (true) if the implementation of this class is
|
---|
| 409 | // compatible with the specified major and minor version number and
|
---|
| 410 | // false (0) otherwise. An implementation is compatible with the
|
---|
| 411 | // specified version numbers if it has the same major version number
|
---|
| 412 | // and a minor version number that is equal to or greater than
|
---|
| 413 | // <minorVersion>. The major, minor version number pair (0,0) is
|
---|
| 414 | // considered to match any version. This method is usually called
|
---|
| 415 | // immediately after creating the class object to verify that a
|
---|
| 416 | // dynamically loaded class definition is compatible with a using
|
---|
| 417 | // application.
|
---|
| 418 | virtual boolean somCheckVersion(long majorVersion, long minorVersion);
|
---|
| 419 |
|
---|
| 420 | // Returns 1 (true) if <self> is a descendent class of <aClassObj> and
|
---|
| 421 | // 0 (false) otherwise. Note: a class object is considered to be
|
---|
| 422 | // descended itself for the purposes of this method.
|
---|
| 423 | virtual boolean somDescendedFrom(SOMClass* aClassObj);
|
---|
| 424 |
|
---|
| 425 | // Returns 1 (true) if the indicated method is supported by this
|
---|
| 426 | // class and 0 (false) otherwise.
|
---|
| 427 | virtual boolean somSupportsMethod(somId mId);
|
---|
| 428 |
|
---|
| 429 | // if the receiving class either introduces or overrides the
|
---|
| 430 | // indicated method, then its somMethodPtr is returned, otherwise
|
---|
| 431 | // NULL is returned.
|
---|
| 432 | virtual somMethodPtr somDefinedMethod(somMToken method);
|
---|
| 433 |
|
---|
| 434 | // Overrides the method table pointers to point to the redispatch stubs.
|
---|
| 435 | // All the methods except somDispatch methods are overriden.
|
---|
| 436 | virtual void somOverrideMtab();
|
---|
| 437 |
|
---|
| 438 | // The alignment required for the instance data structure
|
---|
| 439 | // introduced by the receiving class.
|
---|
| 440 | long somDataAlignment;
|
---|
| 441 |
|
---|
| 442 | #pragma SOMAttribute(somDataAlignment, readonly, virtualaccessors)
|
---|
| 443 |
|
---|
| 444 | // The ancestors whose initializers the receiving
|
---|
| 445 | // class wants to directly invoke.
|
---|
| 446 | SOMClassSequence somDirectInitClasses;
|
---|
| 447 |
|
---|
| 448 | #pragma SOMAttribute(somDirectInitClasses, virtualaccessors, noset)
|
---|
| 449 |
|
---|
| 450 | // The memory allocation routine used by somAllocate. Provided in this
|
---|
| 451 | // form to support array allocation.
|
---|
| 452 | somMethodProc *somClassAllocate;
|
---|
| 453 |
|
---|
| 454 | #pragma SOMAttribute(somClassAllocate, readonly, virtualaccessors)
|
---|
| 455 |
|
---|
| 456 | // The memory allocation routine called by somDeallocate. Provided in
|
---|
| 457 | // this form to support array deallocation.
|
---|
| 458 | somMethodProc *somClassDeallocate;
|
---|
| 459 |
|
---|
| 460 | #pragma SOMAttribute(somClassDeallocate, readonly, virtualaccessors)
|
---|
| 461 | #pragma SOMReleaseOrder ( \
|
---|
| 462 | "somNew", \
|
---|
| 463 | "somRenew", \
|
---|
| 464 | "somInitClass", \
|
---|
| 465 | "somClassReady", \
|
---|
| 466 | "somGetName", \
|
---|
| 467 | "somGetParent", \
|
---|
| 468 | "somDescendedFrom", \
|
---|
| 469 | "somCheckVersion", \
|
---|
| 470 | "somFindMethod", \
|
---|
| 471 | "somFindMethodOk", \
|
---|
| 472 | "somSupportsMethod", \
|
---|
| 473 | "somGetNumMethods", \
|
---|
| 474 | "somGetInstanceSize", \
|
---|
| 475 | "somGetInstanceOffset", \
|
---|
| 476 | "somGetInstancePartSize", \
|
---|
| 477 | "somGetMethodIndex", \
|
---|
| 478 | "somGetNumStaticMethods", \
|
---|
| 479 | "somGetPClsMtab", \
|
---|
| 480 | "somGetClassMtab", \
|
---|
| 481 | "somAddStaticMethod", \
|
---|
| 482 | "somOverrideSMethod", \
|
---|
| 483 | "somAddDynamicMethod", \
|
---|
| 484 | *, \
|
---|
| 485 | "somGetApplyStub", \
|
---|
| 486 | "somFindSMethod", \
|
---|
| 487 | "somFindSMethodOk", \
|
---|
| 488 | "somGetMethodDescriptor", \
|
---|
| 489 | "somGetNthMethodInfo", \
|
---|
| 490 | "somSetClassData", \
|
---|
| 491 | "somGetClassData", \
|
---|
| 492 | "somNewNoInit", \
|
---|
| 493 | "somRenewNoInit", \
|
---|
| 494 | "somGetInstanceToken", \
|
---|
| 495 | "somGetMemberToken", \
|
---|
| 496 | "somSetMethodDescriptor", \
|
---|
| 497 | "somGetMethodData", \
|
---|
| 498 | "somOverrideMtab", \
|
---|
| 499 | "somGetMethodToken", \
|
---|
| 500 | "somGetParents", \
|
---|
| 501 | "somGetPClsMtabs", \
|
---|
| 502 | "somInitMIClass", \
|
---|
| 503 | "somGetVersionNumbers", \
|
---|
| 504 | "somLookupMethod", \
|
---|
| 505 | "_get_somInstanceDataOffsets", \
|
---|
| 506 | "somRenewNoZero", \
|
---|
| 507 | "somRenewNoInitNoZero", \
|
---|
| 508 | "somAllocate", \
|
---|
| 509 | "somDeallocate", \
|
---|
| 510 | "somGetRdStub", \
|
---|
| 511 | "somGetNthMethodData", \
|
---|
| 512 | *, \
|
---|
| 513 | *, \
|
---|
| 514 | "_get_somDirectInitClasses", \
|
---|
| 515 | "_set_somDirectInitClasses", \
|
---|
| 516 | "somGetInstanceInitMask", \
|
---|
| 517 | "somGetInstanceDestructionMask", \
|
---|
| 518 | *, \
|
---|
| 519 | *, \
|
---|
| 520 | *, \
|
---|
| 521 | *, \
|
---|
| 522 | *, \
|
---|
| 523 | "somDefinedMethod", \
|
---|
| 524 | *, \
|
---|
| 525 | *, \
|
---|
| 526 | *, \
|
---|
| 527 | *, \
|
---|
| 528 | *, \
|
---|
| 529 | *, \
|
---|
| 530 | *, \
|
---|
| 531 | *, \
|
---|
| 532 | "_get_somDataAlignment", \
|
---|
| 533 | "somGetInstanceAssignmentMask", \
|
---|
| 534 | *, \
|
---|
| 535 | *, \
|
---|
| 536 | "_get_somClassAllocate", \
|
---|
| 537 | "_get_somClassDeallocate")
|
---|
| 538 | };
|
---|
| 539 | #pragma SOMAsDefault(pop)
|
---|
| 540 |
|
---|
| 541 | #pragma SOMNonDTS(pop)
|
---|
| 542 | /* End SOMClass */
|
---|
| 543 | #endif /* _DTS_HH_INCLUDED_somcls */
|
---|