~ubuntu-branches/ubuntu/quantal/ns3/quantal

« back to all changes in this revision

Viewing changes to ns-3.12.1/src/core/model/pointer.cc

  • Committer: Package Import Robot
  • Author(s): YunQiang Su, Aron Xu, YunQiang Su, Upstream
  • Date: 2012-01-06 00:35:42 UTC
  • mfrom: (10.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120106003542-vcn5g03mhapm991h
Tags: 3.13+dfsg-1
[ Aron Xu ]:
        add tag binary and binary-indep, 
  for not build doc when --binary-arch (Closes: #654493).
[ YunQiang Su ]
        add waf 1.5/1.6 source to debian directory, 
  and build waf from there (Closes: #642217).
[ Upstream ]
  Successfully link with --as-needed option (Closes: #642225).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
 
/*
3
 
 * Copyright (c) 2008 INRIA
4
 
 *
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
7
 
 * published by the Free Software Foundation;
8
 
 *
9
 
 * This program is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
 * GNU General Public License for more details.
13
 
 *
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
16
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 
 *
18
 
 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
 
 */
20
 
#include "pointer.h"
21
 
 
22
 
namespace ns3 {
23
 
 
24
 
PointerValue::PointerValue ()
25
 
  : m_value ()
26
 
{
27
 
}
28
 
 
29
 
PointerValue::PointerValue (Ptr<Object> object)
30
 
  : m_value (object)
31
 
{
32
 
}
33
 
 
34
 
void
35
 
PointerValue::SetObject (Ptr<Object> object)
36
 
{
37
 
  m_value = object;
38
 
}
39
 
 
40
 
Ptr<Object>
41
 
PointerValue::GetObject (void) const
42
 
{
43
 
  return m_value;
44
 
}
45
 
 
46
 
Ptr<AttributeValue>
47
 
PointerValue::Copy (void) const
48
 
{
49
 
  return Create<PointerValue> (*this);
50
 
}
51
 
std::string
52
 
PointerValue::SerializeToString (Ptr<const AttributeChecker> checker) const
53
 
{
54
 
  std::ostringstream oss;
55
 
  oss << m_value;
56
 
  return oss.str ();
57
 
}
58
 
 
59
 
bool 
60
 
PointerValue::DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker)
61
 
{
62
 
  NS_FATAL_ERROR ("It is not possible to deserialize a pointer.");
63
 
  return false;
64
 
}
65
 
 
66
 
} // namespace ns3