Home | Trees | Index | Help |
---|
Package vobject :: Module vobject :: Class VBase |
|
object
--+
|
VBase
Component
,
ContentLine
Method Summary | |
---|---|
__init__(self,
group,
*args,
**kwds)
| |
Set behavior if name is in self.parentBehavior.knownChildren. | |
Set behavior to None. | |
Return an iterable containing the contents of the object. | |
Serialize to buf if it exists, otherwise return a string. | |
Set behavior. | |
Recursively transform native children to vanilla representations. | |
Recursively replace children with their native representation. | |
Return self transformed into a ContentLine or Component if needed. | |
Transform this object into a custom VBase subclass. | |
Call the behavior's validate method, or return True. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Instance Variable Summary | |
---|---|
behavior : The Behavior class associated with this object, which controls
validation, transformations, and encoding. | |
group : An optional group prefix, should be used only to indicate sort order
in vCards, according to RFC2426 | |
isNative : Boolean describing whether this component is a Native instance. | |
parentBehavior : The object's parent's behavior, or None if no behaviored parent
exists. |
Method Details |
---|
autoBehavior(self, cascade=False)Set behavior if name is in self.parentBehavior.knownChildren. If cascade is True, unset behavior and parentBehavior for all descendants, then recalculate behavior and parentBehavior. |
clearBehavior(self, cascade=True)Set behavior to None. Do for all descendants if cascading. |
getChildren(self)Return an iterable containing the contents of the object. |
serialize(self, buf=None, lineLength=75, validate=True)Serialize to buf if it exists, otherwise return a string. Use self.behavior.serialize if behavior exists. |
setBehavior(self, behavior, cascade=True)Set behavior. If cascade is True, autoBehavior all descendants. |
transformChildrenFromNative(self, clearBehavior=True)Recursively transform native children to vanilla representations. |
transformChildrenToNative(self)Recursively replace children with their native representation. |
transformFromNative(self)Return self transformed into a ContentLine or Component if needed. May have side effects. If it does, transformFromNative and transformToNative MUST have perfectly inverse side effects. Allowing such side effects is convenient for objects whose transformations only change a few attributes. Note that it isn't always possible for transformFromNative to be a perfect inverse of transformToNative, in such cases transformFromNative should return a new object, not self after modifications. |
transformToNative(self)Transform this object into a custom VBase subclass. transformToNative should always return a representation of this object. It may do so by modifying self in place then returning self, or by creating a new object. |
validate(self, *args, **kwds)Call the behavior's validate method, or return True. |
Instance Variable Details |
---|
behaviorThe Behavior class associated with this object, which controls validation, transformations, and encoding. |
groupAn optional group prefix, should be used only to indicate sort order in vCards, according to RFC2426 |
isNativeBoolean describing whether this component is a Native instance. |
parentBehaviorThe object's parent's behavior, or None if no behaviored parent exists. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Fri Dec 14 17:25:16 2007 | http://epydoc.sf.net |