Commit 8ac02bf2 authored by incardon's avatar incardon
Browse files

Added documentation

parent dbfb2ecf
...@@ -688,6 +688,8 @@ public: ...@@ -688,6 +688,8 @@ public:
} }
/*! \brief Get an iterator over particles following the cell structure /*! \brief Get an iterator over particles following the cell structure
*
* \param vector containing the id of the domain cells
* *
* \return a particle iterator * \return a particle iterator
* *
......
...@@ -18,10 +18,7 @@ ...@@ -18,10 +18,7 @@
template<typename T, typename Mem, int pack_type=Pack_selector<T>::value > class Packer; template<typename T, typename Mem, int pack_type=Pack_selector<T>::value > class Packer;
template<typename T, typename Mem, int pack_type=Pack_selector<T>::value > class Unpacker; template<typename T, typename Mem, int pack_type=Pack_selector<T>::value > class Unpacker;
namespace openfpm #include "Vector/vector_def.hpp"
{
template<typename T, typename Memory=HeapMemory, typename layout=typename memory_traits_lin<T>::type, template<typename> class layout_base=memory_traits_lin , typename grow_p=grow_policy_double, unsigned int impl=vect_isel<T>::value> class vector;
}
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// FUNCTORS FOR ENCAP //////////////////////////////// //////////////////////////////// FUNCTORS FOR ENCAP ////////////////////////////////
......
...@@ -10,18 +10,45 @@ ...@@ -10,18 +10,45 @@
#include "util/common.hpp" #include "util/common.hpp"
/*! \brief pack/add function selector
*
* This in case of error
*
*/
template<bool,typename T, typename S> template<bool,typename T, typename S>
struct push_back_op_neste struct push_back_op_neste
{ {
static inline void push_back(/*std::vector<T> & base, const S & obj*/) /*! \brief push_back
*
* Print an error
*
* \param base vector where to push_back
* \param obj object to push
*
*/
static inline void push_back(std::vector<T> & base, const S & obj)
{ {
std::cerr << __FILE__ << ":" << __LINE__ << " error cannot push " << demangle(typeid(S).name()) << " into a vector of " << demangle(typeid(T).name()) << std::endl; std::cerr << __FILE__ << ":" << __LINE__ << " error cannot push " << demangle(typeid(S).name()) << " into a vector of " << demangle(typeid(T).name()) << std::endl;
} }
}; };
/*! \brief pack/add function selector
*
* This in case normally add an object
*
*/
template<typename T, typename S> template<typename T, typename S>
struct push_back_op_neste<true,T,S> struct push_back_op_neste<true,T,S>
{ {
/*! \brief Push_back on a vector
*
* Push on a vector an object
*
* \param base vector where to push_back
* \param obj object to push
*
*/
static inline void push_back(std::vector<T> & base, const S & obj) static inline void push_back(std::vector<T> & base, const S & obj)
{ {
base.push_back(T()); base.push_back(T());
...@@ -29,10 +56,24 @@ struct push_back_op_neste<true,T,S> ...@@ -29,10 +56,24 @@ struct push_back_op_neste<true,T,S>
} }
}; };
/*! \brief pack/add function selector
*
* In case of error
*
*/
template<bool,typename T, typename S> template<bool,typename T, typename S>
struct push_back_std_op_neste struct push_back_std_op_neste
{ {
static inline void push_back(/*std::vector<T> & base, const S & obj*/)
/*! \brief push_back
*
* Print an error
*
* \param base vector where to push_back
* \param obj object to push
*
*/
static inline void push_back(std::vector<T> & base, const S & obj)
{ {
std::cerr << __FILE__ << ":" << __LINE__ << " error cannot push " << demangle(typeid(S).name()) << " into a vector of " << demangle(typeid(T).name()) << std::endl; std::cerr << __FILE__ << ":" << __LINE__ << " error cannot push " << demangle(typeid(S).name()) << " into a vector of " << demangle(typeid(T).name()) << std::endl;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment