Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

bgobject.h

This is the verbatim text of the bgobject.h include file.
#ifndef __BGOOBJECT_H__
#define __BGOOBJECT_H__

/* $Id: bgobject.h,v 1.1 2000/02/18 09:04:17 dpfeifle Exp $ */

#include "bgclass.h"

/* Object class identifiers
 */
//const static long BGCID_OFFSET         = 471100;
//const static long BGCID_OBJECT         = BGCID_OFFSET + 1;
//const static long BGCID_BGSTRING       = BGCID_OBJECT + 1;
//const static long BGCID_BGSOCKET       = BGCID_BGSTRING + 1;
//const static long BGCID_BGSOCKET       = BGCID_BGSTRING + 1;
//const static long BGCID_BGLIST         = BGCID_BGSOCKET + 1;
//const static long BGCID_BGHASHTABLE    = BGCID_BGLIST + 1;

class BGString; // forward declaration needed for toString()

// ------------------------------------------------------------------
// Class: BGObject
// ------------------------------------------------------------------

class BGObject
{
public:

long
   cid                       ( );

virtual BGString
   toString                  ( ) = 0;

virtual unsigned long
   hash                      ( ) = 0 ;

virtual bool
   equals                    ( BGObject &obj ) = 0;

virtual BGString
   className                 ( ) = 0;
};

// ------------------------------------------------------------------
// Class: BGType
// ------------------------------------------------------------------

class BGType
   : public BGObject
{
public:
   
virtual int
   compare                   ( BGObject &obj ) = 0;

bool
   equals                    ( BGObject &obj ) {   if (this->cid()!=obj.cid()) return false;
                                                   return (this->compare(obj)==0) ? true : false;
                                                };
};

// ------------------------------------------------------------------
// Class: BGNumber
// ------------------------------------------------------------------

class BGNumber
   : public BGType
{
public:

virtual long
   longValue                 ( ) const = 0;
};

// ------------------------------------------------------------------
// Class: BGOctet
// ------------------------------------------------------------------

class BGOctet
   : public BGType
{
public:

virtual char*
   buffer                    ( ) const = 0;

virtual long
   length                    ( ) const = 0;
};

#endif

Generated at Fri Feb 18 10:57:07 2000 for bgclass by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999