OLD | NEW |
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 typename AccessorTrait<U>::Result tmp; | 381 typename AccessorTrait<U>::Result tmp; |
382 bool ok = v->GetAccessor (tmp); | 382 bool ok = v->GetAccessor (tmp); |
383 if (!ok) | 383 if (!ok) |
384 { | 384 { |
385 return false; | 385 return false; |
386 } | 386 } |
387 (object->*m_setter)(tmp); | 387 (object->*m_setter)(tmp); |
388 return true; | 388 return true; |
389 } | 389 } |
390 virtual bool DoGet (const T *object, V *v) const { | 390 virtual bool DoGet (const T *object, V *v) const { |
391 NS_UNUSED(object); | 391 NS_UNUSED (object); |
392 NS_UNUSED(v); | 392 NS_UNUSED (v); |
393 return false; | 393 return false; |
394 } | 394 } |
395 virtual bool HasGetter (void) const { | 395 virtual bool HasGetter (void) const { |
396 return false; | 396 return false; |
397 } | 397 } |
398 virtual bool HasSetter (void) const { | 398 virtual bool HasSetter (void) const { |
399 return true; | 399 return true; |
400 } | 400 } |
401 void (T::*m_setter)(U); // The class set method pointer, returning void. | 401 void (T::*m_setter)(U); // The class set method pointer, returning void. |
402 }; | 402 }; |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 inline | 582 inline |
583 Ptr<const AttributeAccessor> | 583 Ptr<const AttributeAccessor> |
584 MakeAccessorHelper (T1 a1, T2 a2) | 584 MakeAccessorHelper (T1 a1, T2 a2) |
585 { | 585 { |
586 return DoMakeAccessorHelperTwo<V> (a1, a2); | 586 return DoMakeAccessorHelperTwo<V> (a1, a2); |
587 } | 587 } |
588 | 588 |
589 } // namespace ns3 | 589 } // namespace ns3 |
590 | 590 |
591 #endif /* ATTRIBUTE_ACCESSOR_HELPER_H */ | 591 #endif /* ATTRIBUTE_ACCESSOR_HELPER_H */ |
OLD | NEW |