|
1 // -*- Mode:NS3 -*- |
|
2 // |
|
3 // Copyright (c) 2006 Georgia Tech Research Corporation |
|
4 // All rights reserved. |
|
5 // |
|
6 // This program is free software; you can redistribute it and/or modify |
|
7 // it under the terms of the GNU General Public License version 2 as |
|
8 // published by the Free Software Foundation; |
|
9 // |
|
10 // This program is distributed in the hope that it will be useful, |
|
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 // GNU General Public License for more details. |
|
14 // |
|
15 // You should have received a copy of the GNU General Public License |
|
16 // along with this program; if not, write to the Free Software |
|
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 // |
|
19 // Author: George F. Riley<riley@ece.gatech.edu> |
|
20 // |
|
21 // Define the base class for all node capabilities. |
|
22 // George F. Riley, Georgia Tech, Fall 2006 |
|
23 |
|
24 #ifndef __CAPABILITY_H__ |
|
25 #define __CAPABILITY_H__ |
|
26 |
|
27 // All capabilities must implement a copy method, to allow node subclasses |
|
28 // to have a pointer to any subclass of the capability and still copy |
|
29 // correctly. |
|
30 |
|
31 namespace ns3 { |
|
32 |
|
33 const int nil=0; |
|
34 |
|
35 class Node; |
|
36 |
|
37 class Capability |
|
38 { |
|
39 public: |
|
40 Capability() : pNode(nil) {} |
|
41 virtual ~Capability() {} |
|
42 virtual Capability* Copy() const = 0; |
|
43 Node* pNode; // Node on which this capability is assigned |
|
44 }; |
|
45 |
|
46 }; // namespace ns3 |
|
47 |
|
48 #endif |