<?php

function echo_unordered_docs(
    $map,
    $equivalent_keys)
{
    $name = 'unordered_'.
        ($equivalent_keys ? 'multi' : '').
        ($map ? 'map' : 'set');
    // For merge....
    $node_partner = 'unordered_'.
        ($equivalent_keys ? '' : 'multi').
        ($map ? 'map' : 'set');

    if ($map)
    {
        $template_value = <<<EOL
            <template-type-parameter name="Key">
            </template-type-parameter>
            <template-type-parameter name="Mapped">
            </template-type-parameter>

EOL;

        $key_type = 'Key';
        $key_name = 'key';
        $value_type = 'std::pair<Key const, Mapped>';
        $full_type = $name.'<Key, Mapped, Hash, Pred, Alloc>';
    }
    else
    {
        $template_value = <<<EOL
            <template-type-parameter name="Value">
            </template-type-parameter>

EOL;

        $key_type = 'Value';
        $key_name = 'value';
        $value_type = 'Value';
        $full_type = $name.'<Value, Hash, Pred, Alloc>';
    }
?>
        <class name="<?php echo $name ?>">
          <template>
<?php echo $template_value; ?>
            <template-type-parameter name="Hash">
              <default><type>boost::hash<<?php echo $key_type; ?>></type></default>
            </template-type-parameter>
            <template-type-parameter name="Pred">
              <default><type>std::equal_to<<?php echo $key_type; ?>></type></default>
            </template-type-parameter>
            <template-type-parameter name="Alloc">
              <default><type>std::allocator<<?php echo $value_type; ?>></type></default>
            </template-type-parameter>
          </template>
          <purpose><simpara>
            An unordered associative container that <?php
            echo $map ? 'associates ' : 'stores ';
            echo $equivalent_keys ? '' : 'unique ';
            echo $map ? 'keys with another value.' : 'values.';
            echo $equivalent_keys ? ' The same key can be stored multiple times.' : '';
          ?>

          </simpara></purpose>
          <description>
            <para><emphasis role="bold">Template Parameters</emphasis>
              <informaltable>
                <tgroup cols="2">

<?php if ($map): ?>
                    <row>
                      <entry><emphasis>Key</emphasis></entry>
                      <entry>Key must be Erasable from the container
                        (i.e. allocator_traits can destroy it).
                      </entry></row>
                    <row>
                      <entry><emphasis>Mapped</emphasis></entry>
                      <entry>Mapped must be Erasable from the container
                        (i.e. allocator_traits can destroy it).
                      </entry></row>
<?php else: ?>
                    <row>
                      <entry><emphasis>Value</emphasis></entry>
                      <entry>Value must be Erasable from the container
                        (i.e. allocator_traits can destroy it).
                      </entry></row>
<?php endif ?>
                    <row>
                      <entry><emphasis>Hash</emphasis></entry>
                      <entry>A unary function object type that acts a hash function for a <?php echo $key_type; ?>. It takes a single argument of type <?php echo $key_type; ?> and returns a value of type std::size_t.</entry></row>
                    <row>
                      <entry><emphasis>Pred</emphasis></entry>
                      <entry>A binary function object that implements an equivalence relation on values of type <?php echo $key_type; ?>.
                        A binary function object that induces an equivalence relation on values of type <?php echo $key_type; ?>.
                        It takes two arguments of type <?php echo $key_type; ?> and returns a value of type bool.</entry></row>
                    <row>
                      <entry><emphasis>Alloc</emphasis></entry>
                      <entry>An allocator whose value type is the same as the container's value type.</entry></row>
</tgroup></informaltable></para>
            <para>The elements are organized into buckets. <?php
            echo $equivalent_keys ?
                'Keys with the same hash code are stored in the same bucket and elements with equivalent keys are stored next to each other.' :
                'Keys with the same hash code are stored in the same bucket.';
            ?></para>
            <para>The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.</para>
          </description>
          <typedef name="key_type">
            <type><?php echo $key_type; ?></type>
          </typedef>
          <typedef name="value_type">
            <type><?php echo $value_type; ?></type>
          </typedef>
<?php if ($map): ?>
          <typedef name="mapped_type">
            <type>Mapped</type>
          </typedef>
<?php endif; ?>
          <typedef name="hasher">
            <type>Hash</type>
          </typedef>
          <typedef name="key_equal">
            <type>Pred</type>
          </typedef>
          <typedef name="allocator_type">
            <type>Alloc</type>
          </typedef>
          <typedef name="pointer">
            <type>typename allocator_type::pointer</type>
            <description>
              <para>
                value_type* if
                allocator_type::pointer is not defined.
              </para>
            </description>
          </typedef>
          <typedef name="const_pointer">
            <type>typename allocator_type::const_pointer</type>
            <description>
              <para>
                boost::pointer_to_other<pointer, value_type>::type
                if allocator_type::const_pointer is not defined.
              </para>
            </description>
          </typedef>
          <typedef name="reference">
            <type>value_type&</type>
            <purpose><simpara>lvalue of <type>value_type</type>.</simpara></purpose>
          </typedef>
          <typedef name="const_reference">
            <type>value_type const&</type>
            <purpose><simpara>const lvalue of <type>value_type</type>.</simpara></purpose>
          </typedef>
          <typedef name="size_type">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              <para>An unsigned integral type.</para>
              <para><type>size_type</type> can represent any non-negative value of <type>difference_type</type>.</para>
            </description>
          </typedef>
          <typedef name="difference_type">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              <para>A signed integral type.</para>
              <para>Is identical to the difference type of <type>iterator</type> and <type>const_iterator</type>.</para>
            </description>
          </typedef>
          <typedef name="iterator">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              <para><?php echo $map ? 'An' : 'A constant' ?> iterator whose value type is <type>value_type</type>. </para>
              <para>The iterator category is at least a forward iterator.</para>
              <para>Convertible to <type>const_iterator</type>.</para>
            </description>
          </typedef>
          <typedef name="const_iterator">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              <para>A constant iterator whose value type is <type>value_type</type>. </para>
              <para>The iterator category is at least a forward iterator.</para>
            </description>
          </typedef>
          <typedef name="local_iterator">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              <para>An iterator with the same value type, difference type and pointer and reference type as <type>iterator</type>.</para>
              <para>A local_iterator object can be used to iterate through a single bucket.</para>
            </description>
          </typedef>
          <typedef name="const_local_iterator">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              <para>A constant iterator with the same value type, difference type and pointer and reference type as <type>const_iterator</type>.</para>
              <para>A const_local_iterator object can be used to iterate through a single bucket.</para>
            </description>
          </typedef>
          <typedef name="node_type">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              <para>See <classname>node_handle_<?php echo $map ? 'map' : 'set'; ?></classname> for details.</para>
            </description>
          </typedef>
<?php if (!$equivalent_keys): ?>
          <typedef name="insert_return_type">
            <type><emphasis>implementation-defined</emphasis></type>
            <description>
              Structure returned by inserting node_type.
            </description>
          </typedef>
<?php endif; ?>
          <constructor>
            <postconditions>
              <methodname>size</methodname>() == 0
            </postconditions>
            <description>
              <para>Constructs an empty container using hasher() as the hash function, key_equal() as the key equality predicate, allocator_type() as the allocator and a maximum load factor of 1.0.</para>
            </description>
            <requires>
              <para>If the defaults are used, hasher, key_equal and
                allocator_type need to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <constructor specifiers="explicit">
            <parameter name="n">
              <paramtype>size_type</paramtype>
            </parameter>
            <parameter name="hf">
              <paramtype>hasher const&</paramtype>
              <default>hasher()</default>
            </parameter>
            <parameter name="eq">
              <paramtype>key_equal const&</paramtype>
              <default>key_equal()</default>
            </parameter>
            <parameter name="a">
              <paramtype>allocator_type const&</paramtype>
              <default>allocator_type()</default>
            </parameter>
            <postconditions>
              <methodname>size</methodname>() == 0
            </postconditions>
            <description>
              <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
            </description>
            <requires>
              <para>If the defaults are used, hasher, key_equal and
                allocator_type need to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <constructor>
            <template>
              <template-type-parameter name="InputIterator">
              </template-type-parameter>
            </template>
            <parameter name="f">
              <paramtype>InputIterator</paramtype>
            </parameter>
            <parameter name="l">
              <paramtype>InputIterator</paramtype>
            </parameter>
            <parameter name="n">
              <paramtype>size_type</paramtype>
              <default><emphasis>implementation-defined</emphasis></default>
            </parameter>
            <parameter name="hf">
              <paramtype>hasher const&</paramtype>
              <default>hasher()</default>
            </parameter>
            <parameter name="eq">
              <paramtype>key_equal const&</paramtype>
              <default>key_equal()</default>
            </parameter>
            <parameter name="a">
              <paramtype>allocator_type const&</paramtype>
              <default>allocator_type()</default>
            </parameter>
            <description>
              <para>Constructs an empty container with at least n buckets,
              using hf as the hash function,
              eq as the key equality predicate,
              a as the allocator and a maximum load factor of 1.0
              and inserts the elements from [f, l) into it.
              </para>
            </description>
            <requires>
              <para>If the defaults are used, hasher, key_equal and
                allocator_type need to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <constructor>
            <parameter>
              <paramtype><?php echo $name; ?> const&</paramtype>
            </parameter>
            <description>
              <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
              <para>If Allocator::select_on_container_copy_construction
              exists and has the right signature, the allocator will be
              constructed from its result.</para>
            </description>
            <requires>
              <para>value_type is copy constructible</para>
            </requires>
          </constructor>
          <constructor>
            <parameter>
              <paramtype><?php echo $name; ?> &&</paramtype>
            </parameter>
            <description>
              <para>The move constructor.</para>
            </description>
            <notes>
              <para>This is implemented using Boost.Move.</para>
            </notes>
            <requires>
              <para>
                value_type is move constructible.
              </para>
              <para>
                On compilers without rvalue reference support the
                emulation does not support moving without calling
                boost::move if value_type is
                not copyable. So, for example, you can't return the
                container from a function.
              </para>
            </requires>
          </constructor>
          <constructor specifiers="explicit">
            <parameter name="a">
              <paramtype>Allocator const&</paramtype>
            </parameter>
            <description>
                <para>Constructs an empty container, using allocator a.</para>
            </description>
          </constructor>
          <constructor>
            <parameter name="x">
              <paramtype><?php echo $name; ?> const&</paramtype>
            </parameter>
            <parameter name="a">
              <paramtype>Allocator const&</paramtype>
            </parameter>
            <description>
                <para>Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.</para>
            </description>
          </constructor>
          <constructor>
            <parameter name="x">
              <paramtype><?php echo $name; ?> &&</paramtype>
            </parameter>
            <parameter name="a">
              <paramtype>Allocator const&</paramtype>
            </parameter>
            <description>
              <para>Construct a container moving x's contained elements, and having the hash function, predicate and maximum load factor, but using allocate a.</para>
            </description>
            <notes>
              <para>This is implemented using Boost.Move.</para>
            </notes>
            <requires>
              <para>
                value_type is move insertable.
              </para>
            </requires>
          </constructor>
          <constructor>
            <parameter name="il">
              <paramtype>initializer_list<value_type></paramtype>
            </parameter>
            <parameter name="n">
              <paramtype>size_type</paramtype>
              <default><emphasis>implementation-defined</emphasis></default>
            </parameter>
            <parameter name="hf">
              <paramtype>hasher const&</paramtype>
              <default>hasher()</default>
            </parameter>
            <parameter name="eq">
              <paramtype>key_equal const&</paramtype>
              <default>key_equal()</default>
            </parameter>
            <parameter name="a">
              <paramtype>allocator_type const&</paramtype>
              <default>allocator_type()</default>
            </parameter>
            <description>
              <para>Constructs an empty container with at least n buckets,
                using hf as the hash function,
                eq as the key equality predicate,
                a as the allocator and a maximum load factor of 1.0
                and inserts the elements from il into it.
              </para>
            </description>
            <requires>
              <para>If the defaults are used, hasher, key_equal and
                allocator_type need to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <constructor>
            <parameter name="n">
              <paramtype>size_type</paramtype>
            </parameter>
            <parameter name="a">
              <paramtype>allocator_type const&</paramtype>
            </parameter>
            <postconditions>
              <methodname>size</methodname>() == 0
            </postconditions>
            <description>
              <para>Constructs an empty container with at least n buckets,
              using hf as the hash function,
              the default hash function and key equality predicate,
              a as the allocator and a maximum load factor of 1.0.</para>
            </description>
            <requires>
              <para>hasher and key_equal need to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <constructor>
            <parameter name="n">
              <paramtype>size_type</paramtype>
            </parameter>
            <parameter name="hf">
              <paramtype>hasher const&</paramtype>
            </parameter>
            <parameter name="a">
              <paramtype>allocator_type const&</paramtype>
            </parameter>
            <postconditions>
              <methodname>size</methodname>() == 0
            </postconditions>
            <description>
              <para>Constructs an empty container with at least n buckets,
              using hf as the hash function,
              the default key equality predicate,
              a as the allocator and a maximum load factor of 1.0.</para>
            </description>
            <requires>
              <para>key_equal needs to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <constructor>
            <template>
              <template-type-parameter name="InputIterator">
              </template-type-parameter>
            </template>
            <parameter name="f">
              <paramtype>InputIterator</paramtype>
            </parameter>
            <parameter name="l">
              <paramtype>InputIterator</paramtype>
            </parameter>
            <parameter name="n">
              <paramtype>size_type</paramtype>
            </parameter>
            <parameter name="a">
              <paramtype>allocator_type const&</paramtype>
            </parameter>
            <description>
              <para>Constructs an empty container with at least n buckets,
              using  a as the allocator, with the
              default hash function and key equality predicate
              and a maximum load factor of 1.0
              and inserts the elements from [f, l) into it.
              </para>
            </description>
            <requires>
              <para>hasher, key_equal need to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <constructor>
            <template>
              <template-type-parameter name="InputIterator">
              </template-type-parameter>
            </template>
            <parameter name="f">
              <paramtype>InputIterator</paramtype>
            </parameter>
            <parameter name="l">
              <paramtype>InputIterator</paramtype>
            </parameter>
            <parameter name="n">
              <paramtype>size_type</paramtype>
            </parameter>
            <parameter name="hf">
              <paramtype>hasher const&</paramtype>
            </parameter>
            <parameter name="a">
              <paramtype>allocator_type const&</paramtype>
            </parameter>
            <description>
              <para>Constructs an empty container with at least n buckets,
              using hf as the hash function,
              a as the allocator, with the
              default key equality predicate
              and a maximum load factor of 1.0
              and inserts the elements from [f, l) into it.
              </para>
            </description>
            <requires>
              <para>key_equal needs to be DefaultConstructible.
              </para>
            </requires>
          </constructor>
          <destructor>
            <notes>
              <para>The destructor is applied to every element, and all memory is deallocated</para>
            </notes>
          </destructor>
          <method name="operator=">
            <parameter>
              <paramtype><?php echo $name; ?> const&</paramtype>
            </parameter>
            <type><?php echo $name; ?>&</type>
            <description>
              <para>The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.</para>
              <para>If Alloc::propagate_on_container_copy_assignment
              exists and Alloc::propagate_on_container_copy_assignment::value
               is true, the allocator is overwritten, if not the
              copied elements are created using the existing
              allocator.</para>
            </description>
            <requires>
              <para>value_type is copy constructible</para>
            </requires>
          </method>
          <method name="operator=">
            <parameter>
              <paramtype><?php echo $name; ?> &&</paramtype>
            </parameter>
            <type><?php echo $name; ?>&</type>
            <description>
              <para>The move assignment operator.</para>
              <para>If Alloc::propagate_on_container_move_assignment
              exists and Alloc::propagate_on_container_move_assignment::value
               is true, the allocator is overwritten, if not the
              moved elements are created using the existing
              allocator.</para>
            </description>
            <notes>
              <para>
                On compilers without rvalue references, this is emulated using
                Boost.Move. Note that on some compilers the copy assignment
                operator may be used in some circumstances.
              </para>
            </notes>
            <requires>
              <para>
                value_type is move constructible.
              </para>
            </requires>
          </method>
          <method name="operator=">
            <parameter>
              <paramtype>initializer_list<value_type></paramtype>
            </parameter>
            <type><?php echo $name; ?>&</type>
            <description>
              <para>Assign from values in initializer list. All existing elements are either overwritten by the new elements or destroyed.</para>
            </description>
            <requires>
              <para>
                value_type is CopyInsertable into the container and
                CopyAssignable.
              </para>
            </requires>
          </method>
          <method name="get_allocator" cv="const">
            <type>allocator_type</type>
          </method>
          <method-group name="size and capacity">
            <method name="empty" cv="const">
              <type>bool</type>
              <returns>
                <methodname>size</methodname>() == 0
              </returns>
            </method>
            <method name="size" cv="const">
              <type>size_type</type>
              <returns>
                std::distance(<methodname>begin</methodname>(), <methodname>end</methodname>())
              </returns>
            </method>
            <method name="max_size" cv="const">
              <type>size_type</type>
              <returns><methodname>size</methodname>() of the largest possible container.
              </returns>
            </method>
          </method-group>
          <method-group name="iterators">
            <overloaded-method name="begin">
              <signature><type>iterator</type></signature>
              <signature cv="const"><type>const_iterator</type></signature>
              <returns>An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
              </returns>
            </overloaded-method>
            <overloaded-method name="end">
              <signature>
                <type>iterator</type>
              </signature>
              <signature cv="const">
                <type>const_iterator</type>
              </signature>
              <returns>An iterator which refers to the past-the-end value for the container.
              </returns>
            </overloaded-method>
            <method name="cbegin" cv="const">
              <type>const_iterator</type>
              <returns>A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
              </returns>
            </method>
            <method name="cend" cv="const">
              <type>const_iterator</type>
              <returns>A constant iterator which refers to the past-the-end value for the container.
              </returns>
            </method>
          </method-group>
          <method-group name="modifiers">
            <method name="emplace">
              <template>
                <template-type-parameter name="Args" pack="1">
                </template-type-parameter>
              </template>
              <parameter name="args" pack="1">
                <paramtype>Args&&</paramtype>
              </parameter>
              <type><?php echo $equivalent_keys ? 'iterator' : 'std::pair<iterator, bool>' ?></type>
              <description>
                <para>Inserts an object, constructed with the arguments args, in the container<?php
                echo $equivalent_keys ? '.' :
                    ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
                ?></para>
              </description>
              <requires>
                <para>value_type is EmplaceConstructible into
                  X from args.
                </para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>An iterator pointing to the inserted element.</para>
<?php else: ?>
                <para>The bool component of the return type is true if an insert took place.</para>
                <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
                <para>If the compiler doesn't support variadic template arguments or rvalue
                      references, this is emulated for up to 10 arguments, with no support
                      for rvalue references or move semantics.</para>
                <para>Since existing std::pair implementations don't support
                      std::piecewise_construct this emulates it,
                      but using boost::unordered::piecewise_construct.</para>
              </notes>
            </method>
            <method name="emplace_hint">
              <template>
                <template-type-parameter name="Args" pack="1">
                </template-type-parameter>
              </template>
              <parameter name="hint">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <parameter name="args" pack="1">
                <paramtype>Args&&</paramtype>
              </parameter>
              <type>iterator</type>
              <description>
                <para>Inserts an object, constructed with the arguments args, in the container<?php
                echo $equivalent_keys ? '.' :
                    ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
                ?></para>
                <para>hint is a suggestion to where the element should be inserted.</para>
              </description>
              <requires>
                <para>value_type is EmplaceConstructible into
                  X from args.
                </para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>An iterator pointing to the inserted element.</para>
<?php else: ?>
                <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
                <para>If the compiler doesn't support variadic template arguments or rvalue
                      references, this is emulated for up to 10 arguments, with no support
                      for rvalue references or move semantics.</para>
                <para>Since existing std::pair implementations don't support
                      std::piecewise_construct this emulates it,
                      but using boost::unordered::piecewise_construct.</para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="obj">
                <paramtype>value_type const&</paramtype>
              </parameter>
              <type><?php echo $equivalent_keys ? 'iterator' : 'std::pair<iterator, bool>' ?></type>
              <description>
                <para>Inserts obj in the container<?php
                echo $equivalent_keys ? '.' :
                    ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
                ?></para>
              </description>
              <requires>
                <para>value_type is CopyInsertable.</para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>An iterator pointing to the inserted element.</para>
<?php else: ?>
                <para>The bool component of the return type is true if an insert took place.</para>
                <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="obj">
                <paramtype>value_type&&</paramtype>
              </parameter>
              <type><?php echo $equivalent_keys ? 'iterator' : 'std::pair<iterator, bool>' ?></type>
              <description>
                <para>Inserts obj in the container<?php
                echo $equivalent_keys ? '.' :
                    ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
                ?></para>
              </description>
              <requires>
                <para>value_type is MoveInsertable.</para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>An iterator pointing to the inserted element.</para>
<?php else: ?>
                <para>The bool component of the return type is true if an insert took place.</para>
                <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="hint">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <parameter name="obj">
                <paramtype>value_type const&</paramtype>
              </parameter>
              <type>iterator</type>
              <description>
<?php if ($equivalent_keys): ?>
                <para>Inserts obj in the container.</para>
<?php else: ?>
                <para>Inserts obj in the container if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
                <para>hint is a suggestion to where the element should be inserted.</para>
              </description>
              <requires>
                <para>value_type is CopyInsertable.</para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>An iterator pointing to the inserted element.</para>
<?php else: ?>
                <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="hint">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <parameter name="obj">
                <paramtype>value_type&&</paramtype>
              </parameter>
              <type>iterator</type>
              <description>
<?php if ($equivalent_keys): ?>
                <para>Inserts obj in the container.</para>
<?php else: ?>
                <para>Inserts obj in the container if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
                <para>hint is a suggestion to where the element should be inserted.</para>
              </description>
              <requires>
                <para>value_type is MoveInsertable.</para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>An iterator pointing to the inserted element.</para>
<?php else: ?>
                <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <method name="insert">
              <template>
                <template-type-parameter name="InputIterator">
                </template-type-parameter>
              </template>
              <parameter name="first">
                <paramtype>InputIterator</paramtype>
              </parameter>
              <parameter name="last">
                <paramtype>InputIterator</paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Inserts a range of elements into the container.
<?php if (!$equivalent_keys): ?>
                Elements are inserted if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.
<?php endif; ?>
                </para>
              </description>
              <requires>
                <para>value_type is EmplaceConstructible into
                  X from *first.</para>
              </requires>
              <throws>
                <para>When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="il">
                <paramtype>initializer_list<value_type></paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Inserts a range of elements into the container.
                <?php if (!$equivalent_keys): ?>
                Elements are inserted if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.
                <?php endif; ?>
                </para>
              </description>
              <requires>
                <para>value_type is EmplaceConstructible into
                  X from *first.</para>
              </requires>
              <throws>
                <para>When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="il">
                <paramtype>initializer_list<value_type></paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
              </description>
              <requires>
                <para>value_type is EmplaceConstructible into
                  X from *first.</para>
              </requires>
              <throws>
                <para>When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <method name="extract">
              <parameter name="position">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <type>node_type</type>
              <description>
                <para>Removes the element pointed to by position.</para>
              </description>
              <returns>
                <para>A node_type owning the element.</para>
              </returns>
              <notes>
                <para>
                  In C++17 a node extracted using this method can be inserted into a compatible <?php echo $node_partner; ?>,
                  but that is not supported yet.
                </para>
              </notes>
            </method>
            <method name="extract">
              <parameter name="k">
                <paramtype>key_type const&</paramtype>
              </parameter>
              <type>node_type</type>
              <description>
                <para>Removes an element with key equivalent to k.</para>
              </description>
              <returns>
                <para>A node_type owning the element if found, otherwise an empty node_type.</para>
              </returns>
              <throws>
                <para>Only throws an exception if it is thrown by hasher or key_equal.</para>
              </throws>
              <notes>
                <para>
                  In C++17 a node extracted using this method can be inserted into a compatible <?php echo $node_partner; ?>,
                  but that is not supported yet.
                </para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="nh">
                <paramtype>node_type&&</paramtype>
              </parameter>
              <type><?php echo $equivalent_keys ? 'iterator' : 'insert_return_type' ?></type>
              <description>
                <para>If nh is empty, has no affect.</para>
<?php if ($equivalent_keys): ?>
                <para>Otherwise inserts the element owned by nh</para>
<?php else: ?>
                <para>Otherwise inserts the element owned by nh
                      if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.
                </para>
<?php endif ?>
              </description>
              <requires>
                <para>nh is empty or nh.get_allocator() is equal to the container's allocator.</para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>If nh was empty, returns end().</para>
                <para>Otherwise returns an iterator pointing to the newly inserted element.</para>
<?php else: ?>
                <para>If nh was empty, returns an insert_return_type with:
                      inserted equal to false,
                      position equal to end() and
                      node empty.</para>
                <para>Otherwise if there was already an element with an equivalent key, returns an insert_return_type with:
                      inserted equal to false,
                      position pointing to a matching element and
                      node contains the node from nh.</para>
                <para>Otherwise if the insertion succeeded, returns an insert_return_type with:
                      inserted equal to true,
                      position pointing to the newly inserted element and
                      node empty.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
                <para>In C++17 this can be used to insert a node extracted from a compatible <?php echo $node_partner; ?>,
                    but that is not supported yet.</para>
              </notes>
            </method>
            <method name="insert">
              <parameter name="hint">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <parameter name="nh">
                <paramtype>node_type&&</paramtype>
              </parameter>
              <type>iterator</type>
              <description>
                <para>If nh is empty, has no affect.</para>
<?php if ($equivalent_keys): ?>
                <para>Otherwise inserts the element owned by nh</para>
<?php else: ?>
                <para>Otherwise inserts the element owned by nh
                      if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.
                </para>
                <para>If there is already an element in the container with an equivalent <?php echo $key_name; ?>
                      has no effect on nh (i.e. nh still contains the node.)</para>
<?php endif ?>
                <para>hint is a suggestion to where the element should be inserted.</para>
              </description>
              <requires>
                <para>nh is empty or nh.get_allocator() is equal to the container's allocator.</para>
              </requires>
              <returns>
<?php if ($equivalent_keys): ?>
                <para>If nh was empty, returns end().</para>
                <para>Otherwise returns an iterator pointing to the newly inserted element.</para>
<?php else: ?>
                <para>If nh was empty returns end().</para>
                <para>If there was already an element in the container with an equivalent <?php echo $key_name; ?>
                      returns an iterator pointing to that.</para>
                <para>Otherwise returns an iterator pointing to the newly inserted element.</para>
<?php endif; ?>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
                <para>In C++17 this can be used to insert a node extracted from a compatible <?php echo $node_partner; ?>,
                    but that is not supported yet.</para>
              </notes>
            </method>
            <method name="erase">
              <parameter name="position">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <type>iterator</type>
              <description>
                <para>Erase the element pointed to by position.</para>
              </description>
              <returns>
                <para>The iterator following position before the erasure.</para>
              </returns>
              <throws>
                <para>Only throws an exception if it is thrown by hasher or key_equal.</para>
              </throws>
              <notes>
                <para>
                  In older versions this could be inefficient because it had to search
                  through several buckets to find the position of the returned iterator.
                  The data structure has been changed so that this is no longer the case,
                  and the alternative erase methods have been deprecated.
                </para>
              </notes>
            </method>
            <method name="erase">
              <parameter name="k">
                <paramtype>key_type const&</paramtype>
              </parameter>
              <type>size_type</type>
              <description>
                <para>Erase all elements with key equivalent to k.</para>
              </description>
              <returns>
                <para>The number of elements erased.</para>
              </returns>
              <throws>
                <para>Only throws an exception if it is thrown by hasher or key_equal.</para>
              </throws>
            </method>
            <method name="erase">
              <parameter name="first">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <parameter name="last">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <type>iterator</type>
              <description>
                <para>Erases the elements in the range from first to last.</para>
              </description>
              <returns>
                <para>The iterator following the erased elements - i.e. last.</para>
              </returns>
              <throws>
                <para>Only throws an exception if it is thrown by hasher or key_equal.</para>
                <para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para>
              </throws>
            </method>
            <method name="quick_erase">
              <parameter name="position">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Erase the element pointed to by position.</para>
              </description>
              <throws>
                <para>Only throws an exception if it is thrown by hasher or key_equal.</para>
                <para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para>
              </throws>
              <notes>
                <para>
                  This method was implemented because returning an iterator to
                  the next element from erase was expensive, but
                  the container has been redesigned so that is no longer the
                  case. So this method is now deprecated.
                </para>
              </notes>
            </method>
            <method name="erase_return_void">
              <parameter name="position">
                <paramtype>const_iterator</paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Erase the element pointed to by position.</para>
              </description>
              <throws>
                <para>Only throws an exception if it is thrown by hasher or key_equal.</para>
                <para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para>
              </throws>
              <notes>
                <para>
                  This method was implemented because returning an iterator to
                  the next element from erase was expensive, but
                  the container has been redesigned so that is no longer the
                  case. So this method is now deprecated.
                </para>
              </notes>
            </method>
            <method name="clear">
              <type>void</type>
              <description>
                <para>Erases all elements in the container.</para>
              </description>
              <postconditions>
                <para><methodname>size</methodname>() == 0</para>
              </postconditions>
              <throws>
                <para>Never throws an exception.</para>
              </throws>
            </method>
            <method name="swap">
              <parameter>
                <paramtype><?php echo $name; ?>&</paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Swaps the contents of the container with the parameter.</para>
                <para>If Allocator::propagate_on_container_swap is declared and
                  Allocator::propagate_on_container_swap::value is true then the
                  containers' allocators are swapped. Otherwise, swapping with unequal allocators
                  results in undefined behavior.</para>
              </description>
              <throws>
                <para>Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.</para>
              </throws>
              <notes>
                <para>The exception specifications aren't quite the same as the C++11 standard, as
                  the equality predieate and hash function are swapped using their copy constructors.</para>
              </notes>
            </method>
            <method name="merge">
              <template>
                <template-type-parameter name="H2">
                </template-type-parameter>
                <template-type-parameter name="P2">
                </template-type-parameter>
              </template>
              <parameter name="source">
<?php if ($map): ?>
                <paramtype><?php echo $name; ?><Key, Mapped, H2, P2, Alloc>&</paramtype>
<?php else: ?>
                <paramtype><?php echo $name; ?><Value, H2, P2, Alloc>&</paramtype>
<?php endif; ?>
              </parameter>
              <notes>
                <para>Does not support merging with a compatible <?php echo $node_partner; ?> yet.</para>
              </notes>
            </method>
            <method name="merge">
              <template>
                <template-type-parameter name="H2">
                </template-type-parameter>
                <template-type-parameter name="P2">
                </template-type-parameter>
              </template>
              <parameter name="source">
<?php if ($map): ?>
                <paramtype><?php echo $name; ?><Key, Mapped, H2, P2, Alloc>&&</paramtype>
<?php else: ?>
                <paramtype><?php echo $name; ?><Value, H2, P2, Alloc>&&</paramtype>
<?php endif; ?>
              </parameter>
              <notes>
                <para>Does not support merging with a compatible <?php echo $node_partner; ?> yet.</para>
              </notes>
            </method>
<?php /*
            <method name="merge">
              <template>
                <template-type-parameter name="H2">
                </template-type-parameter>
                <template-type-parameter name="P2">
                </template-type-parameter>
              </template>
              <parameter name="source">
<?php if ($map): ?>
                <paramtype><?php echo $node_partner; ?><Key, Mapped, H2, P2, Alloc>&</paramtype>
<?php else: ?>
                <paramtype><?php echo $node_partner; ?><Value, H2, P2, Alloc>&</paramtype>
<?php endif; ?>
              </parameter>
            </method>
            <method name="merge">
              <template>
                <template-type-parameter name="H2">
                </template-type-parameter>
                <template-type-parameter name="P2">
                </template-type-parameter>
              </template>
              <parameter name="source">
<?php if ($map): ?>
                <paramtype><?php echo $node_partner; ?><Key, Mapped, H2, P2, Alloc>&&</paramtype>
<?php else: ?>
                <paramtype><?php echo $node_partner; ?><Value, H2, P2, Alloc>&&</paramtype>
<?php endif; ?>
              </parameter>
            </method>
*/ ?>
          </method-group>
          <method-group name="observers">
            <method name="hash_function" cv="const">
              <type>hasher</type>
              <returns>The container's hash function.
              </returns>
            </method>
            <method name="key_eq" cv="const">
              <type>key_equal</type>
              <returns>The container's key equality predicate.
              </returns>
            </method>
          </method-group>
          <method-group name="lookup">
            <overloaded-method name="find">
              <signature>
                <parameter name="k">
                  <paramtype>key_type const&</paramtype>
                </parameter>
                <type>iterator</type>
              </signature>
              <signature cv="const">
                <parameter name="k">
                  <paramtype>key_type const&</paramtype>
                </parameter>
                <type>const_iterator</type>
              </signature>
              <signature>
                <template>
                  <template-type-parameter name="CompatibleKey"/>
                  <template-type-parameter name="CompatibleHash"/>
                  <template-type-parameter name="CompatiblePredicate"/>
                </template>
                <parameter name="k">
                  <paramtype>CompatibleKey const&</paramtype>
                </parameter>
                <parameter name="hash">
                  <paramtype>CompatibleHash const&</paramtype>
                </parameter>
                <parameter name="eq">
                  <paramtype>CompatiblePredicate const&</paramtype>
                </parameter>
                <type>iterator</type>
              </signature>
              <signature cv="const">
                <template>
                  <template-type-parameter name="CompatibleKey"/>
                  <template-type-parameter name="CompatibleHash"/>
                  <template-type-parameter name="CompatiblePredicate"/>
                </template>
                <parameter name="k">
                  <paramtype>CompatibleKey const&</paramtype>
                </parameter>
                <parameter name="hash">
                  <paramtype>CompatibleHash const&</paramtype>
                </parameter>
                <parameter name="eq">
                  <paramtype>CompatiblePredicate const&</paramtype>
                </parameter>
                <type>const_iterator</type>
              </signature>
              <returns>
                <para>An iterator pointing to an element with key equivalent to k, or b.end() if no such element exists.</para>
              </returns>
              <notes><para>
                The templated overloads are a non-standard extensions which
                allows you to use a compatible hash function and equality
                predicate for a key of a different type in order to avoid
                an expensive type cast. In general, its use is not encouraged.
              </para></notes>
            </overloaded-method>
            <method name="count" cv="const">
              <parameter name="k">
                <paramtype>key_type const&</paramtype>
              </parameter>
              <type>size_type</type>
              <returns>
                <para>The number of elements with key equivalent to k.</para>
              </returns>
            </method>
            <overloaded-method name="equal_range">
              <signature>
                <parameter name="k">
                  <paramtype>key_type const&</paramtype>
                </parameter>
                <type>std::pair<iterator, iterator></type>
              </signature>
              <signature cv="const">
                <parameter name="k">
                  <paramtype>key_type const&</paramtype>
                </parameter>
                <type>std::pair<const_iterator, const_iterator></type>
              </signature>
              <returns>
                <para>A range containing all elements with key equivalent to k.
                  If the container doesn't container any such elements, returns
                  <functionname>std::make_pair</functionname>(<methodname>b.end</methodname>(),<methodname>b.end</methodname>()).
                  </para>
              </returns>
            </overloaded-method>
<?php if ($map && !$equivalent_keys): ?>
            <method name="operator[]">
              <parameter name="k">
                <paramtype>key_type const&</paramtype>
              </parameter>
              <type>mapped_type&</type>
              <effects>
                <para>If the container does not already contain an elements with a key equivalent to k, inserts the value std::pair<key_type const, mapped_type>(k, mapped_type())</para>
              </effects>
              <returns>
                <para>A reference to x.second where x is the element already in the container, or the newly inserted element with a key equivalent to k</para>
              </returns>
              <throws>
                <para>If an exception is thrown by an operation other than a call to hasher the function has no effect.</para>
              </throws>
              <notes>
                <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
                <para>Pointers and references to elements are never invalidated.</para>
              </notes>
            </method>
            <overloaded-method name="at">
              <signature><type>Mapped&</type>
                <parameter name="k"><paramtype>key_type const&</paramtype></parameter></signature>
              <signature cv="const"><type>Mapped const&</type>
                <parameter name="k"><paramtype>key_type const&</paramtype></parameter></signature>
              <returns>
                <para>A reference to x.second where x is the (unique) element whose key is equivalent to k.</para>
              </returns>
              <throws>
                <para>An exception object of type std::out_of_range if no such element is present.</para>
              </throws>
            </overloaded-method>
<?php endif; ?>
          </method-group>
          <method-group name="bucket interface">
            <method name="bucket_count" cv="const">
              <type>size_type</type>
              <returns>
                <para>The number of buckets.</para>
              </returns>
            </method>
            <method name="max_bucket_count" cv="const">
              <type>size_type</type>
              <returns>
                <para>An upper bound on the number of buckets.</para>
              </returns>
            </method>
            <method name="bucket_size" cv="const">
              <parameter name="n">
                <paramtype>size_type</paramtype>
              </parameter>
              <type>size_type</type>
              <requires>
                <para>n < <methodname>bucket_count</methodname>()</para>
              </requires>
              <returns>
                <para>The number of elements in bucket n.</para>
              </returns>
            </method>
            <method name="bucket" cv="const">
              <parameter name="k">
                <paramtype>key_type const&</paramtype>
              </parameter>
              <type>size_type</type>
              <returns>
                <para>The index of the bucket which would contain an element with key k.</para>
              </returns>
              <postconditions>
                <para>The return value is less than bucket_count()</para>
              </postconditions>
            </method>
            <overloaded-method name="begin">
              <signature>
                <parameter name="n">
                  <paramtype>size_type</paramtype>
                </parameter>
                <type>local_iterator</type>
              </signature>
              <signature cv="const">
                <parameter name="n">
                  <paramtype>size_type</paramtype>
                </parameter>
                <type>const_local_iterator</type>
              </signature>
              <requires>
                <para>n shall be in the range [0, bucket_count()).</para>
              </requires>
              <returns>
                <para>A local iterator pointing the first element in the bucket with index n.</para>
              </returns>
            </overloaded-method>
            <overloaded-method name="end">
              <signature>
                <parameter name="n">
                  <paramtype>size_type</paramtype>
                </parameter>
                <type>local_iterator</type>
              </signature>
              <signature cv="const">
                <parameter name="n">
                  <paramtype>size_type</paramtype>
                </parameter>
                <type>const_local_iterator</type>
              </signature>
              <requires>
                <para>n shall be in the range [0, bucket_count()).</para>
              </requires>
              <returns>
                <para>A local iterator pointing the 'one past the end' element in the bucket with index n.</para>
              </returns>
            </overloaded-method>
            <method name="cbegin" cv="const">
              <parameter name="n">
                <paramtype>size_type</paramtype>
              </parameter>
              <type>const_local_iterator</type>
              <requires>
                <para>n shall be in the range [0, bucket_count()).</para>
              </requires>
              <returns>
                <para>A constant local iterator pointing the first element in the bucket with index n.</para>
              </returns>
            </method>
            <method name="cend">
              <parameter name="n">
                <paramtype>size_type</paramtype>
              </parameter>
              <type>const_local_iterator</type>
              <requires>
                <para>n shall be in the range [0, bucket_count()).</para>
              </requires>
              <returns>
                <para>A constant local iterator pointing the 'one past the end' element in the bucket with index n.</para>
              </returns>
            </method>
          </method-group>
          <method-group name="hash policy">
            <method name="load_factor" cv="const">
              <type>float</type>
              <returns>
                <para>The average number of elements per bucket.</para>
              </returns>
            </method>
            <method name="max_load_factor" cv="const">
              <type>float</type>
              <returns>
                <para>Returns the current maximum load factor.</para>
              </returns>
            </method>
            <method name="max_load_factor">
              <parameter name="z">
                <paramtype>float</paramtype>
              </parameter>
              <type>void</type>
              <effects>
                <para>Changes the container's maximum load factor, using z as a hint.</para>
              </effects>
            </method>
            <method name="rehash">
              <parameter name="n">
                <paramtype>size_type</paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.</para>
                <para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para>
              </description>
              <throws>
                <para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para>
              </throws>
            </method>
            <method name="reserve">
              <parameter name="n">
                <paramtype>size_type</paramtype>
              </parameter>
              <type>void</type>
              <description>
                <para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para>
              </description>
              <throws>
                <para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para>
              </throws>
            </method>
          </method-group>
          <free-function-group name="Equality Comparisons">
            <function name="operator==">
              <template>
<?php echo $template_value; ?>
                <template-type-parameter name="Hash">
                </template-type-parameter>
                <template-type-parameter name="Pred">
                </template-type-parameter>
                <template-type-parameter name="Alloc">
                </template-type-parameter>
              </template>
              <parameter name="x">
                <paramtype><?php echo $full_type; ?> const&</paramtype>
              </parameter>
              <parameter name="y">
                <paramtype><?php echo $full_type; ?> const&</paramtype>
              </parameter>
              <type>bool</type>
              <description>
<?php if($equivalent_keys): ?>
                <para>Return true if x.size() ==
                y.size and for every equivalent key group in
                x, there is a group in y
                for the same key, which is a permutation (using
                operator== to compare the value types).
                </para>
<?php else: ?>
                <para>Return true if x.size() ==
                y.size and for every element in x,
                there is an element in y with the same
                for the same key, with an equal value (using
                operator== to compare the value types).
                </para>
<?php endif; ?>
              </description>
              <notes>
                <para>The behavior of this function was changed to match
                  the C++11 standard in Boost 1.48.</para>
                <para>Behavior is undefined if the two containers don't have
                    equivalent equality predicates.</para>
              </notes>
            </function>
            <function name="operator!=">
              <template>
<?php echo $template_value; ?>
                <template-type-parameter name="Hash">
                </template-type-parameter>
                <template-type-parameter name="Pred">
                </template-type-parameter>
                <template-type-parameter name="Alloc">
                </template-type-parameter>
              </template>
              <parameter name="x">
                <paramtype><?php echo $full_type; ?> const&</paramtype>
              </parameter>
              <parameter name="y">
                <paramtype><?php echo $full_type; ?> const&</paramtype>
              </parameter>
              <type>bool</type>
              <description>
<?php if($equivalent_keys): ?>
                <para>Return false if x.size() ==
                y.size and for every equivalent key group in
                x, there is a group in y
                for the same key, which is a permutation (using
                operator== to compare the value types).
                </para>
<?php else: ?>
                <para>Return false if x.size() ==
                y.size and for every element in x,
                there is an element in y with the same
                for the same key, with an equal value (using
                operator== to compare the value types).
                </para>
<?php endif; ?>
              </description>
              <notes>
                <para>The behavior of this function was changed to match
                  the C++11 standard in Boost 1.48.</para>
                <para>Behavior is undefined if the two containers don't have
                    equivalent equality predicates.</para>
              </notes>
            </function>
          </free-function-group>
          <free-function-group name="swap">
            <function name="swap">
              <template>
<?php echo $template_value; ?>
                <template-type-parameter name="Hash">
                </template-type-parameter>
                <template-type-parameter name="Pred">
                </template-type-parameter>
                <template-type-parameter name="Alloc">
                </template-type-parameter>
              </template>
              <parameter name="x">
                <paramtype><?php echo $full_type; ?>&</paramtype>
              </parameter>
              <parameter name="y">
                <paramtype><?php echo $full_type; ?>&</paramtype>
              </parameter>
              <type>void</type>
              <effects>
                <para>x.swap(y)</para>
              </effects>
              <description>
                <para>Swaps the contents of x and y.</para>
                <para>If Allocator::propagate_on_container_swap is declared and
                  Allocator::propagate_on_container_swap::value is true then the
                  containers' allocators are swapped. Otherwise, swapping with unequal allocators
                  results in undefined behavior.</para>
              </description>
              <throws>
                <para>Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.</para>
              </throws>
              <notes>
                <para>The exception specifications aren't quite the same as the C++11 standard, as
                  the equality predieate and hash function are swapped using their copy constructors.</para>
              </notes>
            </function>
          </free-function-group>
        </class>
<?php
}

function echo_node_handle_docs($map)
{
    $type = $map ? 'map' : 'set';
    $name = 'node_handle_'.$type;
    $full_type = "{$name}<ImplementationDefined>";
?>
      <namespace name="unordered">
        <class name="<?php echo $name ?>">
          <template pack="true">
            <template-type-parameter name="ImplementationDefined"/>
          </template>
          <purpose>
            <para>
              An object that owns a single element extracted from an
              <classname>unordered_<?php echo $type ?></classname> or an
              <classname>unordered_multi<?php echo $type ?></classname>, that
              can then be inserted into a compatible container type.
            </para>
            <para>
              The name and template parameters of this type are implementation
              defined, and should be obtained using the node_type
              member typedef from the appropriate container.
            </para>
          </purpose>
<?php if ($map): ?>
          <typedef name="key_type">
            <type>typename Container::key_type</type>
          </typedef>
          <typedef name="mapped_type">
            <type>typename Container::mapped_type</type>
          </typedef>
<?php else: ?>
          <typedef name="value_type">
            <type>typename Container::value_type></type>
          </typedef>
<?php endif ?>
          <typedef name="allocator_type">
            <type>typename Container::allocator_type></type>
          </typedef>
          <constructor specifiers="constexpr" cv="noexcept">
          </constructor>
          <destructor/>
          <constructor cv="noexcept">
            <parameter>
              <paramtype><?php echo $name; ?> &&</paramtype>
            </parameter>
          </constructor>
          <method name="operator=">
            <parameter>
              <paramtype><?php echo $name; ?>&&</paramtype>
            </parameter>
            <type><?php echo $name; ?>&</type>
          </method>
<?php if ($map): ?>
          <method name="key" cv="const">
            <type>key_type&</type>
          </method>
          <method name="mapped" cv="const">
            <type>mapped_type&</type>
          </method>
<?php else: ?>
          <method name="value" cv="const">
            <type>value_type&</type>
          </method>
<?php endif; ?>
          <method name="get_allocator" cv="const">
            <type>allocator_type</type>
          </method>
          <method name="operator bool" specifiers="explicit" cv="const noexcept">
          </method>
          <method name="empty" cv="const noexcept">
            <type>bool</type>
          </method>
          <method name="swap" cv="noexcept(ator_traits::propagate_on_container_swap::value)">
            <parameter>
              <paramtype><?php echo $name; ?>&</paramtype>
            </parameter>
            <type>void</type>
            <notes>
              <para>
                In C++17 is also noexcept if ator_traits::is_always_equal::value is true.
                But we don't support that trait yet.
              </para>
            </notes>
          </method>
          <free-function-group name="swap" cv="noexcept(noexcept(x.swap(y)))">
            <function name="swap">
              <template pack="true">
                <template-type-parameter name="ImplementationDefined"/>
              </template>
              <parameter name="x">
                <paramtype><?php echo $full_type; ?>&</paramtype>
              </parameter>
              <parameter name="y">
                <paramtype><?php echo $full_type; ?>&</paramtype>
              </parameter>
              <type>void</type>
              <effects>
                <para>x.swap(y)</para>
              </effects>
            </function>
          </free-function-group>
        </class>
      </namespace>
<?php
}

?>
<library-reference>

      <namespace name="boost">
<?php
echo_unordered_docs(false, false);
echo_unordered_docs(false, true);
echo_node_handle_docs(false);
?>
      </namespace>

      <namespace name="boost">
<?php
echo_unordered_docs(true, false);
echo_unordered_docs(true, true);
echo_node_handle_docs(true);
?>
      </namespace>

  </library-reference>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="SHORTCUT ICON" href="/favicon.ico">

<title>Search the documentation on XMLSoft.org</title>

The XML C library for Gnome

Search engine

Main Menu

Home

Introduction

FAQ

Documentation

Reporting bugs and getting help

How to help

Downloads

News

XML

XSLT

Python and bindings

libxml architecture

The tree output

The SAX interface

Validation & DTDs

Memory Management

Encodings support

I/O Interfaces

Catalog support

The parser interfaces

Entities or no entities

Namespaces

Upgrading 1.x code

Thread safety

DOM Principles

A real example

Contributions

Tutorial

flat page, stylesheet

API Indexes

Alphabetic

Constructors

Functions/Types

Modules

Symbols

Related links

Mail archive

XSLT libxslt

DOM gdome2

XML-DSig xmlsec

FTP

Windows binaries

Solaris binaries

MacOsX binaries

Pascal bindings

Bug Tracker

<?php
    $query = $HTTP_GET_VARS[ "query" ];
    $scope = $HTTP_GET_VARS[ "scope" ];
    // We handle only the first argument so far
    $query = $_GET['query'];
    $query = ltrim ($query);
    if (! $query) {
        echo "
Search the documentation on XMLSoft.org
";
    }
    if ($scope == NULL)
        $scope = "any";
    $scope = ltrim ($scope);
    if ($scope == "")
        $scope = "any";
    $querystr = htmlspecialchars($query, ENT_QUOTES, 'UTF-8');

?>

 The search service indexes the libxml2 and libxslt APIs and documentation as well as the xml@gnome.org and xslt@gnome.org mailing-list archives. To use it simply provide a set of keywords:

<form action="<?php echo "$PHP_SELF", "?query=", rawurlencode($query) ?>"
      enctype="application/x-www-form-urlencoded" method="GET">
  <input name="query" type="TEXT" size="50" value="<?php echo $querystr?>">
  <select name="scope">
    <option value="any">Search All</option>
    <option value="XML" <?php if ($scope == 'XML') print "selected"?>>XML resources</option>
    <option value="XSLT" <?php if ($scope == 'XSLT') print "selected"?>>XSLT resources</option>
    <option value="API" <?php if ($scope == 'API') print "selected"?>>Only the APIs</option>
    <option value="XMLAPI" <?php if ($scope == 'XMLAPI') print "selected"?>>Only the XML API</option>
    <option value="XSLTAPI" <?php if ($scope == 'XSLTAPI') print "selected"?>>Only the XSLT API</option>
    <option value="DOCS" <?php if ($scope == 'DOCS') print "selected"?>>Only the Documentation</option>
    <option value="XMLDOC" <?php if ($scope == 'XMLDOC') print "selected"?>>Only the XML Documentation</option>
    <option value="XSLTDOC" <?php if ($scope == 'XSLTDOC') print "selected"?>>Only the XSLT Documentation</option>
    <option value="LISTS" <?php if ($scope == 'LISTS') print "selected"?>>Only the lists archives</option>
    <option value="XMLLIST" <?php if ($scope == 'XMLLIST') print "selected"?>>Only the XML list archive</option>
    <option value="XSLTLIST" <?php if ($scope == 'XSLTLIST') print "selected"?>>Only the XSLT list archive</option>
  </select>
  <input name=submit type=submit value="Search ...">
