PixelLightAPI  .
EffectLoaderPL.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: EffectLoaderPL.h                               *
00003  *
00004  *  Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/)
00005  *
00006  *  This file is part of PixelLight.
00007  *
00008  *  PixelLight is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU Lesser General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  PixelLight is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  *  GNU Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public License
00019  *  along with PixelLight. If not, see <http://www.gnu.org/licenses/>.
00020 \*********************************************************/
00021 
00022 
00023 #ifndef __PLRENDERER_EFFECTLOADER_PL_H__
00024 #define __PLRENDERER_EFFECTLOADER_PL_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLRenderer/Effect/EffectLoader.h"
00032 
00033 
00034 //[-------------------------------------------------------]
00035 //[ Forward declarations                                  ]
00036 //[-------------------------------------------------------]
00037 namespace PLCore {
00038     class XmlElement;
00039 }
00040 
00041 
00042 //[-------------------------------------------------------]
00043 //[ Namespace                                             ]
00044 //[-------------------------------------------------------]
00045 namespace PLRenderer {
00046 
00047 
00048 //[-------------------------------------------------------]
00049 //[ Classes                                               ]
00050 //[-------------------------------------------------------]
00051 /**
00052 *  @brief
00053 *    Effect loader implementation for the PixelLight effect XML file format
00054 */
00055 class EffectLoaderPL : public EffectLoader {
00056 
00057 
00058     //[-------------------------------------------------------]
00059     //[ RTTI interface                                        ]
00060     //[-------------------------------------------------------]
00061     pl_class(PLRENDERER_RTTI_EXPORT, EffectLoaderPL, "PLRenderer", PLRenderer::EffectLoader, "Effect loader implementation for the PixelLight effect XML file format")
00062         // Properties
00063         pl_properties
00064             pl_property("Formats",  "plfx,PLFX")
00065             pl_property("Load",     "1")
00066             pl_property("Save",     "1")
00067         pl_properties_end
00068         // Constructors
00069         pl_constructor_0(DefaultConstructor,    "Default constructor",  "")
00070         // Methods
00071         pl_method_2(Load,   pl_ret_type(bool),  Effect&,        PLCore::File&,  "Load method",  "")
00072         pl_method_2(Save,   pl_ret_type(bool),  const Effect&,  PLCore::File&,  "Save method",  "")
00073     pl_class_end
00074 
00075 
00076     //[-------------------------------------------------------]
00077     //[ Public RTTI methods                                   ]
00078     //[-------------------------------------------------------]
00079     public:
00080         PLRENDERER_API bool Load(Effect &cEffect, PLCore::File &cFile);
00081         PLRENDERER_API bool Save(const Effect &cEffect, PLCore::File &cFile);
00082 
00083 
00084     //[-------------------------------------------------------]
00085     //[ Public functions                                      ]
00086     //[-------------------------------------------------------]
00087     public:
00088         /**
00089         *  @brief
00090         *    Default constructor
00091         */
00092         PLRENDERER_API EffectLoaderPL();
00093 
00094         /**
00095         *  @brief
00096         *    Destructor
00097         */
00098         PLRENDERER_API virtual ~EffectLoaderPL();
00099 
00100 
00101     //[-------------------------------------------------------]
00102     //[ Private functions                                     ]
00103     //[-------------------------------------------------------]
00104     private:
00105         /**
00106         *  @brief
00107         *    Loader implementation for format version 1
00108         *
00109         *  @param[in] cFX
00110         *    Effect to load into
00111         *  @param[in] cFXElement
00112         *    Effect XML element to read the data from
00113         *
00114         *  @return
00115         *    'true' if all went fine, else 'false'
00116         */
00117         bool LoadV1(Effect &cFX, const PLCore::XmlElement &cFXElement) const;
00118 
00119 
00120 };
00121 
00122 
00123 //[-------------------------------------------------------]
00124 //[ Namespace                                             ]
00125 //[-------------------------------------------------------]
00126 } // PLRenderer
00127 
00128 
00129 #endif // __PLRENDERER_EFFECTLOADER_PL_H__


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:08:52
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported