#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...
virtual Pothos::ProxyEnvironment::~ProxyEnvironment |
( |
void |
| ) |
|
|
virtual |
Virtual destructor for subclassing.
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
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
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
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
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.
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.
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.
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.
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.
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
template<typename ValueType >
Proxy Pothos::ProxyEnvironment::makeProxy |
( |
const ValueType & |
local | ) |
|
|
inline |
Convert a local object into a proxy object in this environment. Convenience templated version that takes the ValueType as input.
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: