From c9c481876d63c35c37ac395a1f9f5f4b1c385eea Mon Sep 17 00:00:00 2001 From: philipp schoenberger Date: Fri, 11 Sep 2015 11:07:26 +0200 Subject: [PATCH] doxygen vector class --- lwrserv/include/Vec.h | 85 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 13 deletions(-) diff --git a/lwrserv/include/Vec.h b/lwrserv/include/Vec.h index 8f73e4f..4253bf1 100644 --- a/lwrserv/include/Vec.h +++ b/lwrserv/include/Vec.h @@ -9,33 +9,58 @@ template class Vec; template class Mat; -// Vector class for SIMPLE data types +/** + * Vector class for class and simple data types + * template with type and size of the vector + * + * @author Philipp Schoenberger + * @copyright 2012 philipp schoenberger All rights reserved. + * @license This project is released under the GNU Public License. + */ template class Vec { public: - // standard constructor + /** + * standard constructor + */ Vec () - { // initialize all elements with zero + { + // initialize all elements with zero for (unsigned int i=0; i (const T tData) { for (unsigned int i=0; i (const T atData[SIZE]) { for (unsigned int i=0; i (const Vec &vec) { if (this==&vec) @@ -44,17 +69,30 @@ public: m_atData[i] = vec.m_atData[i]; } - // destructor + /** + * destructor which has nothing + */ ~Vec () - { // nothing to do here ... + { + // nothing to do here ... } + /** + * copy the values from the array to the Vector + * + * @param atData source array for the copy process + */ void setData (const T atData[SIZE]) { for (unsigned int i=0; i &operator = (const Vec &vec) { + /// check if the L and R values are the same + /// do nothing in this case if (this==&vec) - return (*this); // ok, it's me, so no L-value action - for (unsigned int i=0; i &operator = (const T atData[SIZE])