@@ -460,37 +460,38 @@ Key (element / lookup type):
460
460
- `i_keytoraw` *Func* - Convertion func to *i_keyraw* from *i_key*. **[required if]** *i_keyraw* is defined
461
461
462
462
Val (mapped value type - for maps):
463
- - These are analogues to the Key parameters, i.e. `i_valdrop`, `i_valclone`, etc.
463
+ - These are analogues to the Key parameters, i.e. `i_valdrop`, `i_valclone`, `i_valraw`, etc.
464
464
465
465
The following meta-template parameters can be specified instead of ***i_key***, ***i_val***, and ***i_keyraw***.
466
466
These parameters make types into "classes" in the sense that they bind associated function names to the primary
467
467
template parameters described above. This reduces boiler-plate code, clutter, and simplifies the management
468
468
of non-trivial container elements. Note that many basic template parameters will defined when defining the
469
469
following parameters, but the user may override them when needed. E.g. defining the template parameters directly
470
470
as function macros instead of referring to C function names.
471
- - Key-meta parameters:
472
- - `i_rawclass` *RawType* - Defines ***i_keyraw*** and binds *RawType_cmp()*, *RawType_eq()*, *RawType_hash()* to
473
- their associated template key parameters .
474
- - If neither ***i_key*** nor ***i_keyclass*** are defined, ***i_key*** will be defined as *RawType*.
471
+ - Key parameters:
472
+ - `i_rawclass` *RawType* - Defines ***i_keyraw*** and binds *RawType_cmp()*, *RawType_eq()*, *RawType_hash()*
473
+ to ***i_cmp***, ***i_eq***, and ***i_hash*** .
474
+ - If neither ***i_key*** nor ***i_keyclass*** are defined, ***i_key*** is defined as *RawType*.
475
475
- Useful for containers of views (like csview).
476
476
- `i_keyclass` *KeyType* - Defines ***i_key*** and binds standard named functions *KeyType_clone()* and
477
- *KeyType_drop()* to ***i_keyclone*** and ***i_keydrop***.
477
+ *KeyType_drop()* to ***i_keyclone*** / ***i_keydrop***. If `i_keyraw` is also specified, *KeyType_from()*
478
+ and *KeyType_toraw()* are bound to ***i_keyfrom*** / ***i_keytoraw***.
478
479
- Use with container of containers, or in general when the element type has *_clone()* and *_drop()* "member" functions.
479
- - If ***i_rawclass*** is defined, *KeyType_from()* and *KeyType_toraw()* will be name-bound to ***i_keyfrom*** and ***i_keytoraw***.
480
- - Otherwise, ***i_rawclass*** will be defined as *KeyType*
481
- - In both cases ***i_rawclass*** is defined, so also the comparison functions will be name-bound to template parameters.
482
- - `i_keypro` *KeyType* - Use with "pro" types, i.e. library types like **cstr**, **box** and **arc**.
483
- It combines all the ***i_keyclass*** and ***i_rawclass*** features. Defining ***i_keypro*** is like defining
484
- - ***i_keyclass*** *KeyType*
480
+ - `i_keypro` *KeyType* - Use with "pro"-element types, i.e. library types like **cstr**, **box** and **arc**.
481
+ It combines all the ***i_keyclass*** and ***i_rawclass*** properties. Defining ***i_keypro*** is like defining
485
482
- ***i_rawclass*** *KeyType*_***raw***.
486
- - Val-meta (mapped) parameters:
483
+ - ***i_keyclass*** *KeyType*
484
+ - I.e. `i_key`, `i_keyclone`, `i_keydrop`, `i_keyraw`, `i_keyfrom`, `i_keytoraw`, `i_cmp`, `i_eq`, `i_hash` will all be defined/bound.
485
+ - Val (mapped) parameters:
487
486
- `i_valclass` *MappedType* - Analogous to the ***i_keyclass*** parameter.
488
- - `i_valpro` *MappedType* - Defines ***i_keyraw*** and combines the ***i_valclass*** features (comparison functions
489
- are not relevant for the mapped type).
487
+ - `i_valpro` *MappedType* - Comparison functions are not relevant for the mapped type, so this defines
488
+ - ***i_valraw*** *MappedType*_***raw***
489
+ - ***i_valclass*** *MappedType*
490
+ - I.e. `i_val`, `i_valclone`, `i_valdrop`, `i_valraw`, `i_valfrom`, `i_valtoraw` will all be defined/bound.
490
491
491
492
Properties:
492
493
- `i_opt` *Flags* - Boolean properties: may combine *c_no_clone*, *c_no_atomic*, *c_declared*, *c_static*,
493
- *c_header* with the *|* separator.
494
+ *c_header* with the `|` separator.
494
495
495
496
**Notes**:
496
497
- You can define `i_no_clone` or `i_opt c_no_clone | c_... | ...` to disable *clone* functionality.
0 commit comments