ZFFramework
Loading...
Searching...
No Matches
Using container

ZFFramework use these container types:

  • all other C++ containers, such as std::vector, can be used directly, but must not be exported in header
  • ZFCoreArray
    C++-style container similar to std::vector, may not so efficient compared to STL containers, used to reduce dependency, use only if necessary
    array.add("element");
    const zfstring &e = array[0];
    zft_zfstring< zfchar > zfstring
    see zft_zfstring
    Definition ZFCoreTypeDef_StringType.h:15
    light weight array
    Definition ZFCoreArray.h:344
    void add(T_Element const &e)
    add element
    Definition ZFCoreArray.h:549
  • ZFContainer/ZFKeyValueContainer
    container as ZFObject, can hold ZFObject types only
    typically we have ZFArray, ZFSet, ZFHashSet as container, and ZFMap, ZFHashMap as key value container
    all container would automatically retain elements when add, and release when remove
    // can hold ZFObject types only
    array->add(zfobj<v_zfstring>());
    util class to alloc and hold ZFObject type
    Definition ZFObjectAutoPtr.h:79