tag.h

00001 #ifndef REBECCA_FRAMEWORK_TAG_H
00002 #define REBECCA_FRAMEWORK_TAG_H
00003 
00004 /*
00005  * RebeccaAIML, Artificial Intelligence Markup Language 
00006  * C++ api and engine.
00007  *
00008  * Copyright (C) 2005,2006,2007 Frank Hassanabad
00009  *
00010  * This file is part of RebeccaAIML.
00011  *
00012  * RebeccaAIML is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 3 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * RebeccaAIML is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00024  */
00025 
00026 /* Disable Windows VC 7.x warning about 
00027  * shared_ptr needing dll-interface and
00028  * about it ignoring the throw specification
00029  */
00030 #ifdef _WIN32
00031 #    pragma warning ( push )
00032 #    pragma warning( disable : 4251 )
00033 #    pragma warning( disable : 4290 )
00034 #endif
00035 
00036 //rebecca includes
00037 #include <rebecca/StringPimpl.h>
00038 #include <rebecca/exports.h>
00039 #include <rebecca/Exceptions.h>
00040 #include <rebecca/framework/GraphBuilderFramework.h>
00041 
00042 //To get the size_t for the deletions
00043 #include <cstddef>
00044 
00045 namespace rebecca
00046 {
00047 namespace framework
00048 {
00049 namespace impl
00050 {
00051 
00052 /*
00053  * Forward declerations
00054  */
00055 
00066 class TagImpl;
00067 
00076 class REBECCA_EXPORT Tag
00077 {
00078 
00079     public:
00080 
00090         Tag() 
00091             throw(InternalProgrammerErrorException &);
00092         
00117         virtual void addCharacters(const StringPimpl &characters) 
00118             throw(InternalProgrammerErrorException &);
00119 
00141         virtual void handleInnerTag(Tag *tag) 
00142             throw(InternalProgrammerErrorException &); 
00143 
00160         virtual void setAttribute(const StringPimpl &name, const StringPimpl &value) 
00161             throw(InternalProgrammerErrorException &);
00162         
00198         bool instanceOf(const char * const instance) const
00199             throw(InternalProgrammerErrorException &);
00200 
00223         void operator delete(void* p);
00224 
00225 
00250         void *operator new(size_t size);
00251 
00256         virtual ~Tag();
00257 
00258     protected:
00259 
00278         void addInstanceOf(const char * const instance) 
00279             throw(InternalProgrammerErrorException &);
00280 
00281     private:
00282 
00293         TagImpl *m_pimpl;
00294 
00303         Tag &operator=(const Tag &tag);
00304 
00314         Tag(const Tag& tag);
00315 };
00316 
00317 } //end of namespace impl
00318 
00319 //Expose just the class name to the framework namespace
00320 using rebecca::framework::impl::Tag;
00321 
00322 /* 
00323  * Expose the rebecca namespace to the framework namespace.
00324  * Since all the tags include this file, they will all
00325  * get the rebecca namespace also.
00326  */
00327 using namespace rebecca;
00328 
00329 } //end of namespace framework
00330 } //end of namespace rebecca
00331 
00332 #ifdef _WIN32
00333 #    pragma warning ( pop )
00334 #endif
00335 
00336 #endif

Generated on Mon Aug 27 12:26:48 2007 for RebeccaAIML by  doxygen 1.5.3