Package fife :: Package extensions :: Package serializers :: Module xmlobject :: Class XMLObjectSaver
[hide private]
[frames] | no frames]

Class XMLObjectSaver

source code

builtins.object --+
                  |
                 XMLObjectSaver

The XMLObjectSaver serializes a fife.Object instance by saving it back to its XML file


Note:

Instance Methods [hide private]
 
__init__(self, engine, debug=False, compat=True) source code
 
save(self, object)
saves the data of a fife.Object to its xml file
source code
 
save_actions(self, actions, object)
save action definitions
source code
 
save_animation(self, animation_id, object)
save animation definitions for the given id
source code
 
save_images(self, images, object)
save image definitions
source code
Class Variables [hide private]
  PROCESSING_INSTRUCTION = '<?fife type="object"?>'
Instance Variables [hide private]
bool change
flag if object data differs from file data
bool compat
flag to either use outdated xml definitions or new approach
bool debug
flag to activate/deactivate debug output
fife engine
pointer to initialized fife engine instance
fife.ImageManager img_manager
pointer to fife image manager
fife.VFS vfs
pointer to fife vfs
Method Details [hide private]

__init__(self, engine, debug=False, compat=True)
(Constructor)

source code 
Parameters:
  • engine (fife) - intialized fife engine

save(self, object)

source code 

saves the data of a fife.Object to its xml file

Parameters:
  • object (fife.Object) - the object which should be saved @rtype bool @return flag whether the saving was successful or not

save_actions(self, actions, object)

source code 

save action definitions

Parameters:
  • actions (list) - list of <action> elements
  • object (fife.Object) - the object which should be saved

save_animation(self, animation_id, object)

source code 

save animation definitions for the given id

Parameters:
  • animation_id (str) - id of the animation data structure
  • object (fife.Object) - the object which should be saved

save_images(self, images, object)

source code 

save image definitions

Parameters:
  • images (list) - list of <image> elements
  • object (fife.Object) - the object which should be saved