INET Framework for OMNeT++/OMNEST
ansaOspfInterfaceState6.h
Go to the documentation of this file.
00001 //
00002 // This program is free software: you can redistribute it and/or modify
00003 // it under the terms of the GNU Lesser General Public License as published by
00004 // the Free Software Foundation, either version 3 of the License, or
00005 // (at your option) any later version.
00006 // 
00007 // This program is distributed in the hope that it will be useful,
00008 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 // GNU Lesser General Public License for more details.
00011 // 
00012 // You should have received a copy of the GNU Lesser General Public License
00013 // along with this program.  If not, see http://www.gnu.org/licenses/.
00014 // 
00015 
00016 #ifndef ANSAOSPFINTERFACESTATE6_H_
00017 #define ANSAOSPFINTERFACESTATE6_H_
00018 
00019 #include "ansaOspfInterface6.h"
00020 
00021 namespace AnsaOspf6 {
00022 
00023 class InterfaceState {
00024    protected:
00025       void ChangeState(Interface* intf, InterfaceState* newState, InterfaceState* currentState);
00026       void CalculateDesignatedRouter(Interface* intf);
00027 
00028    public:
00029       virtual ~InterfaceState() {}
00030 
00031       virtual void ProcessEvent(Interface* intf, Interface::InterfaceEventType event) = 0;
00032       virtual Interface::InterfaceStateType GetState(void) const = 0;
00033 };
00034 
00035 }
00036 
00037 #endif /* ANSAOSPFINTERFACESTATE6_H_ */