|
Zapatec Utils | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--Zapatec.SRProp
Defined in zpobjects.js
Constructor Summary | |
Zapatec.SRProp(obj)
object for saving and restoring properties of the given object - SRProp (Save Restore Object Properties) |
Method Summary | |
Object
|
destroy()
Destroys an object. |
object
|
getObject()
Returns the object we are working with. |
Object
|
getProp(propName)
Gets property value by name from the savedProp array You should not overwrite this method as it is core of the object. |
object
|
getSavedProps()
Returns the hash of the saved properties. |
boolean
|
isEmpty()
Checks if hash of saved properties is empty. |
void
|
restoreAll()
Restores all properties from the savedProp array You should not overwrite this method as it is core of the object. |
Object
|
restoreProp(propName)
Restores the named property from savedProp array. |
Object
|
restoreProps(propName)
Restores the named properties from savedProp array You should not overwrite this method as it is core of the object. |
Object
|
saveProp(propName)
Saves the named property to savedProp array You should not overwrite this method as it is core of the object. |
Object
|
saveProps()
Saves the named properties to savedProp array You should not overwrite this method as it is core of the object. |
Constructor Detail |
Zapatec.SRProp(obj)
obj
- [object] - object to work with this class adds methods to any given object which enable to save and restore properties using following \code var object = {}; ob = new Zapatec.SRProp(obj); object.prop = ""; ob.saveProp("prop"); object.prop = "ttt"; ob.restoreProp("prop"); ob.restoreAll(); \endcode
Method Detail |
Object destroy()
object getObject()
Object getProp(propName)
propName
- [string] - name of the property to get - can be the followin "prop", "level1.level2" and so on.
object getSavedProps()
boolean isEmpty()
void restoreAll()
Object restoreProp(propName)
propName
- [string] - name of the property to restore - can be the followin "prop", "level1.level2" and so on.
Object restoreProps(propName)
can
- be any set of params, but only strings will be parsed.
Object saveProp(propName)
propName
- [string] - name of the property to save - can be the followin "prop", "level1.level2" and so on.
Object saveProps()
can
- be any set of params, but only strings will be parsed.
|
Zapatec Utils | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |