19 #include "ns3/core-module.h"
28 static TypeId GetTypeId (
void);
42 .AddConstructor<FormattingTestObject> ()
43 .AddAttribute (
"OnTime",
"A RandomVariableStream used to pick the duration of the 'On' state.",
44 StringValue (
"ns3::ConstantRandomVariable[Constant=1.0]"),
46 MakePointerChecker <RandomVariableStream>())
58 return m_testVariable;
79 m_factory.Set (name, value);
85 return m_factory.Create ();
89 main (
int argc,
char *argv[])
140 Ptr<Object> outputObj = formattingHelper.CreateFromFactory ();
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Hold variables of type string.
Hold a value for an Attribute.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Instantiate subclasses of ns3::Object.
A base class which provides memory management and object aggregation.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.