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: 00033 virtual ~Oscl_Opaque_Type_Alloc() {} 00034 00039 virtual void construct(OsclAny* p, const OsclAny* init_val) = 0; 00040 00044 virtual void destroy(OsclAny* p) = 0; 00045 00049 virtual OsclAny* allocate(const uint32 size) = 0; 00050 00054 virtual void deallocate(OsclAny* p) = 0; 00055 }; 00056 00060 class Oscl_Opaque_Type_Compare 00061 { 00062 public: 00063 virtual ~Oscl_Opaque_Type_Compare() {} 00064 00069 virtual void swap(OsclAny* a, const OsclAny* b) = 0; 00070 00074 virtual int compare_LT(OsclAny* a, OsclAny* b) const = 0; 00075 00079 virtual int compare_EQ(const OsclAny* a, const OsclAny* b) const = 0; 00080 00081 }; 00082 00087 class Oscl_Opaque_Type_Alloc_LL 00088 { 00089 public: 00090 virtual ~Oscl_Opaque_Type_Alloc_LL() {} 00091 00096 virtual void construct(OsclAny* p, const OsclAny* init_val) = 0; 00097 00101 virtual void destroy(OsclAny* p) = 0; 00102 00106 virtual OsclAny* allocate(const uint32 size) = 0; 00107 00111 virtual void deallocate(OsclAny* p) = 0; 00112 00116 virtual OsclAny* get_next(const OsclAny* elem)const = 0; 00117 00121 virtual void set_next(OsclAny* elem, const OsclAny* nextelem) = 0; 00122 00126 virtual void get_data(OsclAny*elem, OsclAny*data_val) = 0; 00127 00131 virtual bool compare_data(const OsclAny*elem, const OsclAny*data_val)const = 0; 00132 }; 00133 00137 #endif 00138 00139 00140 00141 00142