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

CountRenamer.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library 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 GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * カウントリネーマヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef COUNT_RENAMER_H_
00026 #define COUNT_RENAMER_H_
00027 
00028 #include <Core/Renamer/Renamer.h>
00029 
00030 namespace Lamp{
00031 
00032 //------------------------------------------------------------------------------
00033 /**
00034  * カウントリネーマ
00035  *
00036  * アンダーバーと番号を添えつけた名前にリネームします。
00037  */
00038 class CountRenamer : public Renamer{
00039 public:
00040     /**
00041      * コンストラクタ
00042      */
00043     CountRenamer();
00044 
00045     /**
00046      * コンストラクタ
00047      * @param count カウント
00048      */
00049     CountRenamer(u_int count);
00050 
00051     /**
00052      * デストラクタ
00053      */
00054     virtual ~CountRenamer();
00055 
00056     /**
00057      * リネーム
00058      * @param database データベース
00059      * @param sourceName 元となる名前
00060      * @return 重複していない名前
00061      */
00062     virtual String rename(Database* database, const String& sourceName);
00063 
00064     /**
00065      * カウントの設定
00066      * @param count 設定するカウント
00067      */
00068     virtual void setCount(u_int count){ count_ = count; }
00069 
00070     /**
00071      * カウントの取得
00072      * @return カウント
00073      */
00074     virtual u_int getCount() const{ return count_; }
00075 
00076 private:
00077     // カウント
00078     u_int count_;
00079 
00080 };
00081 
00082 //------------------------------------------------------------------------------
00083 } // End of namespace Lamp
00084 #endif // End of COUNT_RENAMER_H_
00085 //------------------------------------------------------------------------------
00086 

Generated on Wed Mar 16 10:29:29 2005 for Lamp by doxygen 1.3.2