OldClientContext::OldClientContext(OperationContext* txn, const std::string& ns, Database* db, bool justCreated) : _justCreated(justCreated), _doVersion(true), _ns(ns), _db(db), _txn(txn) { _finishInit(); }
void init(RenderSystem* customRenderSystem, Window* customWindow) { _startInit(); april::rendersys = customRenderSystem; april::window = customWindow; _finishInit(); }
void init(RenderSystemType renderSystemType, Window* customWindow) { _startInit(); _createRenderSystem(renderSystemType); april::window = customWindow; _finishInit(); }
void init(RenderSystem* customRenderSystem, WindowType windowType) { _startInit(); april::rendersys = customRenderSystem; _createWindowSystem(windowType); _finishInit(); }
void init(RenderSystemType renderSystemType, WindowType windowType) { _startInit(); _createRenderSystem(renderSystemType); _createWindowSystem(windowType); _finishInit(); }
// TODO: unify c-tors ConnectionString::ConnectionString(ConnectionType type, const std::string& s, const std::string& setName) { _type = type; _setName = setName; _fillServers(s); _finishInit(); }
Client::Context::Context(const string& ns, bool doVersion) : _client( currentClient.get() ), _justCreated(false), // set for real in finishInit _doVersion(doVersion), _ns( ns ), _db(0) { _finishInit(); }
OldClientContext::OldClientContext(OperationContext* txn, const std::string& ns, bool doVersion) : _justCreated(false), // set for real in finishInit _doVersion(doVersion), _ns(ns), _db(NULL), _txn(txn) { _finishInit(); }
Client::Context::Context(const string& ns, const std::string& path, bool doVersion) : _client( currentClient.get() ), _oldContext( _client->_context ), _path( path ), _justCreated(false), // set for real in finishInit _doVersion(doVersion), _ns( ns ), _db(0) { _finishInit(); }
ConnectionString::ConnectionString(const std::string& s, ConnectionType favoredMultipleType) { _fillServers(s); if (_type != INVALID) { // set already } else if (_servers.size() == 1) { _type = MASTER; } else { _type = favoredMultipleType; verify(_type == SET || _type == SYNC); } _finishInit(); }
ConnectionString::ConnectionString(ConnectionType type, const std::string& s, const std::string& setName) { _type = type; _setName = setName; _fillServers(s); switch (_type) { case MASTER: verify(_servers.size() == 1); break; case SET: verify(_setName.size()); verify(_servers.size() >= 1); // 1 is ok since we can derive break; default: verify(_servers.size() > 0); } _finishInit(); }
ConnectionString::ConnectionString(StringData setName, std::vector<HostAndPort> servers) : _type(SET), _servers(std::move(servers)), _setName(setName.toString()) { _finishInit(); }
ConnectionString::ConnectionString(const HostAndPort& server) : _type(MASTER) { _servers.push_back(server); _finishInit(); }
ConnectionString::ConnectionString(const std::string& s, ConnectionType connType) : _type(connType) { _fillServers(s); _finishInit(); }
ConnectionString::ConnectionString(ConnectionType type, std::vector<HostAndPort> servers, const std::string& setName) : _type(type), _servers(std::move(servers)), _setName(setName) { _finishInit(); }