Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C++ Class Library Definition - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

          Class Object


     Since Object is  an  abstract  class,  there are no data items of
     this type.  Since most data items are derived from  this abstract
     class,  however,  the  class  provides  a  basic   mechanism  and
     structure for  type checking and encapsulation.  The class Object
     provides a minimal set definition  for what a derived object must
     do.  An object must:

       1.  Return the class to which an object belongs.    The member
               function isA() does this.

       2.  Return a  character representation of the class name.  The
               member function nameOf() does this.

       3.  Display the contents of an object in a format suitable for
               that object. The member function printOn() does this.

       4.  Return  a  unique  key  based  on the object.  The  member
               function hashValue() does this.

       5.  Iterate through each part  which  makes  up an object. The
               member function forEach() does this.

       6.  Find  the  first  or  last  part  or  whole  object  which
               satisfies  a  given   condition.    The  member  functions
               firstThat() and lastThat() do this.

       7.  Determine whether the object is equal  to  another object.
               The member function isEqual() provides this capability.

       8.  Determine whether the object can be  sorted,  i.e. whether
               it  is  derived  from  the  class  Sortable.   The  member
               function isSortable() does this.

       9.  Determine whether the object is  part  of  an association,
               i.e. whether it is  derived  from  the  class Association.
               The member function isAssociation  does  this.

       10.  Construct, destroy, and copy on to another object.

       11.  Allocate a new object.

     The implementation of these functions is provided by each derived
     class; those  implementations  identify  that  class.  The  class
     Object has the following public members:

     Data members:
            ZERO

     Public member functions:
            isA
            nameOf
            hashValue
            isEqual
            isSortable
            isAssociation
            operator new
            forEach
            firstThat
            lastThat
            printOn

     The  parameters  to  each of these member functions are listed in
     the header file for  each  class.    The three functions forEach,
     firstThat,  and  lastThat  take a pointer  to  a  function  as  a
     parameter .

See Also: Association Sortable Error object.h

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson