// ccafe.sidl is a generated file. // Edit ccafe.sidl.in and rerun configure instead // or remember to put changes in ccafe.sidl.in before // rerunning configure. /** This is a wrapper only the ccaffeine framework can successfully create. */ class ConnectionEventService implements-all gov.cca.ports.ConnectionEventService { void initialize(in opaque gizzard); } // end class ConnectionEventService /** This is a wrapper class. It cannot be successfully constructed directly from component or client code. Only the ccaffeine framework internals know how to initialize this object. */ class Services implements-all gov.cca.Services { void initialize(in opaque g); void doReleaseCallbacks(); /** fetch up a pointer for static casting. if the name supplied is not exactly right, returns null. */ opaque getWrapped(in string className); /** get port name */ string genUniquePortName(in string base); } // end class Services /** This is a wrapper class. It cannot be successfully constructed directly from component or client code. Only the ccaffeine framework internals know how to initialize this object. */ class ComponentID implements-all gov.cca.ComponentID { void initialize( in opaque opaque_ComponentID_addr ); } // end class ComponentID /** This is a wrapper class. It cannot be successfully constructed directly from component or client code. Only the ccaffeine framework internals know how to initialize this object. Components must use Services.createTypeMap. */ class TypeMap implements-all gov.cca.TypeMap { /** unless this function is properly called, the ccaffeine::TypeMap in question will do nothing but generate exceptions. */ void initialize( in opaque opaque_TypeMap_addr ); } //class Exception implements-all gov.cca.CCAException { // /** init the exception with a type and message. */ // void initialize( in gov.cca.CCAExceptionType et, in string message); // /** init the exception with a type and use stock message. */ // void initialize[Type]( in gov.cca.CCAExceptionType et); // /** init the exception with a message and type CCAExceptionType_Nonstandard. */ // void initialize[Message]( in string message); //} // end class Exception class CCAException extends sidl.SIDLException implements-all gov.cca.CCAException { gov.cca.CCAExceptionType getCCAExceptionType(); void setCCAExceptionType( in gov.cca.CCAExceptionType et ); } // end class CCAException /** Component writers can throw this instead of CCAException if they feel the urge. */ class TypeMismatchException extends ccaffeine.CCAException implements-all gov.cca.TypeMismatchException { gov.cca.CCAExceptionType getCCAExceptionType(); gov.cca.Type getRequestedType(); gov.cca.Type getActualType(); void initializeTypes( in gov.cca.Type requestedType, in gov.cca.Type actualType ); } // end class TypeMismatchException /** * NOTE: the BuilderServices should be treated * as a port with the get/release BuilderService functions. * Mixing this with gov.cca.AbstractFramework presents * implementation problems. */ class AbstractFramework implements-all gov.cca.AbstractFramework { /** Meant to be something like a commandline arguments for the * this Ccaffeine framework object. Currently supported: * * --path /a/place/for/components:another/place/for/components:... * Ccaffeine will discover the components in the path. * --load a:colon-separated:list:of:components * load specified components into the pallet. */ void initialize(in string args); /** * @param driver: any implementation of the driver interface. * driver.DriverBody will be appropriately invoked. */ void run(inout BabelMain driver); } // end class AbstractFramework /** This is a wrapper class. It cannot be successfully constructed directly from component or client code. Only the ccaffeine framework internals know how to initialize this object. */ class ConnectionID implements-all gov.cca.ConnectionID { void initialize( in opaque opaque_ConnectionID_addr ); } // end class ConnectionID /** This is a wrapper class. It cannot be successfully constructed directly from component or client code. Only the ccaffeine framework internals know how to initialize this object. */ class ComponentClassDescription implements-all gov.cca.ComponentClassDescription { void initialize( in opaque opaque_ComponentClassDescription_addr ); } // end class ComponentClassDescription package ports { /** This is a wrapper class. It cannot be successfully constructed directly from component or client code. Only the ccaffeine framework internals know how to initialize this object. If you want to use one, you should get it as a port only in the form 'gov.cca.ports.BuilderService'. */ class BuilderService implements-all gov.cca.ports.BuilderService { /** @param ccafeopq_BuilderService_port a ::ccafeopq::BuilderService * cast to void *. The pointer will be deleted when the babel wrapper is destroyed. */ void initialize(in opaque ccafeopq_BuilderService_port); } /** This is a wrapper class. It cannot be successfully constructed directly from component or client code. Only the ccaffeine framework internals know how to initialize this object. */ class ConnectionEvent implements-all gov.cca.ports.ConnectionEvent { void initialize( in gov.cca.ports.EventType eventType, in gov.cca.TypeMap portProperties ); } /** This is a wrapper class. It should not be used directly from component code. It should be access only in the form 'gov.cca.ports.ComponentRepository', not 'ccaffeine.ComponentRepository'. */ class ComponentRepository implements-all gov.cca.ports.ComponentRepository { } /////////////////////////////////////////////////////////////////////// /** Foreign ports (i.e. Ports of a different (non)cca binding) are * wrapped by Ccaffeine in this class. If a foreign port is * connected to a Babel component, an instance of * ccaffeine::PortTranslator is wrapped around it. Moreover, if a * PortTranslator is exported through the addProvidesPort method on * Services, the contained port will be automatically delt with as * if the component belonged to the exported port's religion. * Several methods are provided on PortTranslator that will allow * access to the other Religions. The methods return the foreign * port as a void* and this is castable to exactly the indicated * Port type, and nothing else. Further cast is required to get the * base Port type to a particular Port in the foreign * Religion. Example: PortTranslator pt = getPort("my_classic_parameter_port"); classic::gov::cca::Port* port = static_cast < classic::gov::cca::Port* > (pt.getClassicPort()); if(port == NULL) { perror("Hey this is not a Classic Port"); } ParameterPort* pp = dynamic_cast< ParameterPort* > (port); if(pp == NULL) { perror("Hey this is not a ParameterPort"); } // use the pp now as you would in Classic Religion ... * Note that the following shortcut will yield unexpected results * and does not conform to the C++ standard: // This is a REALLY BAD IDEA, *DO NOT DO THIS*: PortTranslator pt = getPort("my_classic_parameter_port"); ParameterPort* pp = (ParameterPort*) (pt.getClassicPort()); SEE ALSO: The principal use of this port has been to get at classic parameter ports. Those users should instead consider using the babel-native ParameterPort or the BasicParameterPort defined in the specification. This will make their component code much cleaner and less ccaffeine-cruft dependent. */ class PortTranslator implements gov.cca.Port { /** Must be initialized with a ::ccafeopq::Port* */ void initialize(in opaque opaquePort); /** Return a classic port. The void * returned in C++ are * directly castable to a C++ classic::gov::cca::Port* and only * that type. Casting to the specific type must occur after. */ opaque getClassicPort(); /** unimplemented, returns NULL. */ opaque getChasmPort(); /** Return a raw OpaquePort. The void * in C++ is directly * castable to a ccafeopq::Port*. */ opaque getRawPort(); /** Create a new PortTranslator wrapper with a classic::gov::cca::Port*. If the type does not match this specifically, unexpected results may occur, or more likely, all get methods will return NULL.*/ static PortTranslator createFromClassic(in opaque classic_Port_ptr); /** Create a new PortTranslator wrapper with a ::ccafeopq::Port*. If the type does not match this specifically, unexpected results may occur, or more likely, all get methods will return NULL. */ static PortTranslator createFromRaw(in opaque ccafeopq_Port_ptr); } /////////////////////////////////////////////////////////////////////// /** ccaffeine implementation of cca standard. */ class ParameterPortFactoryWrap implements-all gov.cca.ports.ParameterPortFactory { /** passed in is a void * cast pointer of * ccafeopq::ports::ParameterPortFactory *. */ void initialize(in opaque ccafeopq_ports_ParameterPortFactory_star); /** fetch up a pointer for static casting. if the name supplied is not exactly right, returns null. */ opaque getWrapped(in string className); } // end interface ParameterPortFactoryWrap /** The implementation of the babel ParameterPort is a wrapper. The component writer cannot create an instance of this independently and succeed. The component writer must use the port ParameterPortFactory, not _create() of this class. */ class ParameterPortWrap implements-all gov.cca.ports.ParameterPort { /** passed in is a void * cast pointer of * ccafeopq::ports::ParameterPort *. */ void initialize(in opaque ccafeopq_ports_ParameterPort_star); /** fetch up a pointer for static casting. if the name supplied is not exactly right, returns null. */ opaque getWrapped(in string className); } // end class ParameterPortWrap /** The implementation of the babel ParameterPort is a wrapper. The component writer cannot create an instance of this independently and succeed. The component writer must use the port gov.cca.ports.BasicParameterPort, not this class. */ class BasicParameterPortWrap implements-all gov.cca.ports.BasicParameterPort { /** passed in is a void * cast pointer of * ccafeopq::ports::BasicParameterPort *. */ void initialize(in opaque ccafeopq_ports_BasicParameterPort_star); /** fetch up a pointer for static casting. if the name supplied is not exactly right, returns null. */ opaque getWrapped(in string className); } // end class BasicParameterPortWrap class ServiceRegistryWrap implements-all gov.cca.ports.ServiceRegistry { /** passed in is a void * cast pointer of * ccafeopq::ServiceRegistry *. */ void initialize(in opaque ccafeopq_ServiceRegistry_star, in opaque opaque_ComponentID_addr ); /** fetch up a pointer for static casting. if the name supplied is not exactly right, returns null. */ opaque getWrapped(in string className); /** return opq cidshared. */ void getProviderID( inout opaque opaque_ComponentID_addr ); } class GoPortWrap implements-all gov.cca.ports.GoPort { /** passed in is a void * cast pointer of * ccafeopq::GoPort *. */ void initialize(in opaque ccafeopq_GoPort_star ); /** fetch up a pointer for static casting. if the name supplied is not exactly right, returns null. */ opaque getWrapped(in string className); } ///// experimental stuff dujour ------------------------------------------ /** "ccafe.ports.MPIBorrow" : * UNADOPTED-standard service for getting a shared communicator. * * As MPI Forum explicitly DOES NOT define an interlanguage * form for object (comm, group, etc) handles, we use the * FORTRAN form which, being an integer of some size <= long * in sidl, we will express in SIDL as a long. * Implementations in C/C++/Python will have to use appropriate * conversion operators, MPI_Comm_c2f/MPI_Comm_f2c, when * passing/receiving object handles in long form. */ interface MPIBorrow extends gov.cca.Port { /** Get a communicator of the port provider (in FORTRAN form). This communicator will be the same instance as the comm of the port provider, with all the message collision potential that implies. Instances which have a comm covering only a subset of themselves will return FORTRAN MPI_COMM_NULL on their "un-covered" processes. @param tagCount: The number of tags the borrower wishes to use all to itself. @param tagList: Array to be filled with tags available. The array given as input is at least tagCount long and indexes from 0. @param key: key to be returned when the tags and comm are done with. @return The comm being borrowed, in FORTRAN form. C callers use comm_f2c method defined by their mpi implementation, usually MPI_Comm_f2c, to convert result to MPI_Comm. @throw CCAException if the service cannot be implemented because MPI is not present. */ long borrowComm(in int tagsRequested, inout array tagList, inout int key) throws gov.cca.CCAException; /** Return a previously borrowed communicator and tag list. * @param tagCount: The length of tagList. * @param tagList: The tags being returned, at least tagCount long. * @param key: The key obtained with borrowComm. It is * an error to attempt to return tags that you didn't receive. * @throw CCAException if an error is detected. */ void returnComm(in long comm, in int tagsRequested, inout array tagList, in int key) throws gov.cca.CCAException; }; /** * "ccafe.ports.MPIService": * UNADOPTED-standard service for getting a private mpi comm. * * As MPI Forum explicitly DOES NOT define an interlanguage * form for object (comm, group, etc) handles, we use the * FORTRAN form which, being an integer of some size <= long * in SIDL, we will express in SIDL as a long. * Implementations in C/C++/Python will have to use appropriate * conversion operators, MPI_Comm_c2f/MPI_Comm_f2c etc, when * passing/receiving object handles in long form. */ interface MPIService extends gov.cca.Port { /** Get an mpi communicator with the same scope as the component instance. Won't be mpi_comm_null. The communicator returned will be private to the recipient, which implies an mpicommdup. @return The comm produced, in FORTRAN form. C callers use comm_f2c method defined by their mpi implementation, usually MPI_Comm_f2c, to convert result to MPI_Comm. @throw CCAException if the service cannot be implemented because MPI is not present. */ long getComm() throws gov.cca.CCAException; /** Let go the communicator. previously fetched with getComm. * @throw CCAException if an error is detected. */ void releaseComm(in long comm) throws gov.cca.CCAException; } interface ComponentFactory extends gov.cca.ports.ComponentRepository { /** the component instance returned is nil if the name is unknown to the factory. The component is raw: it has been constructed but not initialized via setServices. */ gov.cca.Component createComponentInstance ( in string className); /** reclaim any resources the factory may have associated with the port it is using. This will occur after the normal component shutdown (ala componentrelease) is finished. */ void destroyComponentInstance (in string className, in gov.cca.Component c); } // end interface ComponentFactory } // end subpackage ports interface BabelMain { void driverBody(inout gov.cca.AbstractFramework af); } ///// end experimental stuff dujour ------------------------------------------ } // end package ccaffeine