Provides methods for getting MyCQClient instance and QueueSchema instance. More...
#include <MyCQFactory.h>
Static Public Member Functions | |
static MyCQClient * | getMyCQClient () |
Get a new MyCQClient instance. | |
static void | close (MyCQClient *client) |
Close MyCQClient instance. | |
static QueueSchema * | getQueueSchema () |
Get a new QueueSchema instance. | |
static void | close (QueueSchema *queueSchema) |
Close QueueSchema instance. |
Provides methods for getting MyCQClient instance and QueueSchema instance.
#include <iostream> #include "../MyCQClientCPP/MyCQClient.h" using namespace mycq; void examMyCQClient() { //get a client instance MyCQClient* client = MyCQFactory::getMyCQClient(); try { //connect to server client->connect("localhost", 3030, "root", "1234"); } catch(MyCQException& ex) { std::cout << "code:" << ex.getCode() << ", message:" << ex.getMessage(); } //close client->close(); //delete client instance MyCQFactory::close(client); }
static void mycq::MyCQFactory::close | ( | QueueSchema * | queueSchema | ) | [static] |
Close QueueSchema instance.
static void mycq::MyCQFactory::close | ( | MyCQClient * | client | ) | [static] |
Close MyCQClient instance.
static MyCQClient* mycq::MyCQFactory::getMyCQClient | ( | ) | [static] |
Get a new MyCQClient instance.
static QueueSchema* mycq::MyCQFactory::getQueueSchema | ( | ) | [static] |
Get a new QueueSchema instance.