rxdict.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. #ifndef _rxdict_h
  12. #define _rxdict_h 1
  13. #include "rxobject.h"
  14. #include "AdAChar.h"
  15. #pragma pack (push, 8)
  16. class AcRxDictionaryIterator;
  17. class AcRxDictionary: public AcRxObject
  18. {
  19. public:
  20. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxDictionary, ACBASE_PORT);
  21. virtual AcRxObject* at (const ACHAR* key) const = 0;
  22. virtual AcRxObject* at (Adesk::UInt32 id) const = 0;
  23. AcRxObject* atPut (const ACHAR* key, AcRxObject* pObject);
  24. virtual AcRxObject* atPut (const ACHAR* key, AcRxObject* pObject,
  25. Adesk::UInt32& retId) = 0;
  26. virtual AcRxObject* atPut (Adesk::UInt32 id, AcRxObject* pObject) = 0;
  27. virtual Adesk::Boolean resetKey(const ACHAR* oldKey, const ACHAR* newKey) = 0;
  28. virtual Adesk::Boolean resetKey(Adesk::UInt32 id, const ACHAR* newKey) = 0;
  29. virtual Adesk::Boolean atKeyAndIdPut(const ACHAR* newKey, Adesk::UInt32 id,
  30. AcRxObject* pObject) = 0;
  31. virtual AcRxObject* remove (const ACHAR* key) = 0;
  32. virtual AcRxObject* remove (Adesk::UInt32 id) = 0;
  33. virtual Adesk::Boolean has (const ACHAR* entryName) const = 0;
  34. virtual Adesk::Boolean has (Adesk::UInt32 id) const = 0;
  35. virtual Adesk::UInt32 idAt (const ACHAR* key) const = 0;
  36. virtual const ACHAR* keyAt (Adesk::UInt32 id) const = 0;
  37. virtual Adesk::UInt32 numEntries() const = 0;
  38. virtual AcRxDictionaryIterator* newIterator(
  39. AcRx::DictIterType type = AcRx::kDictSorted) = 0;
  40. virtual Adesk::Boolean deletesObjects() const = 0;
  41. virtual Adesk::Boolean isCaseSensitive() const = 0;
  42. virtual Adesk::Boolean isSorted() const = 0;
  43. };
  44. extern "C" ACBASE_PORT AcRxDictionary* acrxSysRegistry();
  45. inline AcRxObject* AcRxDictionary::atPut(const ACHAR* key, AcRxObject* pObj)
  46. { Adesk::UInt32 temp; return atPut(key, pObj, temp); }
  47. #define acrxClassDictionary \
  48. AcRxDictionary::cast(acrxSysRegistry()->at(ACRX_CLASS_DICTIONARY))
  49. #define acrxServiceDictionary \
  50. AcRxDictionary::cast(acrxSysRegistry()->at(ACRX_SERVICE_DICTIONARY))
  51. #pragma pack (pop)
  52. #endif