User.h

00001 #ifndef PIRCBOT_USER_H
00002 #define PIRCBOT_USER_H
00003 
00004 /*
00005  * pircbotcpp, C++ port of the pircbot Java version
00006  * A IRC C++ software development kit. An Object 
00007  * Oriented client framework which lets you 
00008  * write quick and easy C++ IRC bots
00009  *
00010  * Copyright (C) 2006 Frank Hassanabad 
00011  * http://pircbotcpp.sourceforge.net/
00012  *
00013  * Java version 
00014  * Copyright Paul James Mutton, 2001-2004, http://www.jibble.org/
00015  *
00016  * This library is free software; you can redistribute it and/or
00017  * modify it under the terms of the GNU General Public
00018  * License as published by the Free Software Foundation; either
00019  * version 2.1 of the License, or (at your option) any later version.
00020  *
00021  * This library is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024  * General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU General Public
00027  * License along with this library; if not, write to the Free Software
00028  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00029  */
00030 
00031 //pircbot includes
00032 //To get the PIRCBOT_EXPORT macro
00033 #include <pircbot/exports.h>
00034 #include <pircbot/Exceptions.h>
00035 
00036 /* Disable Windows VC 7.x warning about 
00037  * it ignoring the throw specification
00038  */
00039 #ifdef _WIN32
00040 #    pragma warning ( push )
00041 #    pragma warning( disable : 4290 )
00042 #endif
00043 
00044 namespace pircbot
00045 {
00046 namespace impl
00047 {
00048 
00049 //Forward declerations
00050 class UserImpl;
00051 
00061 class PIRCBOT_EXPORT User
00062 {
00063     
00064     public:
00065 
00070         User()
00071             throw(Exception &);
00072 
00079         User(const char * const prefix, const char * const nick)
00080             throw(Exception &);
00081 
00090         virtual const char * const getPrefix() const
00091             throw(Exception &);
00092 
00101         virtual bool isOp() const
00102             throw(Exception &);
00103 
00112         virtual bool hasVoice() const
00113             throw(Exception &);
00114 
00115 
00121         virtual const char * const getNick() const
00122             throw(Exception &);
00123 
00134         virtual const char * const toString() const
00135             throw(Exception &);
00136 
00146         bool operator==(const User &rhs) const;
00147 
00156         bool operator<(const User &rhs) const;
00157 
00158 
00167         bool operator>(const User &rhs) const;
00168 
00174         User &operator=(const User &rhs);
00175         
00182         User(const User &user);
00183         
00189         virtual ~User();
00190 
00213         void operator delete(void* p);
00214 
00239         void *operator new(unsigned int size);
00240 
00241     private:
00242 
00253         UserImpl *m_pimpl;
00254         friend class UserImpl;
00255 };
00256 
00257 } //end of impl namespace
00258 
00259 //expose PircBot to the pircbot namespace
00260 using pircbot::impl::User;
00261 
00262 } //end of pircbot namespace 
00263 
00264 #ifdef _WIN32
00265 #    pragma warning( disable : 4290 )
00266 #endif
00267 
00268 #endif
00269 

Generated on Sun Sep 3 16:43:20 2006 for pircbotcpp by  doxygen 1.4.5