mnjstwins
3/31/2016 - 6:04 PM

DynamicObject.xml

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2015.3 (Build 211U)" ts="2015-11-06 21:30:14">
<Class name="Utils.DynamicObject">
<Super>%RegisteredObject</Super>
<TimeChanged>63862,77333.461179</TimeChanged>
<TimeCreated>63862,75470.717321</TimeCreated>

<Property name="obj">
<Description>
Свойство, хранящее настоящий динамический объект</Description>
</Property>

<Method name="%OnNew">
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
	#if $$$comClassDefined("%Library.AbstractObject")
		set ..obj  = ##class(%Object).%New()
	#else
		set ..obj  = ##class(%ZEN.proxyObject).%New()		
	#endif
	Quit $$$OK
]]></Implementation>
</Method>

<Method name="%DispatchGetProperty">
<Description>
Получение динамических свойств</Description>
<Final>1</Final>
<FormalSpec>pProperty:%String</FormalSpec>
<Implementation><![CDATA[	Quit ..obj.%DispatchGetProperty(pProperty)
]]></Implementation>
</Method>

<Method name="%DispatchSetProperty">
<Description>
Установка динамических свойств</Description>
<Final>1</Final>
<FormalSpec>pProperty:%String,pValue:%String</FormalSpec>
<Implementation><![CDATA[	do ..obj.%DispatchSetProperty(pProperty,pValue)
]]></Implementation>
</Method>

<Method name="ToJSON">
<Description>
Конвертируем в JSON</Description>
<Final>1</Final>
<Implementation><![CDATA[
	#if $$$comClassDefined("%Library.AbstractObject")
		w ..obj.$toJSON()
	#else
		do ..obj.%ToJSON()
	#endif
]]></Implementation>
</Method>
</Class>
</Export>