00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*- 00002 00003 // -- BEGIN LICENSE BLOCK ---------------------------------------------- 00004 // This file is part of FZIs ic_workspace. 00005 // 00006 // This program is free software licensed under the LGPL 00007 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3). 00008 // You can find a copy of this license in LICENSE folder in the top 00009 // directory of the source code. 00010 // 00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany 00012 // 00013 // -- END LICENSE BLOCK ------------------------------------------------ 00014 00015 //---------------------------------------------------------------------- 00022 //---------------------------------------------------------------------- 00023 #ifndef ICL_CORE_VECTOR_H_INCLUDED 00024 #define ICL_CORE_VECTOR_H_INCLUDED 00025 00026 #include <vector> 00027 00028 #include "icl_core/BaseTypes.h" 00029 #include "icl_core/TemplateHelper.h" 00030 00031 namespace icl_core { 00032 00033 // \todo Create a wrapper class (and/or additional RT-safe implementations). 00034 template <typename T> 00035 class Vector : public std::vector<T> 00036 { 00037 public: 00038 typedef typename std::vector<T>::size_type size_type; 00039 00040 Vector() : std::vector<T>() {} 00041 Vector(const Vector& c) : std::vector<T>(c) { } 00042 Vector(const std::vector<T>& c) : std::vector<T>(c) { } 00043 explicit Vector(size_type num, typename ConvertToRef<T>::ToConstRef val = DefaultConstruct<T>::C()) 00044 : std::vector<T>(num, val) 00045 { } 00046 template <typename input_iterator> 00047 Vector(input_iterator start, input_iterator end) : std::vector<T>(start, end) { } 00048 }; 00049 00050 typedef Vector<uint8_t> Unsigned8Vector; 00051 typedef Vector<uint16_t> Unsigned16Vector; 00052 typedef Vector<uint32_t> Unsigned32Vector; 00053 typedef Vector<uint64_t> Unsigned64Vector; 00054 typedef Vector<int8_t> Signed8Vector; 00055 typedef Vector<int16_t> Signed16Vector; 00056 typedef Vector<int32_t> Signed32Vector; 00057 typedef Vector<int64_t> Signed64Vector; 00058 typedef Vector<float> FloatVector; 00059 typedef Vector<double> DoubleVector; 00060 00061 } 00062 00063 #endif