convert RandomVariable to new helpers.
This commit is contained in:
1 parent
98bb7b4746
commit
7e3dade1d8
2 files changed
+13
-38
No files matched your search
@@ -302,19 +302,20 @@ RandomVariable::Peek (void) const
|
||||
RandomVariable::RandomVariable (Attribute value)
|
||||
: m_variable (0)
|
||||
{
|
||||
*this = ClassValueHelperExtractFrom<RandomVariable,RandomVariableValue> (value);
|
||||
const RandomVariableValue *v = value.DynCast<const RandomVariableValue *> ();
|
||||
if (v == 0)
|
||||
{
|
||||
NS_FATAL_ERROR ("Unexpected type of value. Expected \"RandomVariableValue\"");
|
||||
}
|
||||
*this = v->Get ();
|
||||
}
|
||||
RandomVariable::operator Attribute () const
|
||||
{
|
||||
return ClassValueHelperConvertTo<RandomVariable,RandomVariableValue> (this);
|
||||
}
|
||||
|
||||
Ptr<const AttributeChecker>
|
||||
MakeRandomVariableChecker (void)
|
||||
{
|
||||
return MakeSimpleAttributeChecker<RandomVariableValue> ();
|
||||
return Attribute::Create<RandomVariableValue> (*this);
|
||||
}
|
||||
|
||||
ATTRIBUTE_VALUE_IMPLEMENT (RandomVariable);
|
||||
ATTRIBUTE_CHECKER_IMPLEMENT (RandomVariable);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user