Esempio n. 1
0
def get_property_value_from_list_domain(proxyInfo, propInfo):
  """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.registered_proxies."""
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
    proxyPropertyValue = prop.GetProxy(0)
    listdomain = prop.GetDomain('proxy_list')
    if listdomain:
      for i in xrange(listdomain.GetNumberOfProxies()):
        if listdomain.GetProxy(i) == proxyPropertyValue:
          info = get_proxy_info(proxyPropertyValue)
          if not info:
            info = proxy_trace_info(proxyPropertyValue, "helpers", pythonProp.Available[i])
          info.PyVariable = propInfo.PyVariable
          info.ParentProxyInfo = proxyInfo
          info.ctor_traced = True
          trace_globals.registered_proxies.append(info)

          # If capture_all_properties, record all the properties of this proxy
          if trace_globals.capture_all_properties:
            itr = servermanager.PropertyIterator(proxyPropertyValue)
            for prop in itr:
              if prop.GetInformationOnly() or prop.GetIsInternal(): continue
              trace_property_modified(info, prop)


          return "\"%s\"" % pythonProp.Available[i]
  return None
Esempio n. 2
0
def get_property_value_from_list_domain(proxyInfo, propInfo):
  """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.modified_proxies."""
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
    proxyPropertyValue = prop.GetProxy(0)
    listdomain = prop.GetDomain('proxy_list')
    if listdomain:
      for i in xrange(listdomain.GetNumberOfProxies()):
        if listdomain.GetProxy(i) == proxyPropertyValue:
          info = get_proxy_info(proxyPropertyValue)
          if not info:
            info = proxy_trace_info(proxyPropertyValue, "helpers", pythonProp.Available[i])
            info.ctor_traced = True
            # add this to known_proxies. Thus we don't ever record that the
            # proxy is "registered" or "created", but we know about it when any
            # of its properties change.
            trace_globals.known_proxies.append(info)

          info.PyVariable = propInfo.PyVariable
          info.ParentProxyInfo = proxyInfo

          # If capture_all_properties, record all the properties of this proxy
          trace_proxy_properties(info)

          return "\"%s\"" % pythonProp.Available[i]
  return None
Esempio n. 3
0
def get_property_value_from_list_domain(proxyInfo, propInfo):
    """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.modified_proxies."""
    proxy = proxyInfo.Proxy
    prop = propInfo.Prop
    pythonProp = servermanager._wrap_property(proxy, prop)
    if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
        proxyPropertyValue = prop.GetProxy(0)
        listdomain = prop.GetDomain('proxy_list')
        if listdomain:
            for i in xrange(listdomain.GetNumberOfProxies()):
                if listdomain.GetProxy(i) == proxyPropertyValue:
                    info = get_proxy_info(proxyPropertyValue)
                    if not info:
                        info = proxy_trace_info(proxyPropertyValue, "helpers",
                                                pythonProp.Available[i])
                        info.ctor_traced = True
                        # add this to known_proxies. Thus we don't ever record that the
                        # proxy is "registered" or "created", but we know about it when any
                        # of its properties change.
                        trace_globals.known_proxies.append(info)

                    info.PyVariable = propInfo.PyVariable
                    info.ParentProxyInfo = proxyInfo

                    # If capture_all_properties, record all the properties of this proxy
                    trace_proxy_properties(info)

                    return "\"%s\"" % pythonProp.Available[i]
    return None
Esempio n. 4
0
def get_property_value_from_list_domain(proxyInfo, propInfo):
  """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.registered_proxies."""
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
    proxyPropertyValue = prop.GetProxy(0)
    listdomain = prop.GetDomain('proxy_list')
    if listdomain:
      for i in xrange(listdomain.GetNumberOfProxies()):
        if listdomain.GetProxy(i) == proxyPropertyValue:
          info = get_proxy_info(proxyPropertyValue)
          if not info:
            info = proxy_trace_info(proxyPropertyValue, "helpers", pythonProp.Available[i])
          info.PyVariable = propInfo.PyVariable
          info.ParentProxyInfo = proxyInfo
          info.ctor_traced = True
          trace_globals.registered_proxies.append(info)

          # If capture_all_properties, record all the properties of this proxy
          if trace_globals.capture_all_properties:
            itr = servermanager.PropertyIterator(proxyPropertyValue)
            for prop in itr:
              if prop.GetInformationOnly() or prop.GetIsInternal(): continue
              trace_property_modified(info, prop)


          return "\"%s\"" % pythonProp.Available[i]
  return None
Esempio n. 5
0
def vector_smproperty_tostring(proxyInfo, propInfo):
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  return str(pythonProp)
Esempio n. 6
0
def vector_smproperty_tostring(proxyInfo, propInfo):
    proxy = proxyInfo.Proxy
    prop = propInfo.Prop
    pythonProp = servermanager._wrap_property(proxy, prop)
    return str(pythonProp)