some fixes

This commit is contained in:
AndreaRigoni
2015-07-30 18:40:04 +02:00
parent dd13aa342f
commit d9de462dae
7 changed files with 35 additions and 31 deletions

View File

@@ -33,7 +33,7 @@ namespace uLib {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// RUNTIME CLASS FACTORY not jet usable... classes under development ! // RUNTIME CLASS FACTORY not usable yet... classes under development !
template < template <

View File

@@ -75,8 +75,7 @@ class SequenceCombiner {
}; };
}; };
typedef typename mpl::fold< typedef typename mpl::fold< typename mpl::zip_view< mpl::vector<Seq, ItrSeq > >::type,
typename mpl::zip_view< mpl::vector<Seq, ItrSeq > >::type,
StateSeq<>, StateSeq<>,
NextOp NextOp
>::type >::type
@@ -86,7 +85,8 @@ public:
typedef typename mpl::if_< boost::is_same< typename StateResult::state, int_<1> >, typedef typename mpl::if_< boost::is_same< typename StateResult::state, int_<1> >,
typename mpl::transform< Seq, mpl::end<_1> >::type, typename mpl::transform< Seq, mpl::end<_1> >::type,
typename StateResult::sequence >::type typename StateResult::sequence
>::type
next; next;
}; };

View File

@@ -169,7 +169,7 @@ class ProgrammableAccessor : public Named {
public: public:
ProgrammableAccessor() : Named("") {} ProgrammableAccessor() {}
ProgrammableAccessor(const char *name) : Named(name) {} ProgrammableAccessor(const char *name) : Named(name) {}
@@ -223,23 +223,23 @@ public:
} }
// ------ // // ------ //
/*
// struct Wrapper {
// Wrapper(const ProgrammableAccessor<D> *ac, void *ob) :
// m_access(ac), m_object(ob)
// { assert(ob != NULL); }
// template <typename T> struct Wrapper {
// inline T Get() const { return static_cast<T>(m_access->Get(m_object)); } Wrapper(const ProgrammableAccessor<D> *ac, void *ob) :
m_access(ac), m_object(ob)
{ assert(ob != NULL); }
// template <typename T> template <typename T>
// inline void Set(const T data) const { return m_access->Set(m_object,static_cast<T>(data)); } inline T Get() const { return static_cast<T>(m_access->Get(m_object)); }
template <typename T>
inline void Set(const T data) const { return m_access->Set(m_object,static_cast<T>(data)); }
void *m_object;
const ProgrammableAccessor<D> *m_access;
};
const Wrapper operator() (void *ob) const { return Wrapper(this,ob); }
// void *m_object;
// const ProgrammableAccessor<D> *m_access;
// };
// const Wrapper operator() (void *ob) const { return Wrapper(this,ob); }
*/
inline D Get(void *ob) const { return m_base->Get(ob); } inline D Get(void *ob) const { return m_base->Get(ob); }

View File

@@ -88,6 +88,7 @@ private:
}; };
} }

View File

@@ -30,8 +30,10 @@
#include "Math/Dense.h" #include "Math/Dense.h"
#include "Math/ContainerBox.h" #include "Math/ContainerBox.h"
#include "Math/StructuredData.h" //#include "Math/StructuredData.h"
#include "Math/ImageMap.h"
#include "Math/DataSet.h" #include "Math/DataSet.h"
#include "Math/VoxImage.h"
#include <iostream> #include <iostream>
@@ -53,7 +55,7 @@ int main() {
Data data; Data data;
VectorData<Data> vd; VoxImage<Data> vd;
vd.push_back(data); vd.push_back(data);
vd.push_back(Data()); vd.push_back(Data());
vd.push_back(Data()); vd.push_back(Data());
@@ -77,7 +79,7 @@ int main2() {
BEGIN_TESTING(Structured Data); BEGIN_TESTING(Structured Data);
{ // testing unmap function //////////////////////////////////////////////// { // testing unmap function ////////////////////////////////////////////////
StructuredData sdata(Vector3i(2,3,4)); ImageMap sdata(Vector3i(2,3,4));
for(int i=0; i < sdata.GetDims().prod() ; ++i) { for(int i=0; i < sdata.GetDims().prod() ; ++i) {
Vector3i d = sdata.UnMap(i); Vector3i d = sdata.UnMap(i);
std::cout << "TEST1( sdata.UnMap(" << i << ") == Vector3i(" std::cout << "TEST1( sdata.UnMap(" << i << ") == Vector3i("

View File

@@ -27,6 +27,7 @@
#include "testing-prototype.h" #include "testing-prototype.h"
#include "Math/VectorSpace.h"
#include "Math/ImageData.h" #include "Math/ImageData.h"
#include "Math/VoxImage.h" #include "Math/VoxImage.h"