Library of Assembled Shared Sources
|
lass extensions to the standard library
This namespace contains extensions to the standard library (std
namespace), provided by the lass library. In contrary to the rest of the lass
library, these extensions will follow the codestyle of the standard library and boost
.
Although these are extensions to the standard library, we've choosen to not incorporate these in the std
namespace. This to avoid conflicts with whatever is inside that std
namespace (boost
has its own namespace too).
And yes, stde
stands for standard extensions
These are the extensions we offer:
std::pair
and STL containers.std::basic_string
functionaly.next
and prior
.Data Structures | |
class | access_iterator_t |
iterator adaptor to access members. More... | |
struct | deletor_array_t |
functor to delete array argument More... | |
struct | deletor_t |
functor to delete object argument More... | |
class | index_iterator_t |
iterator adaptor to access members. More... | |
class | iterator_range |
iterator range. More... | |
class | lass_allocator |
an adaptor to use an lass::util Allocator as a replacement for std::allocator More... | |
class | lock_free_queue |
Non-blocking, lock-free FIFO data structure. More... | |
struct | select_1st |
selects first element of std::pair or stde::triple and applies supplied operator on it More... | |
struct | select_2nd |
selects second element of std::pair or stde::triple and applies supplied operator on it More... | |
struct | select_3rd |
selects second element of std::pair or stde::triple and applies supplied operator on it More... | |
class | slist |
a single linked list, just like the one in SGI STL (and STLport ...) More... | |
class | static_vector |
it looks like a vector, it smells like a vector, but it only uses a fixed amout of memory More... | |
class | triple |
extension of std::pair to three values, trait three values as a single unit. More... | |
class | vector_map |
a map-like container built on a sorted vector (write-rarely, read-many) More... | |
Functions | |
template<class InputIterator, class Size, class OutputIterator> | |
OutputIterator | copy_n (InputIterator first, Size count, OutputIterator result) |
copy count elements from sequence starting at first to sequence starting at result | |
template<class InputIterator, class OutputIterator, class Size> | |
OutputIterator | repeat (InputIterator first, InputIterator last, OutputIterator output, Size n) |
copy sequence first to last n times to sequence starting at output | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | tolower (const std::basic_string< Char, Traits, Alloc > &input, const std::locale &locale) |
convert std::basic_string to lower case by using user locale | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | toupper (const std::basic_string< Char, Traits, Alloc > &input, const std::locale &locale) |
convert std::basic_string to upper case by using user locale | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | replace_all (const std::basic_string< Char, Traits, Alloc > &input, const std::basic_string< Char, Traits, Alloc > &to_be_replaced, const std::basic_string< Char, Traits, Alloc > &replacement) |
replace all instances of to_be_replaced in input by replacement. | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | replace_all (const std::basic_string< Char, Traits, Alloc > &input, const Char *to_be_replaced, const Char *replacement) |
replace all instances of to_be_replaced in input by replacement. | |
template<typename Char, typename Traits, typename Alloc> | |
bool | begins_with (const std::basic_string< Char, Traits, Alloc > &input, const std::basic_string< Char, Traits, Alloc > &prefix) |
returns true if input begins with the input prefix | |
template<typename Char, typename Traits, typename Alloc> | |
bool | begins_with (const std::basic_string< Char, Traits, Alloc > &input, const Char *prefix) |
returns true if input begins with the input prefix | |
template<typename Char, typename Traits, typename Alloc> | |
bool | begins_with (const std::basic_string< Char, Traits, Alloc > &input, Char prefix) |
returns true if input begins with the input prefix | |
template<typename Char, typename Traits, typename Alloc> | |
bool | ends_with (const std::basic_string< Char, Traits, Alloc > &input, const std::basic_string< Char, Traits, Alloc > &suffix) |
returns true if input ends with the input suffix | |
template<typename Char, typename Traits, typename Alloc> | |
bool | ends_with (const std::basic_string< Char, Traits, Alloc > &input, const Char *suffix) |
returns true if input ends with the input suffix | |
template<typename Char, typename Traits, typename Alloc> | |
bool | ends_with (const std::basic_string< Char, Traits, Alloc > &input, Char suffix) |
returns true if input ends with the input suffix | |
template<typename Char, typename Traits, typename Alloc> | |
std::vector< std::basic_string< Char, Traits, Alloc > > | split (const std::basic_string< Char, Traits, Alloc > &to_be_split) |
Reflects the Python function split without seperator argument. | |
template<typename Char, typename Traits, typename Alloc> | |
std::vector< std::basic_string< Char, Traits, Alloc > > | split (const std::basic_string< Char, Traits, Alloc > &to_be_split, const std::basic_string< Char, Traits, Alloc > &seperator, size_t max_split) |
Reflects the Python function split without seperator argument. | |
template<typename Char, typename Traits, typename Alloc> | |
std::vector< std::basic_string< Char, Traits, Alloc > > | split (const std::basic_string< Char, Traits, Alloc > &to_be_split, const Char *seperator, size_t max_split) |
Reflects the Python function split without seperator argument. | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | lstrip (const std::basic_string< Char, Traits, Alloc > &to_be_stripped, const std::basic_string< Char, Traits, Alloc > &to_be_removed) |
Return a copy of the string to_be_stripped with leading characters removed. | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | lstrip (const std::basic_string< Char, Traits, Alloc > &to_be_stripped) |
Return a copy of the string to_be_stripped with leading whitespace removed. | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | rstrip (const std::basic_string< Char, Traits, Alloc > &to_be_stripped, const std::basic_string< Char, Traits, Alloc > &to_be_removed) |
Return a copy of the string to_be_stripped with trailing characters removed. | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | rstrip (const std::basic_string< Char, Traits, Alloc > &to_be_stripped) |
Return a copy of the string to_be_stripped with trailing whitespace removed. | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | strip (const std::basic_string< Char, Traits, Alloc > &to_be_stripped, const std::basic_string< Char, Traits, Alloc > &to_be_removed) |
Return a copy of the string to_be_stripped with both leading and trailing characters removed. | |
template<typename Char, typename Traits, typename Alloc> | |
std::basic_string< Char, Traits, Alloc > | strip (const std::basic_string< Char, Traits, Alloc > &to_be_stripped) |
Return a copy of the string to_be_stripped with leading and trailing whitespace removed. | |
template<typename InputRange, typename Op> | |
Op | for_each_r (InputRange &range, Op op) |
std::for_each wrapper for ranges | |
template<typename InputRange, typename T> | |
InputRange::iterator | find_r (const InputRange &range, const T &value) |
std::find wrapper for ranges | |
template<typename InputRange, typename Predicate> | |
InputRange::iterator | find_if_r (const InputRange &range, Predicate pred) |
std::find_if wrapper for ranges | |
template<typename ForwardRange1, typename ForwardRange2> | |
ForwardRange1::iterator | find_end_r (const ForwardRange1 &range1, const ForwardRange2 &range2) |
std::find_end wrapper for ranges | |
template<typename ForwardRange1, typename ForwardRange2, typename BinaryPredicate> | |
ForwardRange1::iterator | find_end_r (const ForwardRange1 &range1, const ForwardRange2 &range2, BinaryPredicate pred) |
std::find_end wrapper for ranges | |
template<typename ForwardRange1, typename ForwardRange2> | |
ForwardRange1::iterator | find_first_of_r (const ForwardRange1 &range1, const ForwardRange2 &range2) |
std::find_first_of wrapper for ranges | |
template<typename ForwardRange1, typename ForwardRange2, typename BinaryPredicate> | |
ForwardRange1::iterator | find_first_of_r (const ForwardRange1 &range1, const ForwardRange2 &range2, BinaryPredicate pred) |
std::find_first_of wrapper for ranges | |
template<typename ForwardRange> | |
ForwardRange::iterator | adjacent_find_r (const ForwardRange &range) |
std::adjacent_find wrapper for ranges | |
template<typename ForwardRange, typename Predicate> | |
ForwardRange::iterator | adjacent_find_r (const ForwardRange &range, Predicate pred) |
std::adjacent_find wrapper for ranges | |
template<typename InputRange, typename T> | |
std::iterator_traits< typenameInputRange::iterator >::difference_type | count_r (const InputRange &range, const T &value) |
std::count wrapper for ranges | |
template<typename InputRange, typename Predicate> | |
std::iterator_traits< typenameInputRange::iterator >::difference_type | count_if_r (const InputRange &range, Predicate pred) |
std::count_if wrapper for ranges | |
template<typename InputRange1, typename InputRange2, typename BinaryPredicate> | |
std::pair< typename InputRange1::iterator, typename InputRange2::iterator > | mismatch_r (const InputRange1 &range1, const InputRange2 &range2, BinaryPredicate pred) |
std::mismatch wrapper for ranges | |
template<typename InputRange1, typename InputRange2> | |
std::pair< typename InputRange1::iterator, typename InputRange2::iterator > | mismatch_r (const InputRange1 &range1, const InputRange2 &range2) |
std::mismatch wrapper for ranges | |
template<typename InputRange1, typename InputRange2> | |
bool | equal_r (const InputRange1 &range1, const InputRange2 &range2) |
std::mismatch wrapper for ranges | |
template<typename InputRange1, typename InputRange2, typename BinaryPredicate> | |
bool | equal_r (const InputRange1 &range1, const InputRange2 &range2, BinaryPredicate pred) |
std::mismatch wrapper for ranges | |
template<typename ForwardRange1, typename ForwardRange2> | |
ForwardRange1::iterator | search_r (const ForwardRange1 &range1, const ForwardRange2 &range2) |
std::search wrapper for ranges | |
template<typename ForwardRange1, typename ForwardRange2, typename BinaryPredicate> | |
ForwardRange1::iterator | search_r (const ForwardRange1 &range1, const ForwardRange2 &range2, BinaryPredicate pred) |
std::search wrapper for ranges | |
template<typename ForwardRange, typename Size, typename T> | |
ForwardRange::iterator | search_n_r (const ForwardRange &range, Size count, const T &value) |
std::search_n wrapper for ranges | |
template<typename ForwardRange, typename Size, typename T, typename BinaryPredicate> | |
ForwardRange::iterator | search_n_r (const ForwardRange &range, Size count, const T &value, BinaryPredicate pred) |
std::search_n wrapper for ranges | |
template<typename InputRange, typename OutputIterator> | |
OutputIterator | copy_r (const InputRange &range, OutputIterator result) |
std::copy wrapper for ranges | |
template<typename BidirectionalRange, typename BidirectionalIterator> | |
BidirectionalIterator | copy_backward_r (const BidirectionalRange &range, BidirectionalIterator result) |
std::copy_backward wrapper for ranges | |
template<typename ForwardRange1, typename ForwardRange2> | |
ForwardRange2::iterator | swap_ranges_r (ForwardRange1 &range1, ForwardRange2 &range2) |
std::swap_ranges wrapper for ranges | |
template<typename InputRange, typename OutputIterator, typename UnaryOperation> | |
OutputIterator | transform_r (const InputRange &range, OutputIterator result, UnaryOperation op) |
std::transform wrapper for ranges | |
template<typename InputRange, typename OutputType, size_t N, typename UnaryOperation> | |
OutputType * | transform_r (const InputRange &range, OutputType(&result)[N], UnaryOperation op) |
std::transform wrapper for ranges | |
template<typename InputRange1, typename InputRange2, typename OutputIterator, typename BinaryOperation> | |
OutputIterator | transform_r (const InputRange1 &range1, const InputRange2 &range2, OutputIterator result, BinaryOperation op) |
std::transform wrapper for ranges | |
template<typename ForwardRange, typename T> | |
void | replace_r (ForwardRange &range, const T &old_value, const T &new_value) |
std::replace wrapper for ranges | |
template<typename ForwardRange, typename Predicate, typename T> | |
void | replace_if_r (ForwardRange &range, Predicate pred, const T &new_value) |
std::replace_if wrapper for ranges | |
template<typename InputRange, typename OutputIterator, typename T> | |
OutputIterator | replace_copy_r (const InputRange &range, OutputIterator result, const T &old_value, const T &new_value) |
std::replace_copy wrapper for ranges | |
template<typename InputRange, typename OutputIterator, typename Predicate, typename T> | |
OutputIterator | replace_copy_if_r (const InputRange &range, OutputIterator result, Predicate pred, const T &new_value) |
std::replace_copy_if wrapper for ranges | |
template<typename ForwardRange, typename T> | |
void | fill_r (ForwardRange &range, const T &value) |
std::fill wrapper for ranges | |
template<typename ForwardRange, typename Generator> | |
void | generate_r (ForwardRange &range, Generator gen) |
std::generate wrapper for ranges | |
template<typename ForwardRange, typename T> | |
ForwardRange::iterator | remove_r (ForwardRange &range, const T &value) |
std::remove wrapper for ranges | |
template<typename ForwardRange, typename Predicate> | |
ForwardRange::iterator | remove_if_r (ForwardRange &range, Predicate pred) |
std::remove wrapper for ranges | |
template<typename InputRange, typename OutputIterator, typename T> | |
OutputIterator | remove_copy_r (const InputRange &range, OutputIterator result, const T &value) |
std::remove_copy wrapper for ranges | |
template<typename InputRange, typename OutputIterator, typename Predicate> | |
OutputIterator | remove_copy_if_r (const InputRange &range, OutputIterator result, Predicate pred) |
std::remove_copy wrapper for ranges | |
template<typename ForwardRange> | |
ForwardRange::iterator | unique_r (ForwardRange &range) |
std::unique wrapper for ranges | |
template<typename ForwardRange, typename Predicate> | |
ForwardRange::iterator | unique_r (ForwardRange &range, Predicate pred) |
std::unique wrapper for ranges | |
template<typename InputRange, typename OutputIterator> | |
OutputIterator | unique_copy_r (const InputRange &range, OutputIterator result) |
std::unique_copy_r wrapper for ranges | |
template<typename InputRange, typename OutputIterator, typename Predicate> | |
OutputIterator | unique_copy_r (const InputRange &range, OutputIterator result, Predicate pred) |
std::unique_copy_r wrapper for ranges | |
template<typename BidirectionalRange> | |
void | reverse_r (BidirectionalRange &range) |
std::reverse wrapper for ranges | |
template<typename BidirectionalRange, typename OutputIterator> | |
OutputIterator | reverse_copy_r (const BidirectionalRange &range, OutputIterator result) |
std::reverse_copy wrapper for ranges | |
template<typename ForwardRange> | |
void | rotate_r (ForwardRange &range, typename ForwardRange::iterator middle) |
std::rotate wrapper for ranges | |
template<typename ForwardRange, typename OutputIterator> | |
void | rotate_copy_r (const ForwardRange &range, typename ForwardRange::iterator middle, OutputIterator result) |
std::rotate_copy wrapper for ranges | |
template<typename RandomAccessRange, typename UniformRandomBitGenerator> | |
void | shuffle_r (RandomAccessRange &range, UniformRandomBitGenerator &&urbg) |
std::shuffle wrapper for ranges | |
template<typename BidirectionalRange, typename Predicate> | |
BidirectionalRange::iterator | partition_r (BidirectionalRange &range, Predicate pred) |
std::partition wrapper for ranges | |
template<typename BidirectionalRange, typename Predicate> | |
BidirectionalRange::iterator | stable_partition_r (BidirectionalRange &range, Predicate pred) |
std::stable_partition wrapper for ranges | |
template<typename T, class Alloc> | |
bool | operator== (const slist< T, Alloc > &a, const slist< T, Alloc > &b) |
returns wether a and b are lexicographical idential. | |
template<typename T, class Alloc> | |
bool | operator!= (const slist< T, Alloc > &a, const slist< T, Alloc > &b) |
returns wether a and b are not lexicographical idential. | |
template<typename T, class Alloc> | |
bool | operator< (const slist< T, Alloc > &a, const slist< T, Alloc > &b) |
returns wether a is lexicographical less than b. | |
template<typename T, class Alloc> | |
bool | operator> (const slist< T, Alloc > &a, const slist< T, Alloc > &b) |
returns wether b is lexicographical less than a. | |
template<typename T, class Alloc> | |
bool | operator<= (const slist< T, Alloc > &a, const slist< T, Alloc > &b) |
returns wether a is lexicographical less or equal to b. | |
template<typename T, class Alloc> | |
bool | operator>= (const slist< T, Alloc > &a, const slist< T, Alloc > &b) |
returns wether b is lexicographical less or equal to a. | |
template<typename T, class Alloc, typename Char, typename Traits> | |
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &ostream, const slist< T, Alloc > &container) |
writes list to output stream. | |
template<typename T, class Alloc, typename Char, typename Traits> | |
std::basic_istream< Char, Traits > & | operator>> (std::basic_istream< Char, Traits > &istream, slist< T, Alloc > &container) |
reads list from stream. | |
template<typename T, size_t maxsize> | |
bool | operator== (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a and b are lexicographical idential. | |
template<typename T, size_t maxsize> | |
bool | operator!= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a and b are not lexicographical idential. | |
template<typename T, size_t maxsize> | |
bool | operator< (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a is lexicographical less than b. | |
template<typename T, size_t maxsize> | |
bool | operator> (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether b is lexicographical less than a. | |
template<typename T, size_t maxsize> | |
bool | operator<= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a is lexicographical less or equal to b. | |
template<typename T, size_t maxsize> | |
bool | operator>= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether b is lexicographical less or equal to a. | |
template<typename T, size_t maxsize, typename Char, typename Traits> | |
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &ostream, const static_vector< T, maxsize > &container) |
writes static_vector to output stream. | |
template<typename T, size_t maxsize, typename Char, typename Traits> | |
std::basic_istream< Char, Traits > & | operator>> (std::basic_istream< Char, Traits > &istream, static_vector< T, maxsize > &container) |
reads list from stream. | |
template<typename T1, typename T2, typename T3, typename U1, typename U2, typename U3> | |
bool | operator== (const triple< T1, T2, T3 > &x, const triple< U1, U2, U3 > &y) |
two triples are identical if all elements (first, second, third) are identical. | |
template<typename T1, typename T2, typename T3, typename U1, typename U2, typename U3> | |
bool | operator< (const triple< T1, T2, T3 > &x, const triple< U1, U2, U3 > &y) |
return true if x is "less" than y. | |
template<typename T1, typename T2, typename T3, typename U1, typename U2, typename U3> | |
bool | operator!= (const triple< T1, T2, T3 > &x, const triple< U1, U2, U3 > &y) |
equivalent to !(x == y), see operator< | |
template<typename T1, typename T2, typename T3, typename U1, typename U2, typename U3> | |
bool | operator> (const triple< T1, T2, T3 > &x, const triple< U1, U2, U3 > &y) |
equivalent to y < x, see operator< | |
template<typename T1, typename T2, typename T3, typename U1, typename U2, typename U3> | |
bool | operator<= (const triple< T1, T2, T3 > &x, const triple< U1, U2, U3 > &y) |
equivalent to !(y < x), see operator< | |
template<typename T1, typename T2, typename T3, typename U1, typename U2, typename U3> | |
bool | operator>= (const triple< T1, T2, T3 > &x, const triple< U1, U2, U3 > &y) |
equivalent to !(x < y), see operator< | |
template<typename T1, typename T2, typename T3> | |
triple< T1, T2, T3 > | make_triple (const T1 &a, const T2 &b, const T3 &c) |
convenience function to create a lass::stde::triple. | |