LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2006 INRIA | 3 * Copyright (c) 2006 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 */ | 18 */ |
19 | 19 |
20 #include "ns3/ptr.h" | 20 #include "ns3/ptr.h" |
21 #include "ns3/object.h" | 21 #include "ns3/object.h" |
| 22 #include "ns3/command-line.h" |
| 23 |
22 #include <iostream> | 24 #include <iostream> |
23 | 25 |
24 /** | 26 /** |
25 * \file | 27 * \file |
26 * \ingroup core-examples | 28 * \ingroup core-examples |
27 * \ingroup ptr | 29 * \ingroup ptr |
28 * Example program illustrating use of the ns3::Ptr smart pointer. | 30 * Example program illustrating use of the ns3::Ptr smart pointer. |
29 */ | 31 */ |
30 | 32 |
31 using namespace ns3; | 33 using namespace ns3; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // get the raw pointer and release it. | 115 // get the raw pointer and release it. |
114 PtrExample *raw = GetPointer (prev); | 116 PtrExample *raw = GetPointer (prev); |
115 prev = 0; | 117 prev = 0; |
116 raw->Method (); | 118 raw->Method (); |
117 raw->Unref (); | 119 raw->Unref (); |
118 } | 120 } |
119 | 121 |
120 | 122 |
121 return 0; | 123 return 0; |
122 } | 124 } |
LEFT | RIGHT |