Switch to unified view

a b/src/policies/DIF/RA/PDUFG/SingleDomainGenerator/SingleDomainGenerator.h
1
//
2
// This program is free software: you can redistribute it and/or modify
3
// it under the terms of the GNU Lesser General Public License as published by
4
// the Free Software Foundation, either version 3 of the License, or
5
// (at your option) any later version.
6
// 
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
// GNU Lesser General Public License for more details.
11
// 
12
// You should have received a copy of the GNU Lesser General Public License
13
// along with this program.  If not, see http://www.gnu.org/licenses/.
14
// 
15
16
#ifndef SingleDomainGenerator_H_
17
#define SingleDomainGenerator_H_
18
19
#include <IntPDUFG.h>
20
#include <MiniTable/MiniTable.h>
21
#include <DomainRouting/Routing.h>
22
23
#include <map>
24
#include <set>
25
26
namespace SingleDomainGenerator {
27
28
typedef std::set<RMTPort*> PortsSet;
29
typedef std::map<std::string, PortsSet> NTable;
30
31
typedef PortsSet::iterator PortsSetIt;
32
typedef NTable::iterator NTableIt;
33
34
35
class SingleDomainGenerator: public IntPDUFG {
36
public:
37
    // A new flow has been inserted/or removed
38
    virtual void insertedFlow(const Address &addr, const unsigned short &qos, RMTPort * port);
39
    virtual void removedFlow(const Address &addr, const unsigned short &qos, RMTPort * port);
40
41
    //Routing has processes a routing update
42
    virtual void routingUpdated();
43
44
protected:
45
    // Called after initialize
46
    virtual void onPolicyInit();
47
48
private:
49
    DA * difA;
50
    MiniTable::MiniTable * fwd;
51
    DMRnms::Routing * rt;
52
53
    NTable neighbours;
54
};
55
56
}
57
58
#endif /* STATICGENERATOR_H_ */