Esempio n. 1
0
    // Constructor binds field variables.
    SPhoneBookDB()
    {
        // Bind int primary key. Cannot be NULL.
        BindKey("PersonId", &person_id);

        //  Bind non-PK data fields
        BindData("FirstName", &first_name, 64, eNotNullable);
        BindData("LastName",  &last_name, 64, eNotNullable);
        BindData("Zip",       &zip_code);  // NULLable by default
        BindData("Phone",     &phone, 32); // NULLable by default
    }
Esempio n. 2
0
CSnpDbBase::CSnpDbBase( ESeqIdType type, const string& idprefix, const string& idsuffix ) :
    m_seqIdType( type ),
    m_prefix( idprefix ),
    m_suffix( idsuffix )
{
    switch( type ) {
    case eSeqId_integer: BindKey( "intId", &m_intId ); break;
    case eSeqId_string:  BindKey( "strId", &m_stringId ); break;
    }
    BindKey( "pos", &m_pos );
    BindData( "a", m_prob + 0 );
    BindData( "c", m_prob + 1 );
    BindData( "g", m_prob + 2 );
    BindData( "t", m_prob + 3 );
}
Esempio n. 3
0
void HoeTexture::Unlock()
{
#ifdef _HOE_D3D_
	m_texture->UnlockRect(0);
#endif
#ifdef _HOE_OPENGL_
	BindData(pData);
	SAFE_DELETE_ARRAY(pData);
#endif
}
Esempio n. 4
0
 SEventsDB()
 {
     BindKey("id",              &id);
     BindKey("event_id",        &event_id);
     BindData("event",          &event);
     BindData("status",         &status);
     BindData("timestamp",      &timestamp);
     BindData("node_addr",      &node_addr);
     BindData("ret_code",       &ret_code);
     BindData("client_node",    &client_node, kMaxWorkerNodeIdSize);
     BindData("client_session", &client_session, kMaxWorkerNodeIdSize);
     BindData("err_msg",        &err_msg, kNetScheduleMaxDBErrSize);
 }
Esempio n. 5
0
File: model.cpp Progetto: JunC74/PYX
	// 绑定数据并且渲染
	AttemptERR Model::Draw(float f_delta)
	{
		// 绑定渲染的数据
		assert(BindData() == AT_OK);

		// 渲染函数
		if (index_buffer_ != -1)
		{
			glEnable(GL_INDEX_ARRAY);
			glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer_);
			glDrawElements(GL_TRIANGLES, index_size_, GL_UNSIGNED_INT, NULL);
		}
		else
		{
			glDisable(GL_INDEX_ARRAY);
			glDrawArrays(GL_TRIANGLES, 0, vertex_num_);
		}
		return AT_OK;
	}
Esempio n. 6
0
 File(CBDB_File::EDuplicateKeys dup_keys)
 : CBDB_File(dup_keys)
 {
     BindKey("Key", &key);
     BindData("Value", &value, 1024);
 }
Esempio n. 7
0
 SJobInfoDB()
 {
     BindKey("id", &id);
     BindData("input",  &input,  kNetScheduleMaxOverflowSize);
     BindData("output", &output, kNetScheduleMaxOverflowSize);
 }
Esempio n. 8
0
    SJobDB()
    {
        DisableNull();

        BindKey("id",                       &id);

        BindData("passport",                &passport);
        BindData("status",                  &status);
        BindData("timeout",                 &timeout);
        BindData("run_timeout",             &run_timeout);
        BindData("read_timeout",            &read_timeout);

        BindData("subm_notif_port",         &subm_notif_port);
        BindData("subm_notif_timeout",      &subm_notif_timeout);

        BindData("listener_notif_addr",     &listener_notif_addr);
        BindData("listener_notif_port",     &listener_notif_port);
        BindData("listener_notif_abstime",  &listener_notif_abstime);

        BindData("run_counter",     &run_counter);
        BindData("read_counter",    &read_counter);
        BindData("aff_id",          &aff_id);
        BindData("mask",            &mask);
        BindData("group_id",        &group_id);
        BindData("last_touch",      &last_touch);
        BindData("input_overflow",  &input_overflow);
        BindData("output_overflow", &output_overflow);
        BindData("input",           &input,          kNetScheduleSplitSize);
        BindData("output",          &output,         kNetScheduleSplitSize);
        BindData("client_ip",       &client_ip,      kMaxClientIpSize);
        BindData("client_sid",      &client_sid,     kMaxSessionIdSize);
        BindData("ncbi_phid",       &ncbi_phid,      kMaxHitIdSize);
        BindData("progress_msg",    &progress_msg,   kNetScheduleMaxDBDataSize);
    }