.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.pubsub.core.topicargspecimpl .. highlight:: python .. _wx.lib.pubsub.core.topicargspecimpl.ArgsInfo: ========================================================================================================================================== |phoenix_title| **wx.lib.pubsub.core.topicargspecimpl.ArgsInfo** ========================================================================================================================================== Encode the Message Data Specification (MDS) for a given topic. ArgsInfos form a tree identical to that of Topics in that ArgInfos have a reference to their parent and children ArgInfos, created for the parent and children topics. The only difference between an ArgsInfo and an ArgSpecGiven is that the latter is what "user thinks is ok" whereas former has been validated: the specification for this topic is a strict superset of the specification of its parent, and a strict subset of the specification of each of its children. Also, the instance can be used to check validity and filter arguments. The MDS can be created "empty", ie "incomplete", meaning it cannot yet be used to validate listener subscriptions to topics. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class ArgsInfo:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.__init__` Initialize self. See help(type(self)) for accurate signature. :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.check` Check that the message arguments given satisfy the topic message :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.filterArgs` Returns a dict which contains only those items of msgKwargs :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.getArgs` :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.getArgsDocs` :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.getCompleteAI` Get the closest arg spec, starting from self and moving to parent, :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.getOptArgs` :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.getReqdArgs` :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.hasParent` return ``True`` if self has argsInfo object as parent :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.hasSameArgs` Returns true if self has all the message arguments given, no :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.isComplete` :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.numArgs` :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.setArgsDocs` docs is a mapping from arg names to their documentation :meth:`~wx.lib.pubsub.core.topicargspecimpl.ArgsInfo.updateAllArgsFinal` This can only be called once, if the construction was done ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ArgsInfo Encode the Message Data Specification (MDS) for a given topic. ArgsInfos form a tree identical to that of Topics in that ArgInfos have a reference to their parent and children ArgInfos, created for the parent and children topics. The only difference between an ArgsInfo and an ArgSpecGiven is that the latter is what "user thinks is ok" whereas former has been validated: the specification for this topic is a strict superset of the specification of its parent, and a strict subset of the specification of each of its children. Also, the instance can be used to check validity and filter arguments. The MDS can be created "empty", ie "incomplete", meaning it cannot yet be used to validate listener subscriptions to topics. .. method:: __init__(self, topicNameTuple, specGiven, parentArgsInfo) Initialize self. See help(type(self)) for accurate signature. .. method:: check(self, msgKwargs) Check that the message arguments given satisfy the topic message data specification (MDS). Raises SenderMissingReqdMsgDataError if some required args are missing or not known, and raises SenderUnknownMsgDataError if some optional args are unknown. .. method:: filterArgs(self, msgKwargs) Returns a dict which contains only those items of msgKwargs which are defined for topic. E.g. if msgKwargs is {a:1, b:'b'} and topic arg spec is ('a',) then return {a:1}. The returned dict is valid only if check(msgKwargs) was called (or check(superset of msgKwargs) was called). .. method:: getArgs(self) .. method:: getArgsDocs(self) .. method:: getCompleteAI(self) Get the closest arg spec, starting from self and moving to parent, that is complete. So if self.isComplete() is True, then returns self, otherwise returns parent (if parent.isComplete()), etc. .. method:: getOptArgs(self) .. method:: getReqdArgs(self) .. method:: hasParent(self, argsInfo) return ``True`` if self has argsInfo object as parent .. method:: hasSameArgs(self, \*argNames) Returns true if self has all the message arguments given, no more and no less. Order does not matter. So if getArgs() returns ('arg1', 'arg2') then self.hasSameArgs('arg2', 'arg1') will return true. .. method:: isComplete(self) .. method:: numArgs(self) .. method:: setArgsDocs(self, docs) docs is a mapping from arg names to their documentation .. method:: updateAllArgsFinal(self, topicDefn) This can only be called once, if the construction was done with ArgSpecGiven.SPEC_GIVEN_NONE