Blame tests/upstream-test-suite/037_msc.cpp

Than Ngo b7bcaa
// objective: test the \msc and \endmsc commands
Than Ngo b7bcaa
// check: class_sender.xml
Than Ngo b7bcaa
// check: class_receiver.xml
Than Ngo b7bcaa
Than Ngo b7bcaa
/** Sender class. Can be used to send a command to the server.
Than Ngo b7bcaa
 *  The receiver will acknowledge the command by calling Ack().
Than Ngo b7bcaa
 *  \msc
Than Ngo b7bcaa
 *    Sender,Receiver;
Than Ngo b7bcaa
 *    Sender->Receiver [label="Command()", URL="\ref Receiver::Command()"];
Than Ngo b7bcaa
 *    Sender<-Receiver [label="Ack()", URL="\ref Ack()", ID="1"];
Than Ngo b7bcaa
 *  \endmsc
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
class Sender
Than Ngo b7bcaa
{
Than Ngo b7bcaa
  public:
Than Ngo b7bcaa
    /** Acknowledgement from server */
Than Ngo b7bcaa
    void Ack(bool ok);
Than Ngo b7bcaa
};
Than Ngo b7bcaa
Than Ngo b7bcaa
/** Receiver class. Can be used to receive and execute commands.
Than Ngo b7bcaa
 *  After execution of a command, the receiver will send an acknowledgement
Than Ngo b7bcaa
 *  \msc
Than Ngo b7bcaa
 *    Receiver,Sender;
Than Ngo b7bcaa
 *    Receiver<-Sender [label="Command()", URL="\ref Command()"];
Than Ngo b7bcaa
 *    Receiver->Sender [label="Ack()", URL="\ref Sender::Ack()", ID="1"];
Than Ngo b7bcaa
 *  \endmsc
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
class Receiver
Than Ngo b7bcaa
{
Than Ngo b7bcaa
  public:
Than Ngo b7bcaa
    /** Executable a command on the server */
Than Ngo b7bcaa
    void Command(int commandId);
Than Ngo b7bcaa
};