本文整理汇总了C++中CheckValidIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ CheckValidIndex函数的具体用法?C++ CheckValidIndex怎么用?C++ CheckValidIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CheckValidIndex函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: CheckValidIndex
void MySQLPreparedStatement::setFloat(const uint8 index, const float value)
{
CheckValidIndex(index);
m_paramsSet[index] = true;
MYSQL_BIND* param = &m_bind[index];
setValue(param, MYSQL_TYPE_FLOAT, &value, sizeof(float), (value > 0.0f));
}
开发者ID:Bootz,项目名称:TrueBlood-Dev-Server,代码行数:7,代码来源:PreparedStatement.cpp
示例2: CheckValidIndex
void MySQLPreparedStatement::setUInt16(const uint8 index, const uint16 value)
{
CheckValidIndex(index);
m_paramsSet[index] = true;
MYSQL_BIND* param = &m_bind[index];
setValue(param, MYSQL_TYPE_SHORT, &value, sizeof(uint16), true);
}
开发者ID:FirstCore,项目名称:GaryMoveOut_4.3.4,代码行数:7,代码来源:PreparedStatement.cpp
示例3: CheckValidIndex
void MySQLPreparedStatement::setNull(const uint8 index)
{
CheckValidIndex(index);
m_paramsSet[index] = true;
MYSQL_BIND* param = &m_bind[index];
param->buffer_type = MYSQL_TYPE_NULL;
delete [] static_cast<char *>(param->buffer);
param->buffer = NULL;
param->buffer_length = 0;
param->is_null_value = 1;
delete param->length;
param->length = NULL;
}
开发者ID:powerzilly,项目名称:trinitycore,代码行数:13,代码来源:PreparedStatement.cpp
示例4: CheckValidIndex
void MySQLPreparedStatement::setString(const uint8 index, const char* value) {
CheckValidIndex(index);
m_paramsSet[index] = true;
MYSQL_BIND* param = &m_bind[index];
size_t len = strlen(value) + 1;
param->buffer_type = MYSQL_TYPE_VAR_STRING;
delete[] static_cast<char *>(param->buffer);
param->buffer = new char[len];
param->buffer_length = len;
param->is_null_value = 0;
param->length = new unsigned long(len - 1);
memcpy(param->buffer, value, len);
}
开发者ID:BoThay,项目名称:ArkCORE,代码行数:14,代码来源:PreparedStatement.cpp
示例5: CheckValidIndex
void MySQLPreparedStatement::setBinary(const uint8 index, const std::vector<uint8>& value, bool isString)
{
CheckValidIndex(index);
m_paramsSet[index] = true;
MYSQL_BIND* param = &m_bind[index];
uint32 len = uint32(value.size());
param->buffer_type = MYSQL_TYPE_BLOB;
delete [] static_cast<char *>(param->buffer);
param->buffer = new char[len];
param->buffer_length = len;
param->is_null_value = 0;
delete param->length;
param->length = new unsigned long(len);
if (isString)
{
*param->length -= 1;
param->buffer_type = MYSQL_TYPE_VAR_STRING;
}
memcpy(param->buffer, value.data(), len);
}
开发者ID:Diyvol,项目名称:TrinityCore,代码行数:21,代码来源:PreparedStatement.cpp
注:本文中的CheckValidIndex函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论