Esempio n. 1
0
OldClientContext::OldClientContext(OperationContext* txn,
                                   const std::string& ns,
                                   Database* db,
                                   bool justCreated)
    : _justCreated(justCreated), _doVersion(true), _ns(ns), _db(db), _txn(txn) {
    _finishInit();
}
Esempio n. 2
0
	void init(RenderSystem* customRenderSystem, Window* customWindow)
	{
		_startInit();
		april::rendersys = customRenderSystem;
		april::window = customWindow;
		_finishInit();
	}
Esempio n. 3
0
	void init(RenderSystemType renderSystemType, Window* customWindow)
	{
		_startInit();
		_createRenderSystem(renderSystemType);
		april::window = customWindow;
		_finishInit();
	}
Esempio n. 4
0
	void init(RenderSystem* customRenderSystem, WindowType windowType)
	{
		_startInit();
		april::rendersys = customRenderSystem;
		_createWindowSystem(windowType);
		_finishInit();
	}
Esempio n. 5
0
	void init(RenderSystemType renderSystemType, WindowType windowType)
	{
		_startInit();
		_createRenderSystem(renderSystemType);
		_createWindowSystem(windowType);
		_finishInit();
	}
Esempio n. 6
0
// TODO: unify c-tors
ConnectionString::ConnectionString(ConnectionType type,
                                   const std::string& s,
                                   const std::string& setName) {
    _type = type;
    _setName = setName;
    _fillServers(s);
    _finishInit();
}
Esempio n. 7
0
 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();
 }
Esempio n. 8
0
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();
}
Esempio n. 9
0
 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();
 }
Esempio n. 10
0
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();
}
Esempio n. 11
0
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();
}
Esempio n. 12
0
ConnectionString::ConnectionString(StringData setName, std::vector<HostAndPort> servers)
    : _type(SET), _servers(std::move(servers)), _setName(setName.toString()) {
    _finishInit();
}
Esempio n. 13
0
ConnectionString::ConnectionString(const HostAndPort& server) : _type(MASTER) {
    _servers.push_back(server);
    _finishInit();
}
Esempio n. 14
0
ConnectionString::ConnectionString(const std::string& s, ConnectionType connType)
    : _type(connType) {
    _fillServers(s);
    _finishInit();
}
Esempio n. 15
0
ConnectionString::ConnectionString(ConnectionType type,
                                   std::vector<HostAndPort> servers,
                                   const std::string& setName)
    : _type(type), _servers(std::move(servers)), _setName(setName) {
    _finishInit();
}