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

# TranslationPictureManager.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 TRANSLATION_PICTURE_MANAGER_H_
    00026 #define TRANSLATION_PICTURE_MANAGER_H_
    00027
    00028 #include <Core/Container/HashMap.h>
    00029 #include <Core/Container/ArrayList.h>
    00030 #include <Translator/Picture/TranslationPicture.h>
    00031
    00032 namespace LampForMaya{
    00033
    00034 class TranslationTextureManager;
    00035
    00036 //------------------------------------------------------------------------------
    00037 /**
    00038  * 変換ピクチャマネージャ
    00039  */
    00040 class TranslationPictureManager{
    00041 public:
    00042     /**
    00043      * コンストラクタ
    00044      */
    00045     TranslationPictureManager();
    00046
    00047     /**
    00048      * デストラクタ
    00049      */
    00050     virtual ~TranslationPictureManager();
    00051
    00052     /**
    00053      * ピクチャの収集
    00054      * @return 成功すればtrue
    00055      */
    00056     virtual bool collectPictures(TranslationTextureManager* textureManager);
    00057
    00058     /**
    00059      * Lampへの変換
    00060      * @param scene 変換先シーン
    00061      * @return 成功すればtrue
    00062      */
    00063     virtual bool convertToLamp(Scene* scene);
    00064
    00065     /**
    00066      * クリア
    00067      * @return 削除したオブジェクト数
    00068      */
    00069     virtual int clear();
    00070
    00071     /**
    00072      * ピクチャ数の取得
    00073      * @return ピクチャ数
    00074      */
    00075     virtual int getCount(){ return array_.getCount(); }
    00076
    00077     /**
    00078      * ピクチャの取得
    00079      * @param index ピクチャのインデクス
    00080      * @return ピクチャ
    00081      */
    00082     virtual TranslationPicture* get(int index){ return array_.get(index); }
    00083
    00084     /**
    00085      * ピクチャの検索
    00086      * @param name 検索するピクチャ名
    00087      * @return ピクチャ
    00088      */
    00089     virtual TranslationPicture* search(String name){
    00090         return database_.get(name);
    00091     }
    00092
    00093 private:
    00094     // コピーコンストラクタの隠蔽
    00095     TranslationPictureManager(const TranslationPictureManager& copy);
    00096
    00097     // 代入コピーの隠蔽
    00098     void operator =(const TranslationPictureManager& copy);
    00099
    00100     // ピクチャデータベース
    00101     Lamp::HashMap<String, TranslationPicture*> database_;
    00102     // ピクチャ配列
    00103     ArrayList<TranslationPicture*> array_;
    00104
    00105 };
    00106
    00107 //------------------------------------------------------------------------------
    00108 } // End of namespace LampForMaya
    00109 #endif // End of TRANSLATION_PICTURE_MANAGER_H_
    00110 //------------------------------------------------------------------------------