You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
4.7 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: stlsoft/collections/util/collections.hpp
  3. *
  4. * Purpose: Collection types.
  5. *
  6. * Created: 10th January 2006
  7. * Updated: 10th August 2009
  8. *
  9. * Home: http://stlsoft.org/
  10. *
  11. * Copyright (c) 2007-2009, Matthew Wilson and Synesis Software
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions are met:
  16. *
  17. * - Redistributions of source code must retain the above copyright notice, this
  18. * list of conditions and the following disclaimer.
  19. * - Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  23. * any contributors may be used to endorse or promote products derived from
  24. * this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  30. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  31. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  32. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  33. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  35. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  36. * POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. * ////////////////////////////////////////////////////////////////////// */
  39. /** \file stlsoft/collections/util/collections.hpp
  40. *
  41. * \brief [C++ only] Definition of collection tag types
  42. * (\ref group__library__collections "Collections" Library).
  43. */
  44. #ifndef STLSOFT_INCL_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS
  45. #define STLSOFT_INCL_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS
  46. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  47. # define STLSOFT_VER_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS_MAJOR 2
  48. # define STLSOFT_VER_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS_MINOR 0
  49. # define STLSOFT_VER_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS_REVISION 2
  50. # define STLSOFT_VER_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS_EDIT 11
  51. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  52. /* /////////////////////////////////////////////////////////////////////////
  53. * Includes
  54. */
  55. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  56. # include <stlsoft/stlsoft.h>
  57. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  58. /* /////////////////////////////////////////////////////////////////////////
  59. * Namespace
  60. */
  61. #ifndef _STLSOFT_NO_NAMESPACE
  62. namespace stlsoft
  63. {
  64. #endif /* _STLSOFT_NO_NAMESPACE */
  65. /* ////////////////////////////////////////////////////////////////////// */
  66. /** \brief \weakgroup collections Collections
  67. * \brief STL-extension collections
  68. *
  69. * \ingroup group__library__collections
  70. */
  71. /** \brief \weakgroup pod_collections POD Collections
  72. * \brief Collections for manipulating POD types
  73. * \ingroup collections
  74. * @{
  75. */
  76. /* /////////////////////////////////////////////////////////////////////////
  77. * Collections
  78. */
  79. /** \brief Rootmost tag for a collection
  80. *
  81. * \ingroup group__library__collections
  82. */
  83. struct collection_tag
  84. {};
  85. /** \brief Indentifies a collection as being an STL collection: it has begin() and end()
  86. *
  87. * \ingroup group__library__collections
  88. */
  89. struct stl_collection_tag
  90. : public collection_tag
  91. {};
  92. #if 0
  93. template< ss_typename_param_k V
  94. , int R
  95. , int W
  96. , int C
  97. >
  98. struct collection
  99. : public collection_tag
  100. {
  101. public:
  102. enum { is_read = R };
  103. enum { is_write = W };
  104. enum { is_contiguous = C };
  105. typedef V value_type;
  106. };
  107. #endif /* 0 */
  108. ////////////////////////////////////////////////////////////////////////////
  109. /** \brief @} // end of group pod_collections
  110. *
  111. * \ingroup group__library__collections
  112. */
  113. ////////////////////////////////////////////////////////////////////////////
  114. // Unit-testing
  115. /* ////////////////////////////////////////////////////////////////////// */
  116. #ifndef _STLSOFT_NO_NAMESPACE
  117. } // namespace stlsoft
  118. #endif /* _STLSOFT_NO_NAMESPACE */
  119. /* ////////////////////////////////////////////////////////////////////// */
  120. #endif /* !STLSOFT_INCL_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS */
  121. /* ///////////////////////////// end of file //////////////////////////// */