Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

NET_ClassIdent.h

00001 #ifndef _NET_NET_ClassIdent_H_  // -*-c++-*-
00002 
00003 #ifdef __GNUG__
00004 #  pragma interface
00005 #endif
00006 
00007 /*
00008  * Copyright 1991-2002 Eric M. Hopper <hopper@omnifarious.org>
00009  * 
00010  *     This program is free software; you can redistribute it and/or modify it
00011  *     under the terms of the GNU Lesser General Public License as published
00012  *     by the Free Software Foundation; either version 2 of the License, or
00013  *     (at your option) any later version.
00014  * 
00015  *     This program is distributed in the hope that it will be useful, but
00016  *     WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *     Lesser General Public License for more details.
00019  * 
00020  *     You should have received a copy of the GNU Lesser General Public
00021  *     License along with this program; if not, write to the Free Software
00022  *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00023  */
00024 
00025 /* $Header: /home/hopper/src/cvs/C++/EHnet++/EHnet++/NET_ClassIdent.h,v 1.4 2002/08/29 00:58:04 hopper Exp $ */
00026 
00027 // For a log, see ../ChangeLog
00028 //
00029 // Revision 1.1  1996/02/12 03:01:54  hopper
00030 // Added links to my ClassIdent system.
00031 //
00032 
00033 #include <LCore/HopClTypes.h>
00034 
00035 #define _NET_NET_ClassIdent_H_
00036 
00037 namespace strmod {
00038 namespace ehnet {
00039 
00040 class NET_ClassIdent : public lcore::EH_ClassIdent {
00041  private:
00042    typedef lcore::ClassIdent ClassIdent;
00043    typedef lcore::U4Byte U4Byte;
00044    typedef lcore::EH_ClassNum EH_ClassNum;
00045  protected:
00046    inline virtual const ClassIdent *i_GetIdent() const;
00047 
00048  public:
00049    static const NET_ClassIdent identifier;
00050 
00051    inline NET_ClassIdent(U4Byte cnum);
00052 
00053    inline virtual int AreYouA(const ClassIdent &cid) const;
00054 };
00055 
00056 //---------------------------inline functions--------------------------------
00057 
00058 inline NET_ClassIdent::NET_ClassIdent(U4Byte cnum) :
00059      EH_ClassIdent(EH_ClassNum(EH_ClassNum::Net, cnum))
00060 {
00061 }
00062 
00063 inline const lcore::ClassIdent *NET_ClassIdent::i_GetIdent() const
00064 {
00065    return(&identifier);
00066 }
00067 
00068 inline int NET_ClassIdent::AreYouA(const ClassIdent &cid) const
00069 {
00070    return((identifier == cid) || EH_ClassIdent::AreYouA(cid));
00071 }
00072 
00073 } // end namespace ehnet
00074 } // end namespace strmod
00075 
00076 #endif

Generated on Wed Jan 29 00:32:44 2003 for libNet by doxygen1.3-rc1