Commit fe386c95 authored by Lars Krecklau's avatar Lars Krecklau
Browse files

- Renamed the BasicController interface to BasicCreateController, because this...

- Renamed the BasicController interface to BasicCreateController, because this is actually what it does.
- Created a BasicUpdateController interface to generate controllers that apply an update to a certain class.
- The FileController now implements the Create and the Update controllers
- Cleaned the texture class a little bit.
parent 177f61b8
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University //
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_BASICCREATECONTROLLER_HH
#define ACGL_RESOURCE_BASICCREATECONTROLLER_HH
/*
* Base class for all controllers.
*
* Controllers can provide more flexible ways of creating objects, they are also
* making managers more flexibe.
*/
#include <tr1/memory>
#include <ACGL/ACGL.hh>
namespace ACGL{
namespace Resource{
template<typename RESOURCE>
class BasicCreateController
{
// ==================================================================================================== \/
// ========================================================================================== INTERFACE \/
// ==================================================================================================== \/
public:
virtual std::tr1::shared_ptr<RESOURCE> create(void) = 0;
};
} // Resource
} // ACGL
#endif // ACGL_RESOURCE_BASICCONTROLLER_HH
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University //
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_BASICUPDATECONTROLLER_HH
#define ACGL_RESOURCE_BASICUPDATECONTROLLER_HH
/*
* Base class for all controllers.
*
* Controllers can provide more flexible ways of creating objects, they are also
* making managers more flexibe.
*/
#include <tr1/memory>
#include <ACGL/ACGL.hh>
namespace ACGL{
namespace Resource{
template<typename RESOURCE>
class BasicUpdateController
{
// ==================================================================================================== \/
// ========================================================================================== INTERFACE \/
// ==================================================================================================== \/
public:
virtual bool update(std::tr1::shared_ptr<RESOURCE>&) = 0;
};
} // Resource
} // ACGL
#endif // ACGL_RESOURCE_BASICCONTROLLER_HH
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment