src/cx/tree.h

changeset 900
793fe631e877
parent 899
303a981e6834
equal deleted inserted replaced
899:303a981e6834 900:793fe631e877
860 * Creates a new tree structure based on the specified layout. 860 * Creates a new tree structure based on the specified layout.
861 * 861 *
862 * The specified \p allocator will be used for creating the tree struct 862 * The specified \p allocator will be used for creating the tree struct
863 * and SHALL be used by \p create_func to allocate memory for the nodes. 863 * and SHALL be used by \p create_func to allocate memory for the nodes.
864 * 864 *
865 * \attention This function will also register a simple destructor which 865 * \note This function will also register a simple destructor which
866 * will free the nodes with the allocator's free() method. 866 * will free the nodes with the allocator's free() method.
867 * 867 *
868 * @param allocator the allocator that shall be used 868 * @param allocator the allocator that shall be used
869 * @param create_func a function that creates new nodes 869 * @param create_func a function that creates new nodes
870 * @param search_func a function that compares two nodes 870 * @param search_func a function that compares two nodes
895 * 895 *
896 * Nodes created by \p create_func MUST contain #cx_tree_node_base_s as first 896 * Nodes created by \p create_func MUST contain #cx_tree_node_base_s as first
897 * member (or at least respect the default offsets specified in the tree 897 * member (or at least respect the default offsets specified in the tree
898 * struct) and they MUST be allocated with the default stdlib allocator. 898 * struct) and they MUST be allocated with the default stdlib allocator.
899 * 899 *
900 * \attention This function will also register a simple destructor which 900 * \note This function will also register a simple destructor which
901 * will free the nodes with the default stdlib allocator. 901 * will free the nodes with the default stdlib allocator.
902 * 902 *
903 * @param create_func a function that creates new nodes 903 * @param create_func a function that creates new nodes
904 * @param search_func a function that compares two nodes 904 * @param search_func a function that compares two nodes
905 * @return the new tree 905 * @return the new tree

mercurial