-
Notifications
You must be signed in to change notification settings - Fork 1
tauInterfaces
Christian Schladetsch edited this page Mar 31, 2023
·
3 revisions
These are basically C#-style interfaces, such as:
namespace MyNamespace {
interface Foo {
string Name { get; set; }
string Name2 { set; }
string Name3 { get; }
void Act();
string Add(string a, string b);
}
}
The Generator can produce Proxy and/or Agent from this interface.
For example, from the above interface, TauGenerator produces the following:
using Flow;
using Pyro;
using Pyro.Network;
using Void = Pyro.BuiltinTypes.Void;
namespace Pyro.Network.MyNamespaceProxy {
public interface IFooProxy : IProxyBase {
IFuture<string> Name { get; set; }
IFuture<string> Name2 { set; }
IFuture<string> Name3 { get; }
IFuture<Void> Act();
IFuture<string> Add(string a, string b);
}
}
using Void = Pyro.BuiltinTypes.Void;
namespace Pyro.Network.MyNamespaceAgent {
public interface IFooAgent : IAgentBase {
string Name { get; set; }
string Name2 { set; }
string Name3 { get; }
Void Act();
string Add(string a, string b);
}
}
Note that void has to be handled specially. It cannot be used directly as a type argument to IFuture<T>
, so we use Pyro.BuiltinTypes.Void
for this. This allows the caller to still await
when a call that returns nothing has been completed.
Not place Agents and Proxies in namespace Pyro.Network
by default.
Pyro Documentation. (C) 2023 [email protected]. All Rights Reserved.