LEFT | RIGHT |
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) 2008 INRIA | 3 * Copyright (c) 2008 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 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 Ptr<T> ptr = dynamic_cast<T*> (PeekPointer (m_value)); | 210 Ptr<T> ptr = dynamic_cast<T*> (PeekPointer (m_value)); |
211 if (ptr == 0) | 211 if (ptr == 0) |
212 { | 212 { |
213 return false; | 213 return false; |
214 } | 214 } |
215 v = ptr; | 215 v = ptr; |
216 return true; | 216 return true; |
217 } | 217 } |
218 | 218 |
219 | 219 |
220 #ifdef _WIN32 | 220 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Pointer, NS3CORELIB); |
221 ATTRIBUTE_ACCESSOR_DEFINE_LIB (Pointer,NS3CORELIB); | |
222 #else | |
223 ATTRIBUTE_ACCESSOR_DEFINE (Pointer); | |
224 #endif | |
225 | 221 |
226 template <typename T> | 222 template <typename T> |
227 Ptr<AttributeChecker> | 223 Ptr<AttributeChecker> |
228 MakePointerChecker (void) | 224 MakePointerChecker (void) |
229 { | 225 { |
230 return Create<internal::PointerChecker<T> > (); | 226 return Create<internal::PointerChecker<T> > (); |
231 } | 227 } |
232 | 228 |
233 | 229 |
234 } // namespace ns3 | 230 } // namespace ns3 |
235 | 231 |
236 #endif /* NS_POINTER_H */ | 232 #endif /* NS_POINTER_H */ |
LEFT | RIGHT |