/** make the object invalid */ public void MakeNil() { m_ptr = null; }
public void Assign(string value) { if(get()==null || GetMyType() != NPLObjectType.NPLObjectType_String) { m_ptr = new NPLStringObject(); } (m_ptr as NPLStringObject).SetValue(value); }
public System.Collections.IEnumerator GetEnumerator() { if(get()==null || GetMyType() != NPLObjectType.NPLObjectType_Table) { m_ptr = new NPLTable(); } return (m_ptr as NPLTable).GetEnumerator(); }
public void Assign(bool value) { if(get()==null || GetMyType() != NPLObjectType.NPLObjectType_Bool) { m_ptr = new NPLBoolObject(); } (m_ptr as NPLBoolObject).SetValue(value); }
public void Assign(int value) { if (get() == null || GetMyType() != NPLObjectType.NPLObjectType_Number) { m_ptr = new NPLNumberObject(); } (m_ptr as NPLNumberObject).SetValue((double)value); }
public void Assign(NPLObjectProxy value) { m_ptr = value.m_ptr; }
public NPLObjectProxy this[int nIndex] { set { if (get() == null || GetMyType() != NPLObjectType.NPLObjectType_Table) { m_ptr = new NPLTable(); } (m_ptr as NPLTable)[nIndex] = value; } get { if (get() == null || GetMyType() != NPLObjectType.NPLObjectType_Table) { m_ptr = new NPLTable(); } return (m_ptr as NPLTable).CreateGetField(nIndex); } }
/** this will create get field. */ public NPLObjectProxy this[string sName] { set { if (get() == null || GetMyType() != NPLObjectType.NPLObjectType_Table) { m_ptr = new NPLTable(); } (m_ptr as NPLTable)[sName] = value; } get { if (get() == null || GetMyType() != NPLObjectType.NPLObjectType_Table) { m_ptr = new NPLTable(); } return (m_ptr as NPLTable).CreateGetField(sName); } }
public NPLObjectProxy(NPLObjectBase obj) { m_ptr=obj; }
public NPLObjectProxy() { m_ptr=null; }