Custom Platform Support Development Kit  1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FCM::IFCMDictionary Class Referenceabstract

Defines the interface that represents the dictionary. More...

#include <IFCMDictionary.h>

Inheritance diagram for FCM::IFCMDictionary:
FCM::IFCMUnknown

Public Member Functions

virtual FCM::Result _FCMCALL Add (CStringRep8 pKey, FCMDictRecTypeID type, FCM::PVoid value, FCM::U_Int32 valueLen)=0
 Inserts a value for a given key into a dictionary. More...
 
virtual FCM::Result _FCMCALL AddLevel (CStringRep8 pKey, PIFCMDictionary &ppDict)=0
 Create a dictionary and places it inside another under a given key. Optionally returns the new dict (if ppDict is not NULL). The dict returned is "owned" by outer dict and does not need to be released by the caller. More...
 
virtual FCM::Result _FCMCALL Remove (CStringRep8 pKey)=0
 Removes an entry for the given key from a dictionary. For reference counted types, count will simply be decremented. More...
 
virtual FCM::Result _FCMCALL Get (CStringRep8 pKey, FCMDictRecTypeID type, FCM::PVoid pValue, FCM::U_Int32 &valueLen)=0
 Returns a value from a dictionary given its key. The param value should be allocated and the allocation length should be passed in param valueLen. If the allocated buffer is less than the value stored in the dictionary then FCM_DICT_ERR_BUFFERTOOSMALL is returned. If the allocated buffer is greater than (or) equal to the length of value in dictionary then value in dictionary is coped into value param and the valueLen param is set to the length of value in dictionary. More...
 
virtual FCM::Result _FCMCALL Clear ()=0
 Removes all the values in dictionary. More...
 
virtual FCM::Result _FCMCALL Count (FCM::U_Int32 &count)=0
 Fetches the number of entries in the dictionary. More...
 
virtual FCM::Result _FCMCALL GetNth (FCM::U_Int32 index, StringRep8 &pKey, FCMDictRecTypeID &type, FCM::U_Int32 &valueLen)=0
 Returns info on the nth entry in a dictionary. More...
 
virtual FCM::Result _FCMCALL GetInfo (CStringRep8 pKey, FCMDictRecTypeID &type, FCM::U_Int32 &valueLen)=0
 Returns info on the entry with the given key in a dictionary. More...
 
- Public Member Functions inherited from FCM::IFCMUnknown
virtual FCM::Result _FCMCALL QueryInterface (ConstRefFCMIID pInterfaceID, FCM::PPVoid ppvObj)=0
 Return pointers to supported interfaces on given object. More...
 
virtual FCM::U_Int32 _FCMCALL AddRef ()=0
 Increments the reference count on the given object. More...
 
virtual FCM::U_Int32 _FCMCALL Release ()=0
 Decrements the reference count on the given object. More...
 

Detailed Description

Defines the interface that represents the dictionary.

Member Function Documentation

virtual FCM::Result _FCMCALL FCM::IFCMDictionary::Add ( CStringRep8  pKey,
FCMDictRecTypeID  type,
FCM::PVoid  value,
FCM::U_Int32  valueLen 
)
pure virtual

Inserts a value for a given key into a dictionary.

Parameters
pKey(IN) The key for the value being stored.
type(IN) The type of value being stored and it should be of type FCMDictRecTypeID.
value(IN) The value being stored.
valueLen(IN) The length of the value being stored.
Returns
FCM_SUCCESS is returned for success, else an error code is returned.
virtual FCM::Result _FCMCALL FCM::IFCMDictionary::AddLevel ( CStringRep8  pKey,
PIFCMDictionary &  ppDict 
)
pure virtual

Create a dictionary and places it inside another under a given key. Optionally returns the new dict (if ppDict is not NULL). The dict returned is "owned" by outer dict and does not need to be released by the caller.

Parameters
pKey(IN) The key for the dictionary being created.
ppDict(OUT) Set with the new dictionary created.
Returns
FCM_SUCCESS is returned for success, else an error code is returned.
virtual FCM::Result _FCMCALL FCM::IFCMDictionary::Clear ( )
pure virtual

Removes all the values in dictionary.

Returns
FCM_SUCCESS is returned for success. Otherwise an error code is returned.
virtual FCM::Result _FCMCALL FCM::IFCMDictionary::Count ( FCM::U_Int32 count)
pure virtual

Fetches the number of entries in the dictionary.

Parameters
count(OUT) Populated with the number of entries in the dictionary.
Returns
FCM_SUCCESS is returned for success, else an error code is returned.
virtual FCM::Result _FCMCALL FCM::IFCMDictionary::Get ( CStringRep8  pKey,
FCMDictRecTypeID  type,
FCM::PVoid  pValue,
FCM::U_Int32 valueLen 
)
pure virtual

Returns a value from a dictionary given its key. The param value should be allocated and the allocation length should be passed in param valueLen. If the allocated buffer is less than the value stored in the dictionary then FCM_DICT_ERR_BUFFERTOOSMALL is returned. If the allocated buffer is greater than (or) equal to the length of value in dictionary then value in dictionary is coped into value param and the valueLen param is set to the length of value in dictionary.

Parameters
pKey(IN) The key for value being looked for.
type(IN) The type of value being looked for and it should be of type FCMDictRecTypeID.
pValue(OUT) The value corresponding to the key is copied into this parameter.
valueLen(IN-OUT) The length of buffer allocated for value param.In successful case would conatin the actual length of value in the dictionary.
Returns
FCM_SUCCESS is returned for success, else an error code is returned.
virtual FCM::Result _FCMCALL FCM::IFCMDictionary::GetInfo ( CStringRep8  pKey,
FCMDictRecTypeID type,
FCM::U_Int32 valueLen 
)
pure virtual

Returns info on the entry with the given key in a dictionary.

Parameters
pKey(IN) The key of the entry being looked for.
type(OUT) The type of the entry with the given key is copied into this parameter.
valueLen(OUT) The length of the entry with the given key is copied into this parameter.
Returns
FCM_SUCCESS is returned for success, else an error code is returned.
virtual FCM::Result _FCMCALL FCM::IFCMDictionary::GetNth ( FCM::U_Int32  index,
StringRep8 pKey,
FCMDictRecTypeID type,
FCM::U_Int32 valueLen 
)
pure virtual

Returns info on the nth entry in a dictionary.

Parameters
index(IN) The location of the entry in dictionary for which we need info. Index should range from 1 to Count.
pKey(OUT) The key of the nth entry is copied into this parameter. Should be freed using IFCMCalloc interface.
type(OUT) The type of the nth entry is copied into this parameter.
valueLen(OUT) The length of the nth entry is copied into this parameter.
Returns
FCM_SUCCESS is returned for success. Otherwise an error code is returned.
virtual FCM::Result _FCMCALL FCM::IFCMDictionary::Remove ( CStringRep8  pKey)
pure virtual

Removes an entry for the given key from a dictionary. For reference counted types, count will simply be decremented.

Parameters
pKey(IN) The key for value being removed.
Returns
FCM_SUCCESS is returned for success, else an error code is returned.

The documentation for this class was generated from the following file: