parameters: (self, template, declType=None, holderType=None,
                   dealWithOptional=False, declArgs=None,
                   holderArgs=None)
docstring: template: A string representing the conversion code.  This will have
                    template substitution performed on it as follows:
  
            ${val} is a handle to the JS::Value in question
            ${holderName} replaced by the holder's name, if any
            ${declName} replaced by the declaration's name
            ${haveValue} replaced by an expression that evaluates to a boolean
                         for whether we have a JS::Value.  Only used when
                         defaultValue is not None or when True is passed for
                         checkForValue to instantiateJSToNativeConversion.
            ${passedToJSImpl} replaced by an expression that evaluates to a boolean
                              for whether this value is being passed to a JS-
                              implemented interface.
  
          declType: A CGThing representing the native C++ type we're converting
                    to.  This is allowed to be None if the conversion code is
                    supposed to be used as-is.
  
          holderType: A CGThing representing the type of a "holder" which will
                      hold a possible reference to the C++ thing whose type we
                      returned in declType, or  None if no such holder is needed.
  
          dealWithOptional: A boolean indicating whether the caller has to do
                            optional-argument handling.  This should only be set
                            to true if the JS-to-native conversion is being done
                            for an optional argument or dictionary member with no
                            default value and if the returned template expects
                            both declType and holderType to be wrapped in
                            Optional<>, with ${declName} and ${holderName}
                            adjusted to point to the Value() of the Optional, and
                            Construct() calls to be made on the Optional<>s as
                            needed.
  
          declArgs: If not None, the arguments to pass to the ${declName}
                    constructor.  These will have template substitution performed
                    on them so you can use things like ${val}.  This is a
                    single string, not a list of strings.
  
          holderArgs: If not None, the arguments to pass to the ${holderName}
                      constructor.  These will have template substitution
                      performed on them so you can use things like ${val}.
                      This is a single string, not a list of strings.
  
          ${declName} must be in scope before the code from 'template' is entered.
  
          If holderType is not None then ${holderName} must be in scope before
          the code from 'template' is entered.
docstring_summary: template: A string representing the conversion code.  This will have
                    template substitution performed on it as follows:
docstring_tokens: template : A string representing the conversion code . This will have template substitution performed on it as follows :
function: def __init__(self, template, declType=None, holderType=None,
                   dealWithOptional=False, declArgs=None,
                   holderArgs=None):
          """
          template: A string representing the conversion code.  This will have
                    template substitution performed on it as follows:
  
            ${val} is a handle to the JS::Value in question
            ${holderName} replaced by the holder's name, if any
            ${declName} replaced by the declaration's name
            ${haveValue} replaced by an expression that evaluates to a boolean
                         for whether we have a JS::Value.  Only used when
                         defaultValue is not None or when True is passed for
                         checkForValue to instantiateJSToNativeConversion.
            ${passedToJSImpl} replaced by an expression that evaluates to a boolean
                              for whether this value is being passed to a JS-
                              implemented interface.
  
          declType: A CGThing representing the native C++ type we're converting
                    to.  This is allowed to be None if the conversion code is
                    supposed to be used as-is.
  
          holderType: A CGThing representing the type of a "holder" which will
                      hold a possible reference to the C++ thing whose type we
                      returned in declType, or  None if no such holder is needed.
  
          dealWithOptional: A boolean indicating whether the caller has to do
                            optional-argument handling.  This should only be set
                            to true if the JS-to-native conversion is being done
                            for an optional argument or dictionary member with no
                            default value and if the returned template expects
                            both declType and holderType to be wrapped in
                            Optional<>, with ${declName} and ${holderName}
                            adjusted to point to the Value() of the Optional, and
                            Construct() calls to be made on the Optional<>s as
                            needed.
  
          declArgs: If not None, the arguments to pass to the ${declName}
                    constructor.  These will have template substitution performed
                    on them so you can use things like ${val}.  This is a
                    single string, not a list of strings.
  
          holderArgs: If not None, the arguments to pass to the ${holderName}
                      constructor.  These will have template substitution
                      performed on them so you can use things like ${val}.
                      This is a single string, not a list of strings.
  
          ${declName} must be in scope before the code from 'template' is entered.
  
          If holderType is not None then ${holderName} must be in scope before
          the code from 'template' is entered.
          """
          assert isinstance(template, str)
          assert declType is None or isinstance(declType, CGThing)
          assert holderType is None or isinstance(holderType, CGThing)
          self.template = template
          self.declType = declType
          self.holderType = holderType
          self.dealWithOptional = dealWithOptional
          self.declArgs = declArgs
          self.holderArgs = holderArgs
function_tokens: def __init__ ( self , template , declType = None , holderType = None , dealWithOptional = False , declArgs = None , holderArgs = None ) : assert isinstance ( template , str ) assert declType is None or isinstance ( declType , CGThing ) assert holderType is None or isinstance ( holderType , CGThing ) self . template = template self . declType = declType self . holderType = holderType self . dealWithOptional = dealWithOptional self . declArgs = declArgs self . holderArgs = holderArgs