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 2014 FZI Forschungszentrum Informatik, Karlsruhe, Germany 00012 // 00013 // -- END LICENSE BLOCK ------------------------------------------------ 00014 00015 //---------------------------------------------------------------------- 00022 //---------------------------------------------------------------------- 00023 #ifndef ICL_CORE_LIST_H_INCLUDED 00024 #define ICL_CORE_LIST_H_INCLUDED 00025 00026 #include <list> 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 List : public std::list<T> 00036 { 00037 public: 00038 typedef typename std::list<T>::size_type size_type; 00039 00040 List() : std::list<T>() { } 00041 List(const List& c) : std::list<T>(c) { } 00042 List(const std::list<T>& c) : std::list<T>(c) { } 00043 explicit List(size_type num, typename ConvertToRef<T>::ToConstRef val = DefaultConstruct<T>::C()) 00044 : std::list<T>(num, val) 00045 { } 00046 template <typename TInputIterator> 00047 List(TInputIterator start, TInputIterator end) : std::list<T>(start, end) { } 00048 }; 00049 00050 typedef List<uint8_t> Unsigned8List; 00051 typedef List<uint16_t> Unsigned16List; 00052 typedef List<uint32_t> Unsigned32List; 00053 typedef List<uint64_t> Unsigned64List; 00054 typedef List<int8_t> Signed8List; 00055 typedef List<int16_t> Signed16List; 00056 typedef List<int32_t> Signed32List; 00057 typedef List<int64_t> Signed64List; 00058 typedef List<float> FloatList; 00059 typedef List<double> DoubleList; 00060 00061 } 00062 00063 #endif