Hook.h hurricane/Error.h hurricane/Hooks.h Component.h Hurricane::Hook Hurricane INSPECTOR_P_SUPPORT (Hurricane::Hook) INSPECTOR_P_SUPPORT Hurricane::Hook //**************************************************************************************************** //File:./hurricane/Hook.h //Authors:R.Escassut //Copyright(c)BULLS.A.2000-2018,AllRightsReserved // //ThisfileispartofHurricane. // //Hurricaneisfreesoftware:youcanredistributeitand/ormodifyitunderthetermsoftheGNU //LesserGeneralPublicLicenseaspublishedbytheFreeSoftwareFoundation,eitherversion3ofthe //License,or(atyouroption)anylaterversion. // //Hurricaneisdistributedinthehopethatitwillbeuseful,butWITHOUTANYWARRANTY;withouteven //theimpliedwarrantyofMERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.SeetheLesserGNU //GeneralPublicLicenseformoredetails. // //YoushouldhavereceivedacopyoftheLesserGNUGeneralPublicLicensealongwithHurricane.If //not,see<http://www.gnu.org/licenses/>. //**************************************************************************************************** #pragmaonce #include"hurricane/Error.h" #include"hurricane/Hooks.h" namespaceHurricane{ classComponent; //**************************************************************************************************** //Hookdeclaration //**************************************************************************************************** classHook{ //********* typedefHook*(*compToHook_t)(Component*); //Attributes //********** private:staticmap<string,compToHook_t>_compToHookMap; private:Hook*_nextHook; //Constructors //************ protected:Hook(); private:Hook(constHook&hook);//notimplementedtoforbidcopyconstruction //Destructor //********** protected:virtual~Hook()noexcept(false); //Operators //********* private:Hook&operator=(constHook&hook);//notimplementedtoforbidassignment //Accessors //********* public:virtualComponent*getComponent()const=0; public:Hook*getNextHook()const; public:Hook*getPreviousHook()const; public:Hook*getMasterHook()const; public:Hook*getNextMasterHook()const; public:Hook*getPreviousMasterHook()const; public:HooksgetHooks()const; public:HooksgetSlaveHooks()const; //Filters //******* public:staticHookFiltergetIsMasterFilter(); //Predicates //********** public:virtualboolisMaster()const=0; public:boolisAttached()const; //Updators //******** public:Hook*detach(); public:Hook*attach(Hook*hook); public:Hook*merge(Hook*hook); public:void_setNextHook(Hook*hook); //Others //****** public:staticvoidaddCompToHook(conststring&,compToHook_t); public:staticHook*compToHook(conststring&tname,Component*); public:stringtoJson()const; public:virtualstring_getTypeName()const=0; public:virtualstring_getString()const=0; public:virtualRecord*_getRecord()const; }; }//EndofHurricanenamespace. INSPECTOR_P_SUPPORT(Hurricane::Hook); //**************************************************************************************************** //Copyright(c)BULLS.A.2000-2018,AllRightsReserved //****************************************************************************************************