|
Cliser | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cliser.Generator | +--cliser.CPlusPlusGenerator
A CPlusPlusGenerator is used by a given Cliser interface to generate C++ code for a client-server system, as specified by the parameters entered at the interface.
See the class constructor for the parameters.
Constructor Summary | |
CPlusPlusGenerator(java.lang.String serviceName,
int port,
java.lang.String protocol,
java.lang.String networkInterface)
Constructor for use by a CLI. |
|
CPlusPlusGenerator(java.lang.String serviceName,
int port,
java.lang.String protocol,
java.lang.String networkInterface,
java.awt.Frame parentFrame)
Constructor for use by a Cliser GUI. |
Method Summary | |
void |
generateClient()
Generate C++ client-code using parameters given to my constructor. |
void |
generateMakefile(boolean buildClient,
boolean buildServer,
java.lang.String serverType)
Generate Makefile for C++ code. |
void |
generateServer(java.lang.String serverType)
Generate C++ server code using constructor parameters and serverType. |
java.lang.String |
getNetworkInterface()
Access my network interface information. |
Methods inherited from class cliser.Generator |
getPort,
getProtocol,
getService |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CPlusPlusGenerator(java.lang.String serviceName, int port, java.lang.String protocol, java.lang.String networkInterface, java.awt.Frame parentFrame)
serviceName
- the name of the serviceport
- the port the service should useprotocol
- "TCP" or "UDP"networkInterface
- "BSD" or "TLI" or "Winsock"parentFrame
- the Frame of my GUI
Precondition: serviceName is the name of the service (e.g., "ftp")
&& port is the port for this service
&& protocol is either "TCP" or "UDP"
&& networkInterface is either "BSD", "TLI", or "Winsock"
&& parentFrame refers to my parent GUI
Postcondition: my instance variables have been initialized
using the parameter values.
public CPlusPlusGenerator(java.lang.String serviceName, int port, java.lang.String protocol, java.lang.String networkInterface)
serviceName
- the name of the serviceport
- the port the service should useprotocol
- "TCP" or "UDP"networkInterface
- "BSD" or "TLI" or "Winsock"parentFrame
- the Frame of my GUI
Precondition: serviceName is the name of the service (e.g., "ftp")
&& port is the port for this service
&& protocol is either "TCP" or "UDP"
&& networkInterface is either "BSD", "TLI", or "Winsock"
Postcondition: my instance variables have been initialized
using the parameter values
&& myParentFrame == null.
Method Detail |
public final java.lang.String getNetworkInterface()
public void generateClient()
public void generateServer(java.lang.String serverType)
serverType
- "Iterative" or "Unix" or "POSIX"
Precondition: serverType is
"Iterative" for an iterative/single threaded server
"Unix" for a Unix concurrent server
"POSIX" for a POSIX threaded concurrent server
Postcondition: the source code has been generated for a server for myService, using myPort, myNetworkInterface, and myProtocol
public void generateMakefile(boolean buildClient, boolean buildServer, java.lang.String serverType)
buildClient
- true iff the user wants a clientbuildServer
- true iff the user wants a serverserverType
- "Iterative" or "Concurrent" (for Java)
"Iterative" or "Unix" or "POSIX" (for C++)
Precondition: (buildServer is true && mySourceLanguage is "Java")
--> (serverType is "Iterative"
|| serverType is "Concurrent")
&& (buildServer is true && mySourceLanguage is "C++")
--> (serverType == "Iterative"
|| serverType == "Unix"
|| serverType == "POSIX").
Postcondition: A Makefile has been generated to compile the user program.
|
Cliser | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |