mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-06 07:21:31 +01:00
some fixes
This commit is contained in:
@@ -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 <
|
||||
|
||||
@@ -75,8 +75,7 @@ class SequenceCombiner {
|
||||
};
|
||||
};
|
||||
|
||||
typedef typename mpl::fold<
|
||||
typename mpl::zip_view< mpl::vector<Seq, ItrSeq > >::type,
|
||||
typedef typename mpl::fold< typename mpl::zip_view< mpl::vector<Seq, ItrSeq > >::type,
|
||||
StateSeq<>,
|
||||
NextOp
|
||||
>::type
|
||||
@@ -86,7 +85,8 @@ public:
|
||||
|
||||
typedef typename mpl::if_< boost::is_same< typename StateResult::state, int_<1> >,
|
||||
typename mpl::transform< Seq, mpl::end<_1> >::type,
|
||||
typename StateResult::sequence >::type
|
||||
typename StateResult::sequence
|
||||
>::type
|
||||
next;
|
||||
};
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ class ProgrammableAccessor : public Named {
|
||||
public:
|
||||
|
||||
|
||||
ProgrammableAccessor() : Named("") {}
|
||||
ProgrammableAccessor() {}
|
||||
|
||||
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>
|
||||
// inline T Get() const { return static_cast<T>(m_access->Get(m_object)); }
|
||||
struct Wrapper {
|
||||
Wrapper(const ProgrammableAccessor<D> *ac, void *ob) :
|
||||
m_access(ac), m_object(ob)
|
||||
{ assert(ob != NULL); }
|
||||
|
||||
// template <typename T>
|
||||
// inline void Set(const T data) const { return m_access->Set(m_object,static_cast<T>(data)); }
|
||||
template <typename T>
|
||||
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); }
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,10 @@
|
||||
|
||||
#include "Math/Dense.h"
|
||||
#include "Math/ContainerBox.h"
|
||||
#include "Math/StructuredData.h"
|
||||
//#include "Math/StructuredData.h"
|
||||
#include "Math/ImageMap.h"
|
||||
#include "Math/DataSet.h"
|
||||
#include "Math/VoxImage.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -53,7 +55,7 @@ int main() {
|
||||
|
||||
Data data;
|
||||
|
||||
VectorData<Data> vd;
|
||||
VoxImage<Data> vd;
|
||||
vd.push_back(data);
|
||||
vd.push_back(Data());
|
||||
vd.push_back(Data());
|
||||
@@ -77,7 +79,7 @@ int main2() {
|
||||
BEGIN_TESTING(Structured Data);
|
||||
|
||||
{ // testing unmap function ////////////////////////////////////////////////
|
||||
StructuredData sdata(Vector3i(2,3,4));
|
||||
ImageMap sdata(Vector3i(2,3,4));
|
||||
for(int i=0; i < sdata.GetDims().prod() ; ++i) {
|
||||
Vector3i d = sdata.UnMap(i);
|
||||
std::cout << "TEST1( sdata.UnMap(" << i << ") == Vector3i("
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
|
||||
#include "testing-prototype.h"
|
||||
#include "Math/VectorSpace.h"
|
||||
#include "Math/ImageData.h"
|
||||
#include "Math/VoxImage.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user