Added parser method used to obtain a 'null' object reference.
git-svn-id: http://voip.null.ro/svn/yate@5830 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
53262ef06c
commit
45b6321104
|
@ -3484,6 +3484,13 @@ ExpOperation* JsParser::nullClone(const char* name)
|
|||
return TelEngine::null(name) ? s_null.ExpOperation::clone() : s_null.clone(name);
|
||||
}
|
||||
|
||||
// Return the "null" object
|
||||
JsObject* JsParser::nullObject()
|
||||
{
|
||||
JsObject* n = YOBJECT(JsObject,s_null.object());
|
||||
return (n && n->ref()) ? n : 0;
|
||||
}
|
||||
|
||||
// Check if an object is identic to null
|
||||
bool JsParser::isNull(const ExpOperation& oper)
|
||||
{
|
||||
|
|
|
@ -2536,6 +2536,12 @@ public:
|
|||
*/
|
||||
static ExpOperation* nullClone(const char* name = 0);
|
||||
|
||||
/**
|
||||
* Obtain the "null" object
|
||||
* @return Referenced "null" object (0 if ref() fails)
|
||||
*/
|
||||
static JsObject* nullObject();
|
||||
|
||||
/**
|
||||
* Check if an operation holds a null value
|
||||
* @return True if the operation holds a null object
|
||||
|
|
Loading…
Reference in New Issue