Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created the cpp, h and test.h for SaveANSTO and added them to the list. The files contain a skeleton which allows the project to build but they'll not do anything
- Loading branch information
1 parent
17d8683
commit b922bc4
Showing
4 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveANSTO.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef MANTID_DATAHANDLING_SAVEANSTO_H_ | ||
#define MANTID_DATAHANDLING_SAVEANSTO_H_ | ||
|
||
//---------------------------------------------------------------------- | ||
// Includes | ||
//---------------------------------------------------------------------- | ||
#include "MantidAPI/Algorithm.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace DataHandling | ||
{ | ||
class DLLExport SaveANSTO : public API::Algorithm | ||
{ | ||
public: | ||
/// Default constructor | ||
SaveANSTO(); | ||
/// Destructor | ||
~SaveANSTO() {} | ||
/// Algorithm's name for identification overriding a virtual method | ||
virtual const std::string name() const { return "SaveANSTO"; } | ||
/// Algorithm's version for identification overriding a virtual method | ||
virtual int version() const { return 1; } | ||
/// Algorithm's category for identification overriding a virtual method | ||
virtual const std::string category() const { return "DataHandling\\Text"; } | ||
|
||
private: | ||
/// Sets documentation strings for this algorithm | ||
virtual void initDocs(); | ||
/// Overwrites Algorithm method. | ||
void init(); | ||
/// Overwrites Algorithm method | ||
void exec(); | ||
///static reference to the logger class | ||
static Kernel::Logger& g_log; | ||
|
||
/// Map the separator options to their string equivalents | ||
std::map<std::string,std::string> m_separatorIndex; | ||
}; | ||
|
||
} // namespace DataHandling | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_DATAHANDLING_SAVEANSTO_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/*WIKI* | ||
==== Limitations ==== | ||
*WIKI*/ | ||
//---------------------------------------------------------------------- | ||
// Includes | ||
//---------------------------------------------------------------------- | ||
#include "MantidDataHandling/SaveANSTO.h" | ||
#include "MantidKernel/UnitFactory.h" | ||
#include "MantidKernel/ArrayProperty.h" | ||
#include "MantidAPI/FileProperty.h" | ||
#include "MantidKernel/BoundedValidator.h" | ||
#include "MantidKernel/VisibleWhenProperty.h" | ||
#include "MantidKernel/ListValidator.h" | ||
#include <set> | ||
#include <fstream> | ||
#include <boost/tokenizer.hpp> | ||
#include <boost/regex.hpp> | ||
|
||
namespace Mantid | ||
{ | ||
namespace DataHandling | ||
{ | ||
// Register the algorithm into the algorithm factory | ||
DECLARE_ALGORITHM(SaveANSTO) | ||
|
||
/// Sets documentation strings for this algorithm | ||
void SaveANSTO::initDocs() | ||
{ | ||
this->setWikiSummary("Saves a 2D [[workspace]] to a comma separated ascii file. "); | ||
this->setOptionalMessage("Saves a 2D workspace to a ascii file."); | ||
} | ||
|
||
using namespace Kernel; | ||
using namespace API; | ||
|
||
// Initialise the logger | ||
Logger& SaveANSTO::g_log = Logger::get("SaveANSTO"); | ||
|
||
/// Empty constructor | ||
SaveANSTO::SaveANSTO() : m_separatorIndex() | ||
{ | ||
} | ||
|
||
/// Initialisation method. | ||
void SaveANSTO::init() | ||
{ | ||
} | ||
|
||
/** | ||
* Executes the algorithm. | ||
*/ | ||
void SaveANSTO::exec() | ||
{ | ||
} | ||
} // namespace DataHandling | ||
} // namespace Mantid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef SAVEANSTOTEST_H_ | ||
#define SAVEANSTOTEST_H_ | ||
|
||
#include <cxxtest/TestSuite.h> | ||
#include "MantidDataHandling/SaveANSTO.h" | ||
#include "MantidDataObjects/Workspace2D.h" | ||
#include "MantidAPI/FrameworkManager.h" | ||
#include <fstream> | ||
#include <Poco/File.h> | ||
|
||
using namespace Mantid::API; | ||
using namespace Mantid::DataHandling; | ||
using namespace Mantid::DataObjects; | ||
|
||
class SaveANSTOTest : public CxxTest::TestSuite | ||
{ | ||
|
||
public: | ||
|
||
static SaveANSTOTest *createSuite() { return new SaveANSTOTest(); } | ||
static void destroySuite(SaveANSTOTest *suite) { delete suite; } | ||
|
||
SaveANSTOTest() | ||
{ | ||
|
||
} | ||
~SaveANSTOTest() | ||
{ | ||
FrameworkManager::Instance().deleteWorkspace("SaveANSTOWS"); | ||
} | ||
|
||
void testExec() | ||
{ | ||
} | ||
}; | ||
|
||
|
||
#endif /*SAVEANSTOTEST_H_*/ |