ucx/map.h

changeset 225
a1a068c2c4ef
parent 209
4f02199d8aae
child 250
b7d1317b138e
     1.1 --- a/ucx/map.h	Thu Sep 08 12:04:01 2016 +0200
     1.2 +++ b/ucx/map.h	Thu Sep 08 15:12:56 2016 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  /*
     1.5   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     1.6   *
     1.7 - * Copyright 2015 Olaf Wintermann. All rights reserved.
     1.8 + * Copyright 2016 Olaf Wintermann. All rights reserved.
     1.9   *
    1.10   * Redistribution and use in source and binary forms, with or without
    1.11   * modification, are permitted provided that the following conditions are met:
    1.12 @@ -59,7 +59,7 @@
    1.13   * 
    1.14   * @param key the variable name for the key
    1.15   * @param value the variable name for the value
    1.16 - * @param iter an UcxMapIterator
    1.17 + * @param iter a UcxMapIterator
    1.18   * @see ucx_map_iterator()
    1.19   */
    1.20  #define UCX_MAP_FOREACH(key,value,iter) \
    1.21 @@ -68,13 +68,13 @@
    1.22  /** Type for the UCX map. @see UcxMap */
    1.23  typedef struct UcxMap          UcxMap;
    1.24  
    1.25 -/** Type for a key of an UcxMap. @see UcxKey */
    1.26 +/** Type for a key of a UcxMap. @see UcxKey */
    1.27  typedef struct UcxKey          UcxKey;
    1.28  
    1.29 -/** Type for an element of an UcxMap. @see UcxMapElement */
    1.30 +/** Type for an element of a UcxMap. @see UcxMapElement */
    1.31  typedef struct UcxMapElement   UcxMapElement;
    1.32  
    1.33 -/** Type for an iterator over an UcxMap. @see UcxMapIterator */
    1.34 +/** Type for an iterator over a UcxMap. @see UcxMapIterator */
    1.35  typedef struct UcxMapIterator  UcxMapIterator;
    1.36  
    1.37  /** Structure for the UCX map. */
    1.38 @@ -89,7 +89,7 @@
    1.39      size_t        count;
    1.40  };
    1.41  
    1.42 -/** Structure for a key of an UcxMap. */
    1.43 +/** Structure for a key of a UcxMap. */
    1.44  struct UcxKey {
    1.45      /** The key data. */
    1.46      void   *data;
    1.47 @@ -99,7 +99,7 @@
    1.48      int    hash;
    1.49  };
    1.50  
    1.51 -/** Structure for an element of an UcxMap. */
    1.52 +/** Structure for an element of a UcxMap. */
    1.53  struct UcxMapElement {
    1.54      /** The value data. */
    1.55      void          *data;
    1.56 @@ -111,7 +111,7 @@
    1.57      UcxKey        key;
    1.58  };
    1.59  
    1.60 -/** Structure for an iterator over an UcxMap. */
    1.61 +/** Structure for an iterator over a UcxMap. */
    1.62  struct UcxMapIterator {
    1.63      /** The map to iterate over. */
    1.64      UcxMap        *map;
    1.65 @@ -136,7 +136,7 @@
    1.66  UcxMap *ucx_map_new(size_t size);
    1.67  
    1.68  /**
    1.69 - * Creates a new hash map with the specified size using an UcxAllocator.
    1.70 + * Creates a new hash map with the specified size using a UcxAllocator.
    1.71   * @param allocator the allocator to use
    1.72   * @param size the size of the hash map
    1.73   * @return a pointer to the new hash map
    1.74 @@ -357,13 +357,13 @@
    1.75      ucx_map_remove(map, ucx_key((void*)&key, sizeof(key)))
    1.76  
    1.77  /**
    1.78 - * Creates an UcxKey based on the given data.
    1.79 + * Creates a UcxKey based on the given data.
    1.80   * 
    1.81   * This function implicitly computes the hash.
    1.82   * 
    1.83   * @param data the data for the key
    1.84   * @param len the length of the data
    1.85 - * @return an UcxKey with implicitly computed hash
    1.86 + * @return a UcxKey with implicitly computed hash
    1.87   * @see ucx_hash()
    1.88   */
    1.89  UcxKey ucx_key(void *data, size_t len);
    1.90 @@ -380,14 +380,14 @@
    1.91  /**
    1.92   * Creates an iterator for a map.
    1.93   * 
    1.94 - * <b>Note:</b> An UcxMapIterator iterates over all elements in all element
    1.95 + * <b>Note:</b> A UcxMapIterator iterates over all elements in all element
    1.96   * lists successively. Therefore the order highly depends on the key hashes and
    1.97   * may vary under different map sizes. So generally you may <b>NOT</b> rely on
    1.98   * the iteration order.
    1.99   * 
   1.100   * <b>Note:</b> The iterator is <b>NOT</b> initialized. You need to call
   1.101   * ucx_map_iter_next() at least once before accessing any information. However,
   1.102 - * it is not recommended to access the fields of an UcxMapIterator directly.
   1.103 + * it is not recommended to access the fields of a UcxMapIterator directly.
   1.104   * 
   1.105   * @param map the map to create the iterator for
   1.106   * @return an iterator initialized on the first element of the

mercurial