src/routing/olsr/olsr.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 02 Jan 2008 09:25:31 +0100
changeset 2231 a5b898c1ee2c
parent 1801 522029e3b8a6
child 2249 3a1da26d61dc
permissions -rw-r--r--
fix bug 122: get rid of duplicate argument to QueryInterface
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1733
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     2
/*
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     3
 * Copyright (c) 2007 INESC Porto
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     4
 *
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     8
 *
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    12
 * GNU General Public License for more details.
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    13
 *
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    17
 *
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    18
 * Author: Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    19
 */
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    20
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    21
#include "olsr-agent.h"
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    22
#include "olsr.h"
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    23
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    24
namespace ns3 { namespace olsr {
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    25
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    26
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    27
void
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    28
EnableAllNodes (void)
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    29
{
1735
9675c6b5452c Patch from Mathieu, makes EnableNodes templated
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1733
diff changeset
    30
  EnableNodes <NodeList::Iterator> (NodeList::Begin (), NodeList::End ());
1733
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    31
}
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    32
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    33
void
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    34
EnableNode (Ptr<Node> node)
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    35
{
1801
522029e3b8a6 Put everything OLSR into the 'olsr' C++ namespace, for consistency.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1778
diff changeset
    36
  ComponentManager::Create<olsr::Agent, Ptr<Node> >
2231
a5b898c1ee2c fix bug 122: get rid of duplicate argument to QueryInterface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1801
diff changeset
    37
    (olsr::Agent::cid, node)->Start ();
1733
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    38
}
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    39
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    40
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    41
}} // namespace ns3, olsr
9552d9836732 Add a simpler olsr::EnableAllNodes API as suggested by Mathieu.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    42