Compounds | |||
class | auto_ptr | ||
struct | auto_ptr::auto_ptr_ref | ||
class | deep_copy_ptr | ||
class | body_part_ptr | ||
struct | cloneable | ||
struct | Cloneable | ||
class | grin_ptr | ||
class | forward_iterator | ||
struct | forward_iterator::implementation | ||
class | bidirectional_iterator | ||
struct | bidirectional_iterator::implementation | ||
class | subject | ||
class | subject::notify_strategy | ||
class | generic_reference | ||
class | typed_reference | ||
class | counted_ptr | ||
class | uncounted_ptr | ||
Functions | |||
template<class p_type> p_type* | deep_copy (const p_type* p, const void*) | ||
This is not intended for direct use - it provides a default copy mechanism for template<class p_type> p_type* deep_copy(const type*). More... | |||
template<class p_type> p_type* | deep_copy (const p_type *p, const cloneable *) | ||
This is not intended for direct use - it provides a "cloneable" copy mechanism for template<class p_type> p_type* deep_copy(const type*). More... | |||
template<class p_type> p_type* | deep_copy (const p_type *p, const Cloneable *) | ||
This is not intended for direct use - it provides a "Cloneable" copy mechanism for template<class p_type> p_type* deep_copy(const type*). More... | |||
template<class p_type> p_type* | deep_copy (const p_type* p) | ||
Makes a "deep copy" of the supplied pointer (it copies the referenced object - the object is responsible for copying its parts). More... | |||
template<typename value_type> bool | operator== ( const forward_iterator<value_type>& lhs, const forward_iterator<value_type>& rhs) | ||
template<typename value_type> bool | operator!= ( const forward_iterator<value_type>& lhs, const forward_iterator<value_type>& rhs) | ||
template<typename value_type> bool | operator== ( const bidirectional_iterator<value_type>& lhs, const bidirectional_iterator<value_type>& rhs) | ||
template<typename value_type> bool | operator!= ( const bidirectional_iterator<value_type>& lhs, const bidirectional_iterator<value_type>& rhs) | ||
int | reset_test_count () | ||
Reset the counts of tests executed/failed to zero and return the old count of tests executed. More... | |||
bool | report_test (bool result, const char* file, int line, const char* test) | ||
Normally invoked via the ARG_TEST macro. More... | |||
void | report_test_failure (const char* file, int line, const char* test) | ||
Normally invoked via report_test(). More... | |||
void | report_test_success (const char* file, int line, const char* test) | ||
Normally invoked via report_test(). More... | |||
int | report_errors (const char* file, int line, const int expected_tests) | ||
Normally invoked via the ARG_END_TESTS macro. More... |
(E.g. smart pointers). Copyright (C) 1999, 2000 Alan Griffiths.
This code is part of the 'arglib' library. The latest version of this library is available from:
http:*www.octopull.co.uk/arglib/
This code may be used for any purpose provided that:
1. This complete notice is retained unchanged in any version of this code.
2. If this code is incorporated into any work that displays copyright notices then the copyright for the 'arglib' library must be included.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
template<class p_type> p_type * arg::deep_copy (const p_type * p, const void *) [inline]
|
This is not intended for direct use - it provides a default copy mechanism for template<class p_type> p_type* deep_copy(const type*).
This copies using the copy constructor. Overloading this template permits use of smart pointers with "deep copy" semantics with other copying interfaces.
An overload based upon arg::cloneable is provided which uses a clone() member function. Users should provide additional overloads of their own if they have different copying requirements.
template<class p_type> p_type * arg::deep_copy (const p_type * p, const cloneable *) [inline]
|
This is not intended for direct use - it provides a "cloneable" copy mechanism for template<class p_type> p_type* deep_copy(const type*).
This is called for classes that implement the "cloneable" interfaces.
template<class p_type> p_type * arg::deep_copy (const p_type * p, const Cloneable *) [inline]
|
This is not intended for direct use - it provides a "Cloneable" copy mechanism for template<class p_type> p_type* deep_copy(const type*).
This is called for classes that implement the "Cloneable" interfaces.
template<class p_type> p_type * arg::deep_copy (const p_type * p) [inline]
|
Makes a "deep copy" of the supplied pointer (it copies the referenced object - the object is responsible for copying its parts).
By default the object is copied using the default constructor, but other copy methods are possible. In particular if the referenced object is of a type derived from arg::cloneable then the copy is obtained by calling its clone() method.
The copying mechanism is selected at compile time by forwarding to the overloaded two parameter version of this function. (This mechanism was suggested by Kevlin Henney.)
template<typename value_type> bool arg::operator== (const forward_iterator<value_type>& lhs, const forward_iterator<value_type>& rhs) [inline]
|
template<typename value_type> bool arg::operator!= (const forward_iterator<value_type>& lhs, const forward_iterator<value_type>& rhs) [inline]
|
template<typename value_type> bool arg::operator== (const bidirectional_iterator<value_type>& lhs, const bidirectional_iterator<value_type>& rhs) [inline]
|
template<typename value_type> bool arg::operator!= (const bidirectional_iterator<value_type>& lhs, const bidirectional_iterator<value_type>& rhs) [inline]
|
int arg::reset_test_count () |
Reset the counts of tests executed/failed to zero and return the old count of tests executed.
bool arg::report_test (bool result, const char * file, int line, const char * test) |
Normally invoked via the ARG_TEST macro.
Incorporates the result of the test into the statistics. Calls either report_test_failure() or report_test_success() according to the "result" parameter.
void arg::report_test_failure (const char * file, int line, const char * test) |
Normally invoked via report_test().
Writes an error message to std::cerr and increments both the count of tests run and of tests failed.
void arg::report_test_success (const char * file, int line, const char * test) |
Normally invoked via report_test().
Increments the count of tests run.
int arg::report_errors (const char * file, int line, const int expected_tests) |
Normally invoked via the ARG_END_TESTS macro.
Writes summary information of number of tests run (and failed). Returns the count of tests failed.