Changes between Version 3 and Version 4 of TopdlLibrary


Ignore:
Timestamp:
Oct 5, 2012 11:35:00 AM (12 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TopdlLibrary

    v3 v4  
    7373}}}
    7474
    75 That is, inner class parameters can be specified using dicts directly, and a top level dict can user the standard ** operator.
     75That is, inner class parameters can be specified using dicts directly, and a top level dict can user the standard ** operator
    7676
     77== Topdl Class Features ==
     78
     79All topdl classes implement the following methods:
     80
     81 {{{set_attribute(self, key, value)}}}::
     82   Attach an user-defined attribute with the given key and value to this object; value and key are strings.  The method includes a key/value pair (encoded as an [TopdlLibrary#Attribute attribute object]) into the {{{attribute}}} member of the object.  If an attribute with the given key exists, it is overwritten.
     83   This method accesses the attribute member of the given object, not any named members. Objects that do not have an {{{attribute}}} member silently discard the operation.
     84 {{{get_attribute(self, key)}}}::
     85   Return the attribute of this object with the given key.  The attribute - a string - is returned.  If no such attribute exists, or the object has no {{{attribute}}} member, return None.
     86 {{{remove_attribute(self, key)}}}::
     87   If an attribute with the given key exists, remove it.
     88 {{{clone(self)}}}::
     89   Returns a deep copy of this object.
     90 {{{to_dict(self)}}}::
     91   Return the object as a python dict.  No copies are made, so make modifications with caution.
     92 {{{to_xml(self)}}}::
     93   Return the XML encoding (from the topdl language) of this object (and nested objects)
    7794
    7895== Computer Class ==
     
    108125   A list of strings that describe the valid operations on the machine.  These are generally used by the federation system, and their definition is somewhat in flux.The list may be empty.
    109126
     127
     128
    110129= Examples =
    111130