00001 // -*- c++ -*- 00002 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 00003 00004 // O S C L _ O P A Q U E _ T Y P E 00005 00006 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 00007 00018 #ifndef OSCL_OPAQUE_TYPE_H_INCLUDED 00019 #define OSCL_OPAQUE_TYPE_H_INCLUDED 00020 00021 #ifndef OSCL_BASE_H_INCLUDED 00022 #include "oscl_base.h" 00023 #endif 00024 00025 00026 00030 class Oscl_Opaque_Type_Alloc 00031 { 00032 public: 00037 virtual void construct(OsclAny* p, const OsclAny* init_val) = 0; 00038 00042 virtual void destroy(OsclAny* p) = 0; 00043 00047 virtual OsclAny* allocate(const uint32 size) = 0; 00048 00052 virtual void deallocate(OsclAny* p) = 0; 00053 }; 00054 00058 class Oscl_Opaque_Type_Compare 00059 { 00060 public: 00065 virtual void swap(OsclAny* a, const OsclAny* b) = 0; 00066 00070 virtual int compare_LT(OsclAny* a, OsclAny* b) const = 0; 00071 00075 virtual int compare_EQ(const OsclAny* a, const OsclAny* b) const = 0; 00076 00077 }; 00078 00083 class Oscl_Opaque_Type_Alloc_LL 00084 { 00085 public: 00090 virtual void construct(OsclAny* p, const OsclAny* init_val) = 0; 00091 00095 virtual void destroy(OsclAny* p) = 0; 00096 00100 virtual OsclAny* allocate(const uint32 size) = 0; 00101 00105 virtual void deallocate(OsclAny* p) = 0; 00106 00110 virtual OsclAny* get_next(const OsclAny* elem)const = 0; 00111 00115 virtual void set_next(OsclAny* elem, const OsclAny* nextelem) = 0; 00116 00120 virtual void get_data(OsclAny*elem, OsclAny*data_val) = 0; 00121 00125 virtual bool compare_data(const OsclAny*elem, const OsclAny*data_val)const = 0; 00126 }; 00127 00131 #endif 00132 00133 00134 00135 00136