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

UNEVT_ClassIdent.h

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

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