ns3::ObjectBase Class Reference
[Object]

implement the ns-3 type and attribute system More...

#include <object-base.h>

Inheritance diagram for ns3::ObjectBase:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual TypeId GetInstanceTypeId (void) const =0
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::ObjectBase.

Protected Member Functions

virtual void NotifyConstructionCompleted (void)
void ConstructSelf (const AttributeList &attributes)


Detailed Description

implement the ns-3 type and attribute system

Every class which wants to integrate in the ns-3 type and attribute system should derive from this base class. This base class provides:


Member Function Documentation

void ns3::ObjectBase::ConstructSelf ( const AttributeList attributes  )  [protected]

Parameters:
attributes the attribute values used to initialize the member variables of this object's instance.
Invoked from subclasses to initialize all of their attribute members. This method will typically be invoked automatically from ns3::CreateObject if your class derives from ns3::Object. If you derive from ns3::ObjectBase directly, you should make sure that you invoke this method from your most-derived constructor.

void ns3::ObjectBase::GetAttribute ( std::string  name,
AttributeValue value 
) const

Parameters:
name the name of the attribute to read
value a reference to the value where the result should be stored.
Returns:
the attribute read.
If the input attribute name does not exist, this method crashes.

bool ns3::ObjectBase::GetAttributeFailSafe ( std::string  name,
AttributeValue attribute 
) const

Parameters:
name the name of the attribute to read
attribute the attribute where the result value should be stored
Returns:
true if the requested attribute was found, false otherwise.
If the input attribute name does not exist, this method crashes.

virtual TypeId ns3::ObjectBase::GetInstanceTypeId ( void   )  const [pure virtual]

static TypeId ns3::ObjectBase::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::ObjectBase.

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented in ns3::OnOffApplication, ns3::PacketSink, ns3::UdpEchoClient, ns3::UdpEchoServer, ns3::Chunk, ns3::ErrorModel, ns3::RateErrorModel, ns3::ListErrorModel, ns3::Header, ns3::Tag, ns3::Trailer, ns3::ConfigStore, ns3::Object, ns3::BridgeChannel, ns3::BridgeNetDevice, ns3::CsmaChannel, ns3::CsmaNetDevice, ns3::EmuNetDevice, ns3::PointToPointChannel, ns3::PointToPointNetDevice, ns3::PppHeader, ns3::TapBridge, ns3::VirtualNetDevice, ns3::AarfWifiManager, ns3::AarfcdWifiManager, ns3::AdhocWifiMac, ns3::AmrrWifiManager, ns3::ArfWifiManager, ns3::CaraWifiManager, ns3::ConstantRateWifiManager, ns3::DcaTxop, ns3::IdealWifiManager, ns3::JakesPropagationLossModel, ns3::MsduAggregator, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::OnoeWifiManager, ns3::PropagationDelayModel, ns3::RandomPropagationDelayModel, ns3::ConstantSpeedPropagationDelayModel, ns3::PropagationLossModel, ns3::RandomPropagationLossModel, ns3::FriisPropagationLossModel, ns3::LogDistancePropagationLossModel, ns3::ThreeLogDistancePropagationLossModel, ns3::NakagamiPropagationLossModel, ns3::FixedRssLossModel, ns3::RraaWifiManager, ns3::WifiChannel, ns3::WifiMacQueue, ns3::WifiMac, ns3::WifiNetDevice, ns3::WifiPhy, ns3::WifiRemoteStationManager, ns3::YansErrorRateModel, ns3::YansWifiChannel, ns3::YansWifiPhy, ns3::ArpCache, ns3::ArpHeader, ns3::ArpL3Protocol, ns3::Ipv4Interface, ns3::Ipv4L3Protocol, ns3::Ipv4L4Protocol, ns3::LoopbackNetDevice, ns3::NscTcpL4Protocol, ns3::NscTcpSocketImpl, ns3::TcpHeader, ns3::TcpL4Protocol, ns3::TcpSocketImpl, ns3::UdpHeader, ns3::UdpL4Protocol, ns3::UdpSocketImpl, ns3::ConstantAccelerationMobilityModel, ns3::ConstantPositionMobilityModel, ns3::ConstantVelocityMobilityModel, ns3::HierarchicalMobilityModel, ns3::MobilityModel, ns3::PositionAllocator, ns3::ListPositionAllocator, ns3::GridPositionAllocator, ns3::RandomRectanglePositionAllocator, ns3::RandomDiscPositionAllocator, ns3::RandomDirection2dMobilityModel, ns3::RandomWalk2dMobilityModel, ns3::RandomWaypointMobilityModel, ns3::Application, ns3::Channel, ns3::DropTailQueue, ns3::EthernetHeader, ns3::EthernetTrailer, ns3::Ipv4Header, ns3::Ipv4RawSocketFactory, ns3::Ipv6Header, ns3::LlcSnapHeader, ns3::NetDevice, ns3::Node, ns3::PacketSocketFactory, ns3::PacketSocket, ns3::Queue, ns3::SimpleChannel, ns3::SimpleNetDevice, ns3::SocketFactory, ns3::SocketAddressTag, ns3::SocketIpTtlTag, ns3::SocketSetDontFragmentTag, ns3::TcpSocketFactory, ns3::TcpSocket, ns3::UdpSocketFactory, ns3::UdpSocket, ns3::rapidnet::Database, ns3::rapidnet::RapidNetApplicationBase, ns3::rapidnet::RapidNetHeader, ns3::rapidnet::RelationBase, ns3::rapidnet::Relation, ns3::rapidnet::TempRelation, ns3::rapidnet::TupleAttribute, ns3::rapidnet::Tuple, ns3::GlobalRouter, ns3::Ipv4GlobalRouting, ns3::Ipv4ListRouting, ns3::Ipv4StaticRouting, ns3::CalendarScheduler, ns3::HeapScheduler, ns3::ListScheduler, ns3::MapScheduler, ns3::Ns2CalendarScheduler, ns3::Scheduler, and ns3::Synchronizer.

