1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: ro_RegistrationList.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 46347 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_RO_RO_REGISTRATIONLIST_H_ 17 #define NN_RO_RO_REGISTRATIONLIST_H_ 18 19 #include <nn/Handle.h> 20 #include <nn/Result.h> 21 #include <nn/types.h> 22 #include <nn/util.h> 23 24 25 namespace nn { 26 namespace ro { 27 28 //--------------------------------------------------------------------------- 29 // 30 // 31 // 32 // 33 // 34 // 35 // 36 //--------------------------------------------------------------------------- 37 class RegistrationList : private util::NonCopyable<Module> 38 { 39 private: 40 uptr m_Dummy; 41 42 public: ~RegistrationList()43 ~RegistrationList() 44 { 45 Unregister(); 46 } delete(void * p)47 void operator delete(void* p) 48 { 49 NN_UNUSED_VAR(p); 50 // Does nothing 51 } 52 53 //--------------------------------------------------------------------------- 54 // 55 // 56 // 57 // 58 // 59 // 60 // 61 // 62 //--------------------------------------------------------------------------- 63 Result Unregister(); 64 65 private: 66 RegistrationList(); 67 void* operator new(size_t size) throw (); 68 GetHead()69 uptr GetHead() { return reinterpret_cast<uptr>(this); } 70 }; 71 72 } // end of namespace ro 73 } // end of namespace nn 74 75 76 77 #endif // ifndef NN_RO_RO_REGISTRATIONLIST_H_ 78