Xalan-C++ API Documentation

The Xalan-C++ XSL Transformer Version 1.0

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

less_null_terminated_arrays Struct Reference

This functor is designed to compare 0-terminated arrays. More...

#include <STLHelper.hpp>

Inheritance diagram for less_null_terminated_arrays:

std::binary_function Collaboration diagram for less_null_terminated_arrays:

List of all members.

Public Methods


Detailed Description

template<class T> struct less_null_terminated_arrays

This functor is designed to compare 0-terminated arrays.

It substitutes for the default less<type*> so that pointers to arrays can be compared, rather than copies of arrays. For example, you might want to use C-style strings as keys in a map, rather than string objects. The default algorithm less<const char*> would just compare the pointers, and not the vector of characters to which it points. Using this algorithm instead of the default will allow the map to work as expected.


Member Function Documentation

template<class T>
result_type less_null_terminated_arrays<T>::operator() (
first_argument_type theLHS,
second_argument_type theRHS) const

Compare the values of two objects.

Parameters:
theLHS   first object to compare
theRHS   second object to compare
Returns:
true if objects are the same

The documentation for this struct was generated from the following file:

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSL Transformer Version 1.0
Copyright © 2000 The Apache Software Foundation. All Rights Reserved.