virtual void ns3::ObjectBase::NotifyConstructionCompleted ( void   )  [protected, virtual]

This method is invoked once all member attributes have been initialized. Subclasses can override this method to be notified of this event but if they do this, they must chain up to their parent's NotifyConstructionCompleted method.

void ns3::ObjectBase::SetAttribute ( std::string  name,
const AttributeValue value 
)

Parameters:
name the name of the attribute to set
value the name of the attribute to set
Set a single attribute. This cannot fail: if the input is invalid, it will crash immediately.

bool ns3::ObjectBase::SetAttributeFailSafe ( std::string  name,
const AttributeValue value 
)

Parameters:
name the name of the attribute to set
value the name of the attribute to set
Returns:
true if the requested attribute exists and could be set, false otherwise.

bool ns3::ObjectBase::TraceConnect ( std::string  name,
std::string  context,
const CallbackBase &  cb 
)

Parameters:
name the name of the targetted trace source
context the trace context associated to the callback
cb the callback to connect to the trace source.
The targetted trace source should be registered with TypeId::AddTraceSource.

bool ns3::ObjectBase::TraceConnectWithoutContext ( std::string  name,
const CallbackBase &  cb 
)

Parameters:
name the name of the targetted trace source
cb the callback to connect to the trace source.
The targetted trace source should be registered with TypeId::AddTraceSource.

bool ns3::ObjectBase::TraceDisconnect ( std::string  name,
std::string  context,
const CallbackBase &  cb 
)

Parameters:
name the name of the targetted trace source
context the trace context associated to the callback
cb the callback to disconnect from the trace source.
The targetted trace source should be registered with TypeId::AddTraceSource.

bool ns3::ObjectBase::TraceDisconnectWithoutContext ( std::string  name,
const CallbackBase &  cb 
)

Parameters:
name the name of the targetted trace source
cb the callback to disconnect from the trace source.
The targetted trace source should be registered with TypeId::AddTraceSource.


The documentation for this class was generated from the following files:

Generated on Fri Apr 9 15:01:08 2010 for NS-3 by  doxygen 1.5.8