Disabled implicit copy constructor and assignment operator of GenObject.
Fixed bugs exposed by this change. git-svn-id: http://yate.null.ro/svn/yate/trunk@5749 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
22abbfc150
commit
83028f342a
|
@ -1334,18 +1334,6 @@ ASNObjId::~ASNObjId()
|
||||||
m_ids.clear();
|
m_ids.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
ASNObjId& ASNObjId::operator=(const String& val)
|
|
||||||
{
|
|
||||||
m_value = val;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
ASNObjId& ASNObjId::operator=(const char* val)
|
|
||||||
{
|
|
||||||
m_value.assign(val);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ASNObjId::toDataBlock()
|
void ASNObjId::toDataBlock()
|
||||||
{
|
{
|
||||||
DDebug(s_libName.c_str(),DebugAll,"ASNObjId::toDataBlock() '%s'", m_value.c_str());
|
DDebug(s_libName.c_str(),DebugAll,"ASNObjId::toDataBlock() '%s'", m_value.c_str());
|
||||||
|
|
|
@ -114,13 +114,14 @@ public:
|
||||||
*/
|
*/
|
||||||
inline AsnObject()
|
inline AsnObject()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Copy constructor
|
||||||
* @param data Data from which the object is built
|
* @param original Value object to copy
|
||||||
* @param len Length of the given data
|
|
||||||
*/
|
*/
|
||||||
AsnObject(void* data, int len)
|
inline AsnObject(const AsnObject& original)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
|
@ -181,6 +182,14 @@ public:
|
||||||
: m_type(0), m_data("")
|
: m_type(0), m_data("")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy constructor
|
||||||
|
* @param original Value object to copy
|
||||||
|
*/
|
||||||
|
inline AsnValue(const AsnValue& original)
|
||||||
|
: m_type(original.m_type), m_data(original.m_data)
|
||||||
|
{ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param value Object value
|
* @param value Object value
|
||||||
|
@ -381,7 +390,7 @@ private:
|
||||||
int maxVal;
|
int maxVal;
|
||||||
int minVal;
|
int minVal;
|
||||||
unsigned int m_index;
|
unsigned int m_index;
|
||||||
|
|
||||||
static TokenDict s_access[];
|
static TokenDict s_access[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -396,6 +405,14 @@ public:
|
||||||
*/
|
*/
|
||||||
ASNObjId();
|
ASNObjId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy constructor
|
||||||
|
* @param original OID object to copy
|
||||||
|
*/
|
||||||
|
inline ASNObjId(const ASNObjId& original)
|
||||||
|
: m_value(original.m_value), m_name(original.m_name)
|
||||||
|
{ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param val OID value in string format
|
* @param val OID value in string format
|
||||||
|
@ -420,15 +437,23 @@ public:
|
||||||
*/
|
*/
|
||||||
~ASNObjId();
|
~ASNObjId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assignment operator from OID
|
||||||
|
*/
|
||||||
|
inline ASNObjId& operator=(const ASNObjId& original)
|
||||||
|
{ m_value = original.toString(); return *this; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign operator from a string value
|
* Assign operator from a string value
|
||||||
*/
|
*/
|
||||||
ASNObjId& operator=(const String& val);
|
inline ASNObjId& operator=(const String& val)
|
||||||
|
{ m_value = val; return *this; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign operator from a const char* value
|
* Assign operator from a const char* value
|
||||||
*/
|
*/
|
||||||
ASNObjId& operator=(const char* val);
|
inline ASNObjId& operator=(const char* val)
|
||||||
|
{ m_value = val; return *this; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform the value of this OID from a string value to a sequence of numbers
|
* Transform the value of this OID from a string value to a sequence of numbers
|
||||||
|
|
|
@ -579,8 +579,6 @@ public:
|
||||||
const NamedList& params);
|
const NamedList& params);
|
||||||
virtual ~ZapCircuit()
|
virtual ~ZapCircuit()
|
||||||
{ cleanup(false); }
|
{ cleanup(false); }
|
||||||
inline const ZapDevice device() const
|
|
||||||
{ return m_device; }
|
|
||||||
virtual void destroyed()
|
virtual void destroyed()
|
||||||
{ cleanup(true); }
|
{ cleanup(true); }
|
||||||
// Change circuit status. Clear events on status change
|
// Change circuit status. Clear events on status change
|
||||||
|
|
|
@ -794,7 +794,13 @@ void operator=(const type&)
|
||||||
*/
|
*/
|
||||||
class YATE_API GenObject
|
class YATE_API GenObject
|
||||||
{
|
{
|
||||||
|
YNOCOPY(GenObject); // no automatic copies please
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Default constructor
|
||||||
|
*/
|
||||||
|
inline GenObject() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue