Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Description.h

00001 /*
00002  * Description.h -- class interface for text descriptions
00003  * Copyright (C) 2002  Eric Lemings <elemings@users.sourceforge.net>
00004  *
00005  * This software is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This software is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this software; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00018  * 02111-1307, USA
00019  *
00020  * RCS: $Id: Description.h,v 1.2 2003/04/18 01:41:03 elemings Exp $
00021  */
00022 
00023 #ifdef __cplusplus
00024 
00025 #  ifndef OGS_CORE_DETAILS_DESCRIPTION_H
00026 #    define OGS_CORE_DETAILS_DESCRIPTION_H
00027 
00028 #    include <string>
00029 
00030 #    include <ogs/core/Detail.h>
00031 #    include <ogs/core/details/Namespace.h>
00032 
00033 OGS_BEGIN_CORE_DETAILS_NAMESPACE
00034 
00040 class Description: public Detail {
00041   public:
00045     enum Aspect {
00046       NAME,
00047       PERSONALITY,
00048       APPEARANCE,
00049       BACKGROUND
00050     };
00051 
00052     Description (Aspect aspect, const std::string& text);
00053 
00054     Aspect getAspect () const;
00055     std::string getText () const;
00056     void setText (const std::string& text);
00057 
00058   private:
00059     Aspect _aspect;
00060     std::string _text;
00061 };
00062 
00069 inline Description::Description (Aspect aspect, const std::string& text):
00070   _aspect (aspect), _text (text) { }
00071 
00077 inline Description::Aspect Description::getAspect () const {
00078   return (this->_aspect);
00079 }
00080 
00086 inline std::string Description::getText () const {
00087   return (this->_text);
00088 }
00089 
00095 inline void Description::setText (const std::string& text) {
00096   this->_text = text;
00097 }
00098 
00099 OGS_END_CORE_DETAILS_NAMESPACE
00100 
00101 #  endif /* !defined OGS_CORE_DETAILS_DESCRIPTION_H */
00102 
00103 #endif /* defined __cplusplus */
00104 

Generated on Sun Apr 20 03:36:17 2003 for Open Gaming System (OGS) by doxygen1.3