Containers

The following is a collection of containers that I have come to love. These containers were written to operate on different principles then the STL, as well as to support several features that I desired (dll boundary safety is a big one).

Classes:
  • CString
    • Replica of std::string
    • Handles NULL strings
    • Allows you to access NULL terminator
    • Embedded sprintf() support.

  • CVector
    • std::vector like interface
    • Fast erase()
    • Raw copy when shifting elements and on growth (no copy ctor and dtor calls)

  • SCVector
    • Sorted version of CVector
    • Does not have to be sorted
    • Allows sort via quicksort
    • Binary searches if sorted

  • VariantType
    • Can be any standard single element data type
    • Can be a CString
    • Pointers treated as references
    • Supports most math operations between data types
    • Auto upcasting when necessary
    • Can serialize data into a byte stream

  • NamedVaraintType
    • Named version of the above
    • Great for key value pairs