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

ZFFramework use these container types:

  • all other C++ containers, such as std::vector, can be used directly
  • ZFCoreArray/ZFCoreMap
    C++-style container similar to std::vector / std::map, may not so efficient compared to STL containers, used to reduce dependency, use only if necessary
    array.add("element");
    const zfstring &e = array[0];
    // can hold string as key type and any type as value type,
    // while value type can only be wrapped by ZFCorePointer
    // see #ZFCorePointerBase and #ZFCoreMap for more info
    #define zfnew(Type,...)
    same as new defined for future use
    Definition ZFCoreTypeDef_ClassType.h:89
    light weight array
    Definition ZFCoreArray.h:317
    void add(T_Element const &e)
    add element
    Definition ZFCoreArray.h:490
    core map type for private use only
    Definition ZFCoreMap.h:26
    void set(const zfchar *key, const ZFCorePointerBase &value)
    change value or create if not exist, value would be retained by this method
    see ZFCorePointer
    Definition ZFCorePointer.h:417
  • 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:163