Skip to content

Commit

Permalink
REfs #4024 another checkpoint
Browse files Browse the repository at this point in the history
MD tests pass thank god with latest nexus version
  • Loading branch information
Janik Zikovsky committed Nov 17, 2011
1 parent 95a82a3 commit 619fa5d
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 5 deletions.
9 changes: 6 additions & 3 deletions Code/Mantid/Framework/Kernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ set ( SRC_FILES
src/VMD.cpp
src/VectorHelper.cpp
src/VisibleWhenProperty.cpp
src/WriteBuffer.cpp
)

set ( SRC_UNITY_IGNORE_FILES src/Atom.cpp
Expand Down Expand Up @@ -182,11 +183,12 @@ set ( INC_FILES
inc/MantidKernel/V2D.h
inc/MantidKernel/V3D.h
inc/MantidKernel/VMD.h
inc/MantidKernel/ValidatorAnyList.h
inc/MantidKernel/ValidatorSignalChange.h
inc/MantidKernel/VectorHelper.h
inc/MantidKernel/VisibleWhenProperty.h
inc/MantidKernel/WriteBuffer.h
inc/MantidKernel/cow_ptr.h
inc/MantidKernel/ValidatorSignalChange.h
inc/MantidKernel/ValidatorAnyList.h
)

set ( TEST_FILES
Expand Down Expand Up @@ -260,10 +262,11 @@ set ( TEST_FILES
test/V2DTest.h
test/V3DTest.h
test/VMDTest.h
test/ValidatorAnyListTest.h
test/ValidatorSignalChangeTest.h
test/VectorHelperTest.h
test/VisibleWhenPropertyTest.h
test/ValidatorAnyListTest.h
test/WriteBufferTest.h
)

if(UNITY_BUILD)
Expand Down
52 changes: 52 additions & 0 deletions Code/Mantid/Framework/Kernel/inc/MantidKernel/WriteBuffer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#ifndef MANTID_KERNEL_WRITEBUFFER_H_
#define MANTID_KERNEL_WRITEBUFFER_H_

#include "MantidKernel/System.h"


namespace Mantid
{
namespace Kernel
{

/** Replacement of the DiskMRU class that holds
a "to-write" buffer and a list of free space blocks
in the file to write.
For use in file-backed MDEventWorkspaces.
@date 2011-11-17
Copyright © 2011 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
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 WriteBuffer
{
public:
WriteBuffer();
virtual ~WriteBuffer();

};


} // namespace Kernel
} // namespace Mantid

#endif /* MANTID_KERNEL_WRITEBUFFER_H_ */
29 changes: 29 additions & 0 deletions Code/Mantid/Framework/Kernel/src/WriteBuffer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "MantidKernel/WriteBuffer.h"
#include "MantidKernel/System.h"

using namespace Mantid::Kernel;

namespace Mantid
{
namespace Kernel
{


//----------------------------------------------------------------------------------------------
/** Constructor
*/
WriteBuffer::WriteBuffer()
{
}

//----------------------------------------------------------------------------------------------
/** Destructor
*/
WriteBuffer::~WriteBuffer()
{
}



} // namespace Mantid
} // namespace Kernel
32 changes: 32 additions & 0 deletions Code/Mantid/Framework/Kernel/test/WriteBufferTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#ifndef MANTID_KERNEL_WRITEBUFFERTEST_H_
#define MANTID_KERNEL_WRITEBUFFERTEST_H_

#include <cxxtest/TestSuite.h>
#include "MantidKernel/Timer.h"
#include "MantidKernel/System.h"
#include <iostream>
#include <iomanip>

#include "MantidKernel/WriteBuffer.h"

using namespace Mantid;
using namespace Mantid::Kernel;

class WriteBufferTest : public CxxTest::TestSuite
{
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static WriteBufferTest *createSuite() { return new WriteBufferTest(); }
static void destroySuite( WriteBufferTest *suite ) { delete suite; }


void test_Something()
{
}


};


#endif /* MANTID_KERNEL_WRITEBUFFERTEST_H_ */
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/MDEvents/src/MDBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ namespace MDEvents
this->m_dataBusy = false;
// If not using the MRU, then immediately save it back (if it changed)
// or clear memory if unchanged.
//if (!this->m_BoxController->useMRU())
// this->save();
if (!this->m_BoxController->useMRU())
this->save();
}
}

Expand Down

0 comments on commit 619fa5d

Please sign in to comment.