#include <Environment.hpp>
A ProxyEnvironment is the interaction point for dealing with managed objects. Managed objects can take a variety of forms. For example:
- remote C++ objects on a server
- java objects in an embedded JVM
- python objects in an embedded interpreter
- or meta combinations of the above... 
◆ Sptr
◆ ~ProxyEnvironment()
  
  | 
        
          | virtual Pothos::ProxyEnvironment::~ProxyEnvironment | ( | void |  | ) |  |  | virtual | 
 
Virtual destructor for subclassing. 
 
 
◆ convertObjectToProxy()
  
  | 
        
          | virtual Proxy Pothos::ProxyEnvironment::convertObjectToProxy | ( | const Object & | local | ) |  |  | virtual | 
 
Convert a local object into a proxy object in this environment. 
- Exceptions
- 
  
    | ProxyEnvironmentConvertError | if conversion failed |  
 
- Parameters
- 
  
    | local | an Object that contains something in local memory |  
 
- Returns
- a new Proxy that represents the Object's contents 
 
 
◆ convertProxyToObject()
  
  | 
        
          | virtual Object Pothos::ProxyEnvironment::convertProxyToObject | ( | const Proxy & | proxy | ) |  |  | virtual | 
 
Convert a proxy object in this environment into a local object. 
- Exceptions
- 
  
    | ProxyEnvironmentConvertError | if conversion failed |  
 
- Parameters
- 
  
    | proxy | a Proxy that represents an object in the environment |  
 
- Returns
- a new Object that contains something in local memory 
 
 
◆ deserialize()
  
  | 
        
          | virtual Proxy Pothos::ProxyEnvironment::deserialize | ( | std::istream & | is | ) |  |  | pure virtual | 
 
Deserialize the stream into the contents of a Proxy. 
- Exceptions
- 
  
    | ProxySerializeError | is the operation cant complete |  
 
- Parameters
- 
  
    | is | the input stream holding serialized data |  
 
- Returns
- a new proxy from the serialized data 
 
 
◆ findProxy()
  
  | 
        
          | virtual Proxy Pothos::ProxyEnvironment::findProxy | ( | const std::string & | name | ) |  |  | pure virtual | 
 
Find a proxy object given its class name. The resulting object will have calls to create class instances, make static calls, and others. 
- Exceptions
- 
  
    | ProxyEnvironmentFindError | if cannot find |  
 
- Parameters
- 
  
    | name | the name of a class in the registry |  
 
- Returns
- a Proxy representing the class 
 
 
◆ getLocalUniquePid()
  
  | 
        
          | static std::string Pothos::ProxyEnvironment::getLocalUniquePid | ( | void |  | ) |  |  | static | 
 
Static method to get the unique ID of the caller process. The ID is universally unique, based on the nodeId and pid. 
 
 
◆ getName()
  
  | 
        
          | virtual std::string Pothos::ProxyEnvironment::getName | ( | void |  | ) | const |  | pure virtual | 
 
Get the name of the environment. This should be the same name passed into the factory. 
 
 
◆ getNodeId()
  
  | 
        
          | virtual std::string Pothos::ProxyEnvironment::getNodeId | ( | void |  | ) | const |  | virtual | 
 
Get the unique ID of the node that this environment is running on. Remote environments will report the node id of the remote server. 
 
 
◆ getPeeringAddress()
  
  | 
        
          | virtual std::string Pothos::ProxyEnvironment::getPeeringAddress | ( | void |  | ) |  |  | virtual | 
 
Get the peering address of the connection for this environment. Remote environment will report the peering address of the caller as seen by the remote server's socket acceptor. 
 
 
◆ getUniquePid()
  
  | 
        
          | virtual std::string Pothos::ProxyEnvironment::getUniquePid | ( | void |  | ) | const |  | virtual | 
 
Get the unique ID of the process that this environment is running on. Remote environments will report the process id of the remote server. 
 
 
◆ make()
Create a new environment given the name of the factory. Plugins for custom BufferManagers should be located in the plugin registry: /proxy/environment/[name] 
- Exceptions
- 
  
    | ProxyEnvironmentFactoryError | if the factory function fails. |  
 
- Parameters
- 
  
    | name | the name of a ProxyEnvironment factory in the plugin tree |  | args | the proxy environment init arguments |  
 
- Returns
- a new shared pointer to a proxy environment 
 
 
◆ makeProxy() [1/2]
template<typename ValueType > 
      
        
          | Proxy Pothos::ProxyEnvironment::makeProxy | ( | ValueType && | local | ) |  | 
      
 
Convert a local object into a proxy object in this environment. Convenience templated version that takes the ValueType as input. 
 
 
◆ makeProxy() [2/2]
template<typename ValueType > 
      
        
          | Pothos::Proxy Pothos::ProxyEnvironment::makeProxy | ( | ValueType && | local | ) |  | 
      
 
 
◆ serialize()
  
  | 
        
          | virtual void Pothos::ProxyEnvironment::serialize | ( | const Proxy & | proxy, |  
          |  |  | std::ostream & | os |  
          |  | ) |  |  |  | pure virtual | 
 
Serialize the contents of the proxy into a stream. 
- Exceptions
- 
  
    | ProxySerializeError | is the operation cant complete |  
 
- Parameters
- 
  
    | proxy | the input proxy object to serialize |  | os | the output stream for the serialized data |  
 
 
 
The documentation for this class was generated from the following file: