#pragma once

#include "Array.h"

namespace Framework
{
    class Model3DData; //! Model3D.h
    class Text;        //! Text.h
    class Model3D;     //! Model3D.h

    namespace Standart3DTypes
    {
        extern const char* cube; //! = "f_wuerfel"; The model data of a cube
                                 //! that is 100 * 100 * 100 in size
        extern const char* texturModel; //! = "f_wuerfel"; The model data of a
                                        //! cube that is 100 * 100 * 100 in size
    }; // namespace Standart3DTypes

    //! Manages all loaded model data so that multiple drawings can use
    //! the same data
    class Model3DList : public virtual ReferenceCounter
    {
    private:
        RCArray<Model3DData>* models;
        RCArray<Text>* names;

    public:
        //! Constructor
        DLLEXPORT Model3DList();
        //! Destructor
        DLLEXPORT ~Model3DList();
        //! Adds a model to the list
        //! \param mdl The model
        //! \param name The name under which the model is stored in the list
        DLLEXPORT bool addModel(Model3DData* mdl, const char* name);
        //! Removes a model from the list
        //! \param name The name of the model
        DLLEXPORT void removeModel(const char* name);
        //! Checks whether a model is stored under a specific name
        //! \param name The name \return true if a model with the name exists
        DLLEXPORT bool hasModel(const char* name) const;
        //! Returns a specific model
        //! \param name The name of the model
        DLLEXPORT Model3DData* getModel(const char* name) const;
        //! Returns a specific model without increased reference counter
        //! \param name The name of the model
        DLLEXPORT Model3DData* zModel(const char* name) const;
        //! remove All models
        DLLEXPORT void removeAll();
    };
} // namespace Framework