</form>
<?php
    function logQueryWord($word) {
        $result = mysql_query ("SELECT ID,Count FROM Queries WHERE Value='$word'");
	if ($result) {
	    $i = mysql_num_rows($result);
	    if ($i == 0) {
	        mysql_free_result($result);
		mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
	    } else {
	        $id = mysql_result($result, 0, 0);
		$count = mysql_result($result, 0, 1);
		$count ++;
		mysql_query ("UPDATE Queries SET Count=$count WHERE ID=$id");
	    }
	} else {
	    mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
	}
    }
    function queryWord($word) {
        $result = NULL;
	$j = 0;
        if ($word) {
	    $result = mysql_query ("SELECT words.relevance, symbols.name, symbols.type, symbols.module, symbols.descr FROM words, symbols WHERE LCASE(words.name) LIKE LCASE('$word') and words.symbol = symbols.name ORDER BY words.relevance DESC LIMIT 75");
	    if ($result) {
		$j = mysql_num_rows($result);
		if ($j == 0)
		    mysql_free_result($result);
	    }
	    logQueryWord($word);
	}
	return array($result, $j);
    }
    function queryHTMLWord($word) {
        $result = NULL;
	$j = 0;
        if ($word) {
	    $result = mysql_query ("SELECT relevance, name, id, resource, section FROM wordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
	    if ($result) {
		$j = mysql_num_rows($result);
		if ($j == 0)
		    mysql_free_result($result);
	    }
	    logQueryWord($word);
	}
	return array($result, $j);
    }
    function queryArchiveWord($word) {
        $result = NULL;
	$j = 0;
        if ($word) {
	    $result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'xml-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
	    if ($result) {
		$j = mysql_num_rows($result);
		if ($j == 0)
		    mysql_free_result($result);
	    }
	    logQueryWord($word);
	}
	return array($result, $j);
    }
    function XSLTqueryWord($word) {
        $result = NULL;
	$j = 0;
        if ($word) {
	    $result = mysql_query ("SELECT XSLTwords.relevance, XSLTsymbols.name, XSLTsymbols.type, XSLTsymbols.module, XSLTsymbols.descr FROM XSLTwords, XSLTsymbols WHERE LCASE(XSLTwords.name) LIKE LCASE('$word') and XSLTwords.symbol = XSLTsymbols.name ORDER BY XSLTwords.relevance DESC LIMIT 75");
	    if ($result) {
		$j = mysql_num_rows($result);
		if ($j == 0)
		    mysql_free_result($result);
	    }
	    logQueryWord($word);
	}
	return array($result, $j);
    }
    function XSLTqueryHTMLWord($word) {
        $result = NULL;
	$j = 0;
        if ($word) {
	    $result = mysql_query ("SELECT relevance, name, id, resource, section FROM XSLTwordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
	    if ($result) {
		$j = mysql_num_rows($result);
		if ($j == 0)
		    mysql_free_result($result);
	    }
	    logQueryWord($word);
	}
	return array($result, $j);
    }
    function XSLTqueryArchiveWord($word) {
        $result = NULL;
	$j = 0;
        if ($word) {
	    $result = mysql_query ("SELECT XSLTwordsArchive.relevance, XSLTwordsArchive.name, 'xslt-list', archives.resource, archives.title FROM XSLTwordsArchive, archives WHERE LCASE(XSLTwordsArchive.name) LIKE LCASE('$word') and XSLTwordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
	    if ($result) {
		$j = mysql_num_rows($result);
		if ($j == 0)
		    mysql_free_result($result);
	    }
	    logQueryWord($word);
	}
	return array($result, $j);
    }
    function resSort ($a, $b) {
	list($ra,$ta,$ma,$na,$da) = $a;
	list($rb,$tb,$mb,$nb,$db) = $b;
	if ($ra == $rb) return 0;
	return ($ra > $rb) ? -1 : 1;
    }
    if (($query) && (strlen($query) <= 50)) {
	$link = mysql_connect ("localhost", "nobody");
	if (!$link) {
	    echo "
 Could not connect to the database: ", mysql_error();
	} else {
	    mysql_select_db("xmlsoft", $link);
	    $list = explode (" ", $query);
	    $results = array();
	    $number = 0;
	    for ($number = 0;$number < count($list);$number++) {

		$word = $list[$number];
		if (($scope == 'any') || ($scope == 'XML') ||
		    ($scope == 'API') || ($scope == 'XMLAPI')) {
		    list($result, $j) = queryWord($word);
		    if ($j > 0) {
			for ($i = 0; $i < $j; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $type = mysql_result($result, $i, 2);
			    $module = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    if (array_key_exists($name, $results)) {
				list($r,$t,$m,$d,$w,$u) = $results[$name];
				$results[$name] = array(($r + $relevance) * 2,
							$t,$m,$d,$w,$u);
			    } else {
				$id = $name;
				$m = strtolower($module);
				$url = "html/libxml-$module.html#$id";
				$results[$name] = array($relevance,$type,
						$module, $desc, $name, $url);
			    }
			}
			mysql_free_result($result);
		    }
		}
		if (($scope == 'any') || ($scope == 'XSLT') ||
		    ($scope == 'API') || ($scope == 'XSLTAPI')) {
		    list($result, $j) = XSLTqueryWord($word);
		    if ($j > 0) {
			for ($i = 0; $i < $j; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $type = mysql_result($result, $i, 2);
			    $module = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    if (array_key_exists($name, $results)) {
				list($r,$t,$m,$d,$w,$u) = $results[$name];
				$results[$name] = array(($r + $relevance) * 2,
							$t,$m,$d,$w,$u);
			    } else {
				$id = $name;
				$m = strtolower($module);
				$url = "XSLT/html/libxslt-$module.html#$id";
				$results[$name] = array($relevance,$type,
						$module, $desc, $name, $url);
			    }
			}
			mysql_free_result($result);
		    }
		}
		if (($scope == 'any') || ($scope == 'XML') ||
		    ($scope == 'DOCS') || ($scope == 'XMLDOC')) {
		    list($result, $k) = queryHTMLWord($word);
		    if ($k > 0) {
			for ($i = 0; $i < $k; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $id = mysql_result($result, $i, 2);
			    $module = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    if (strncmp($module, "libxml-", 7) == 0)
			        $url = "html/$module";
			    if ($id != "") {
				$url = $url + "#$id";
			    }
			    $results["$name _html_ $number _ $i"] =
					  array($relevance, "XML docs",
						$module, $desc, $name, $url);
			}
			mysql_free_result($result);
		    }
		}
		if (($scope == 'any') || ($scope == 'XSLT') ||
		    ($scope == 'DOCS') || ($scope == 'XSLTDOC')) {
		    list($result, $k) = XSLTqueryHTMLWord($word);
		    if ($k > 0) {
			for ($i = 0; $i < $k; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $id = mysql_result($result, $i, 2);
			    $module = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    $url = "XSLT/$module";
			    if ($id != "") {
				$url = $url + "#$id";
			    }
			    $results["$name xslthtml $number _ $i "] =
					  array($relevance, "XSLT docs",
						$module, $desc, $name, $url);
			}
			mysql_free_result($result);
		    }
		}
		if (($scope == 'any') || ($scope == 'XML') ||
		    ($scope == 'LISTS') || ($scope == 'XMLLIST')) {
		    list($result, $j) = queryArchiveWord($word);
		    if ($j > 0) {
			for ($i = 0; $i < $j; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $type = mysql_result($result, $i, 2);
			    $url = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    if (array_key_exists($url, $results)) {
				list($r,$t,$m,$d,$w,$u) = $results[$url];
				$results[$name] = array(($r + $relevance) * 2,
							$t,$m,$d,$w,$u);
			    } else {
				$id = $name;
				$m = strtolower($module);
				$u = str_replace(
			"http://mail.gnome.org/archives/xml/", "", $url);
				$results[$url] = array($relevance,$type,
						$u, $desc, $name, $url);
			    }
			}
			mysql_free_result($result);
		    }
		}
		if (($scope == 'any') || ($scope == 'XSLT') ||
		    ($scope == 'LISTS') || ($scope == 'XSLTLIST')) {
		    list($result, $j) = XSLTqueryArchiveWord($word);
		    if ($j > 0) {
			for ($i = 0; $i < $j; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $type = mysql_result($result, $i, 2);
			    $url = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    if (array_key_exists($url, $results)) {
				list($r,$t,$m,$d,$w,$u) = $results[$url];
				$results[$name] = array(($r + $relevance) * 2,
							$t,$m,$d,$w,$u);
			    } else {
				$id = $name;
				$m = strtolower($module);
				$u = str_replace(
			"http://mail.gnome.org/archives/xslt/", "", $url);
				$results[$url] = array($relevance,$type,
						$u, $desc, $name, $url);
			    }
			}
			mysql_free_result($result);
		    }
		}
	    }
	    if ((count($results) == 0) && (count($list) == 1)) {
		$word = $list[0];
		if (($scope == 'any') || ($scope == 'XML') ||
		    ($scope == 'API') || ($scope == 'XMLAPI')) {
		    list($result, $j) = queryWord("xml$word");
		    if ($j > 0) {
			for ($i = 0; $i < $j; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $type = mysql_result($result, $i, 2);
			    $module = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    if (array_key_exists($name, $results)) {
				list($r,$t,$m,$d,$w,$u) = $results[$name];
				$results[$name] = array(($r + $relevance) * 2,
							$t,$m,$d,$w,$u);
			    } else {
				$id = $name;
				$m = strtolower($module);
				$url = "html/libxml-$module.html#$id";
				$results[$name] = array($relevance,$type,
						$module, $desc, $name, $url);
			    }
			}
			mysql_free_result($result);
		    }
		}
		if (($scope == 'any') || ($scope == 'XSLT') ||
		    ($scope == 'API') || ($scope == 'XSLTAPI')) {
		    list($result, $j) = XSLTqueryWord("xslt$word");
		    if ($j > 0) {
			for ($i = 0; $i < $j; $i++) {
			    $relevance = mysql_result($result, $i, 0);
			    $name = mysql_result($result, $i, 1);
			    $type = mysql_result($result, $i, 2);
			    $module = mysql_result($result, $i, 3);
			    $desc = mysql_result($result, $i, 4);
			    if (array_key_exists($name, $results)) {
				list($r,$t,$m,$d,$w,$u) = $results[$name];
				$results[$name] = array(($r + $relevance) * 2,
							$t,$m,$d,$w,$u);
			    } else {
				$id = $name;
				$m = strtolower($module);
				$url = "XSLT/html/libxslt-$module.html#$id";
				$results[$name] = array($relevance,$type,
						$module, $desc, $name, $url);
			    }
			}
			mysql_free_result($result);
		    }
		}
	    }
	    mysql_close($link);
	    $nb = count($results);
	    echo "
Found $nb results for query $querystr
\n";
	    usort($results, "resSort");

            if ($nb > 0) {
		printf("

\n");
		printf("
Quality	Symbol	Type	module	Description
\n");
		$i = 0;
		while (list ($name, $val) = each ($results)) {
		    list($r,$t,$m,$d,$s,$u) = $val;
		    $m = str_replace("<", "<", $m);
		    $s = str_replace("<", "<", $s);
		    $d = str_replace("<", "<", $d);
		    echo "
$r	$s	$t	$m	$d
";
		    $i = $i + 1;
		    if ($i > 75)
		        break;
		}
		printf("

\n");
	    }
	}
    }
?>


<?php
$drupalPath = $argv[1];
$configFile = $argv[2];
require($drupalPath);
$fh = fopen($configFile, 'w') or die("can't open file");

$wpSetting = $databases["default"]["default"]["database"];
fwrite($fh, "DB_NAME=$wpSetting\n");

$wpSetting = $databases["default"]["default"]["username"];
fwrite($fh, "DB_USER=$wpSetting\n");

$wpSetting = $databases["default"]["default"]["password"];
fwrite($fh, "DB_PASSWORD=$wpSetting\n");

$wpSetting = $databases["default"]["default"]["host"];
fwrite($fh, "DB_HOST=$wpSetting\n");

$files = get_included_files();
fwrite($fh, "INCLUDED_FILES=");
foreach ($files as $file)
{
    if ($file != __FILE__)
    {
        fwrite($fh, "${file};");
    }
}

fclose($fh);
?>


<?php
$settingsPath = $argv[1];
$configFile = $argv[2];
require($settingsPath);
$fh = fopen($configFile, 'w') or die("can't open file");

$config = new JConfig();
$setting = $config->db;
fwrite($fh, "DB_NAME=$setting\n");

$setting = $config->user;
fwrite($fh, "DB_USER=$setting\n");

$setting = $config->password;
fwrite($fh, "DB_PASSWORD=$setting\n");

$setting = $config->host;
fwrite($fh, "DB_HOST=$setting\n");

$files = get_included_files();
fwrite($fh, "INCLUDED_FILES=");
foreach ($files as $file)
{
    if ($file != __FILE__)
    {
        fwrite($fh, "${file};");
    }
}

fclose($fh);
?>


<?php
$wpPath = $argv[1];
$configFile = $argv[2];
require($wpPath);
$fh = fopen($configFile, 'w') or die("can't open file");

$wpSetting = DB_NAME;
fwrite($fh, "DB_NAME=$wpSetting\n");

$wpSetting = DB_USER;
fwrite($fh, "DB_USER=$wpSetting\n");

$wpSetting = DB_PASSWORD;
fwrite($fh, "DB_PASSWORD=$wpSetting\n");

$wpSetting = DB_HOST;
fwrite($fh, "DB_HOST=$wpSetting\n");

$wpSetting = WP_SITEURL;
fwrite($fh, "WP_SITEURL=$wpSetting\n");

$files = get_included_files();
fwrite($fh, "INCLUDED_FILES=");
foreach ($files as $file)
{
    if ($file != __FILE__)
    {
        fwrite($fh, "${file};");
    }
}

fclose($fh);
?>


<?php
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

declare(strict_types=1);

use App\Application\Settings\SettingsInterface;
use DI\ContainerBuilder;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Monolog\Processor\UidProcessor;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

return function (ContainerBuilder $containerBuilder) {
    $containerBuilder->addDefinitions([
        LoggerInterface::class => function (ContainerInterface $c) {
            $settings = $c->get(SettingsInterface::class);

            $loggerSettings = $settings->get('logger');
            $logger = new Logger($loggerSettings['name']);

            $processor = new UidProcessor();
            $logger->pushProcessor($processor);

            $handler = new StreamHandler($loggerSettings['path'], $loggerSettings['level']);
            $logger->pushHandler($handler);

            return $logger;
        },
    ]);
};


<?php
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

use OpenTelemetry\API\Common\Instrumentation\Globals;
use OpenTelemetry\API\Trace\Span;
use OpenTelemetry\API\Trace\SpanKind;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\App;

function calculateQuote($jsonObject): float
{
    $quote = 0.0;
    $childSpan = Globals::tracerProvider()->getTracer('manual-instrumentation')
        ->spanBuilder('calculate-quote')
        ->setSpanKind(SpanKind::KIND_INTERNAL)
        ->startSpan();
    $childSpan->addEvent('Calculating quote');

    try {
        if (!array_key_exists('numberOfItems', $jsonObject)) {
            throw new \InvalidArgumentException('numberOfItems not provided');
        }
        $numberOfItems = intval($jsonObject['numberOfItems']);
        $quote = round(8.90 * $numberOfItems, 2);

        $childSpan->setAttribute('app.quote.items.count', $numberOfItems);
        $childSpan->setAttribute('app.quote.cost.total', $quote);

        $childSpan->addEvent('Quote calculated, returning its value');
    } catch (\Exception $exception) {
        $childSpan->recordException($exception);
    } finally {
        $childSpan->end();
        return $quote;
    }
}

return function (App $app) {
    $app->post('/getquote', function (Request $request, Response $response) {
        $span = Span::getCurrent();
        $span->addEvent('Received get quote request, processing it');

        $jsonObject = $request->getParsedBody();

        $data = calculateQuote($jsonObject);

        $payload = json_encode($data);
        $response->getBody()->write($payload);

        $span->addEvent('Quote processed, response sent back', [
            'app.quote.cost.total' => $data
        ]);

        return $response
            ->withHeader('Content-Type', 'application/json');
    });
};