Newer
Older
Russell Taylor
committed
#ifndef MANTID_KERNEL_ANALYSISDATASERVICE_H_
#define MANTID_KERNEL_ANALYSISDATASERVICE_H_
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "System.h"
#include "Workspace.h"
#include "Logger.h"
#include <string>
#include <map>
namespace Mantid
{
Russell Taylor
committed
namespace Kernel
{
/** @class AnalysisDataService AnalysisDataService.h Kernel/AnalysisDataService.h
The Analysis data service stores instances of the Workspace objects and
anything that derives from emplate class DynamicFactory<Mantid::Kernel::IAlgorithm>them. This is the primary data service that
the users will interact with either through writing scripts or directly
through the API. It is implemented as a singleton class.
This is the manager/owner of Workspace* when registered.
@author Russell Taylor, Tessella Support Services plc
@date 01/10/2007
Copyright © 2007 STFC Rutherford Appleton Laboratories
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
class DLLExport AnalysisDataService
// Returns the single instance of the service
static AnalysisDataService* Instance();
StatusCode add( const std::string& name, Workspace * space );
StatusCode remove(const std::string& name );
StatusCode retrieve(const std::string& name, Workspace *& space );
// Private constructors and destructor for singleton class
AnalysisDataService(const AnalysisDataService&);
// static Logger& g_log;
/// Pointer to the single instance
static AnalysisDataService* m_instance;
Russell Taylor
committed
/// Typedef for the map of the managed algorithms and their names
Russell Taylor
committed
/// The map holding the managed algorithms
Russell Taylor
committed
} // namespace Kernel
} // namespace Mantid
Russell Taylor
committed
#endif /*MANTID_KERNEL_ANALYSISDATASERVICE_H_*/