arguments
=== Author: Assaf Ben Zur ===
MNS main arguments core functions and Classes.
This module holds the MnsArgument class as well as all argument handeling functions.
This module was designed to procedurally handle function arguments in order to manipulate them, generate dynamic UI's from them, and pass them along back to their creator function as an execute.
Classes
MnsArgument [Class]
MnsArgument Convieniency Class.
A class instance holds all relevant information regarding an extracted single function argument.
These class members will dectate any behavior derived from an actual function object or a method object.
Constructor: | MnsArgument(**kwargs) |
Inherits from: | object |
Class Members: |
|
Methods: |
|
MnsArgument methods
formatCommentToToolTip [MnsArgument class method]
Constructor: | formatCommentToToolTip(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Defenitions
convertChannelControlDictToAttr
Constructor: | convertChannelControlDictToAttr(channelControlDict = {}) |
Return: | list |
Arguments: |
|
Keyword Arguments: |
extractArgsFromDef
This function will extract all arguments and optional arguments from a given function object.
Returns two lists containing MnsArgument instances.
Constructor: | extractArgsFromDef(defenition) |
Return: | list (arguments MnsArgument list), list (optional arguments MnsArgument list) |
Arguments: |
|
Keyword Arguments: |
extractArgsFromSource
This function will extract all arguments and optional arguments from a given function source.
Returns two lists containing MnsArgument instances.
Constructor: | extractArgsFromSource(src) |
Return: | list (arguments MnsArgument list), list (optional arguments MnsArgument list) |
Arguments: |
|
Keyword Arguments: |
extractChennelControlDefaultFromLine
Constructor: | extractChennelControlDefaultFromLine(line = "", argAame = "") |
Return: | dict |
Arguments: |
|
Keyword Arguments: |
extractColorSchemeDefaultFromLine
Constructor: | extractColorSchemeDefaultFromLine(line = "", argAame = "") |
Return: | None |
Arguments: |
|
Keyword Arguments: |
formatArgumetsAsDict
Format given list of arguments into a predefined dictionary structure.
Constructor: | formatArgumetsAsDict(mnsArgsList = []) |
Return: | dict (Formated arguments) |
Arguments: |
|
Keyword Arguments: |
recompileArgumetsAsString
A reverse function to the 'extractArgsFromDef'.
In order to pass any arguments back to it's creator, comes a need to re-compile an argument list into a single callable formatted string.
This function covers this need.
Constructor: | recompileArgumetsAsString(defenition, arguments, optArgs, values) |
Return: | string (re-compiled arguments as string) |
Arguments: |
|
Keyword Arguments: |
returnValueAndTypeFromArgString
This function will return a value (as its actual type) and a type (as a type object) from a given extracted argument string
Constructor: | returnValueAndTypeFromArgString(argString = "") |
Return: | value (Dynamic type), type (type object) |
Arguments: |
|
Keyword Arguments: |
splitStringToArg
This function return a MnsArgument object from a given argument string.
It will split the argument string into actual elemnts and values and directly ingest them into the class members.
Constructor: | splitStringToArg(argAsString) |
Return: | MnsArgument |
Arguments: |
|
Keyword Arguments: |