diff options
Diffstat (limited to 'include/cppunit')
| -rw-r--r-- | include/cppunit/Makefile.am | 2 | ||||
| -rw-r--r-- | include/cppunit/portability/CppUnitDeque.h | 28 | ||||
| -rw-r--r-- | include/cppunit/portability/CppUnitMap.h | 32 | ||||
| -rw-r--r-- | include/cppunit/portability/CppUnitVector.h | 28 | ||||
| -rw-r--r-- | include/cppunit/portability/Makefile.am | 6 |
5 files changed, 95 insertions, 1 deletions
diff --git a/include/cppunit/Makefile.am b/include/cppunit/Makefile.am index adca29f..796817c 100644 --- a/include/cppunit/Makefile.am +++ b/include/cppunit/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = extensions ui plugin config tools +SUBDIRS = extensions ui plugin config tools portability DISTCLEANFILES = config-auto.h diff --git a/include/cppunit/portability/CppUnitDeque.h b/include/cppunit/portability/CppUnitDeque.h new file mode 100644 index 0000000..781c43e --- /dev/null +++ b/include/cppunit/portability/CppUnitDeque.h @@ -0,0 +1,28 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITDEQUE_H +#define CPPUNIT_PORTABILITY_CPPUNITDEQUE_H + +// The technic used is similar to the wrapper of STLPort. + +#include <cppunit/Portability.h> +#include <deque> + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +CPPUNIT_NS_BEGIN + +template<class T> +class CppUnitDeque : public std::deque<T,CPPUNIT_STD_ALLOCATOR> +{ +public: +}; + +CPPUNIT_NS_END + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitDeque std::deque + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITDEQUE_H
\ No newline at end of file diff --git a/include/cppunit/portability/CppUnitMap.h b/include/cppunit/portability/CppUnitMap.h new file mode 100644 index 0000000..24df4a5 --- /dev/null +++ b/include/cppunit/portability/CppUnitMap.h @@ -0,0 +1,32 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITMAP_H +#define CPPUNIT_PORTABILITY_CPPUNITMAP_H + +// The technic used is similar to the wrapper of STLPort. + +#include <cppunit/Portability.h> +#include <functional> +#include <map> + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +CPPUNIT_NS_BEGIN + +template<class Key, class T> +class CppUnitMap : public std::map<Key + ,T + ,std::less<Key> + ,CPPUNIT_STD_ALLOCATOR> +{ +public: +}; + +CPPUNIT_NS_END + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitMap std::map + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITMAP_H
\ No newline at end of file diff --git a/include/cppunit/portability/CppUnitVector.h b/include/cppunit/portability/CppUnitVector.h new file mode 100644 index 0000000..f3157e6 --- /dev/null +++ b/include/cppunit/portability/CppUnitVector.h @@ -0,0 +1,28 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITVECTOR_H +#define CPPUNIT_PORTABILITY_CPPUNITVECTOR_H + +// The technic used is similar to the wrapper of STLPort. + +#include <cppunit/Portability.h> +#include <vector> + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +CPPUNIT_NS_BEGIN + +template<class T> +class CppUnitVector : public std::vector<T,CPPUNIT_STD_ALLOCATOR> +{ +public: +}; + +CPPUNIT_NS_END + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitVector std::vector + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITVECTOR_H
\ No newline at end of file diff --git a/include/cppunit/portability/Makefile.am b/include/cppunit/portability/Makefile.am new file mode 100644 index 0000000..c70aaf0 --- /dev/null +++ b/include/cppunit/portability/Makefile.am @@ -0,0 +1,6 @@ +libcppunitincludedir = $(includedir)/cppunit/portability + +libcppunitinclude_HEADERS = \ + CppUnitDeque.h \ + CppUnitVector.h \ + CppUnitMap.h |
