本文整理汇总了C++中KEY::c_str方法的典型用法代码示例。如果您正苦于以下问题:C++ KEY::c_str方法的具体用法?C++ KEY::c_str怎么用?C++ KEY::c_str使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KEY
的用法示例。
在下文中一共展示了KEY::c_str方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: smove
bool xRedisClient::smove(const RedisDBIdx& dbi, const KEY& srckey, const KEY& deskey, const VALUE& member) {
if (0 == srckey.length()) {
return false;
}
SETDEFAULTIOTYPE(MASTER);
return command_bool(dbi, "SMOVE %s", srckey.c_str(), deskey.c_str(), member.c_str());
}
示例2: srandmember
bool xRedisClient::srandmember(const RedisDBIdx& dbi, const KEY& key, VALUES& members, int count) {
if (0 == key.length()) {
return false;
}
SETDEFAULTIOTYPE(SLAVE);
if (0 == count) {
return command_list(dbi, members, "SRANDMEMBER %s", key.c_str());
}
return command_list(dbi, members, "SRANDMEMBER %s %d", key.c_str(), count);
}
示例3: spop
bool xRedisClient::spop(const RedisDBIdx& dbi, const KEY& key, VALUE& member) {
if (0 == key.length()) {
return false;
}
SETDEFAULTIOTYPE(MASTER);
return command_string(dbi, member, "SPOP %s", key.c_str());
}
示例4: smembers
bool xRedisClient::smembers(const RedisDBIdx& dbi, const KEY& key, VALUES& vValue) {
if (0 == key.length()) {
return false;
}
SETDEFAULTIOTYPE(SLAVE);
return command_list(dbi, vValue, "SMEMBERS %s", key.c_str());
}
示例5: smove
bool xRedisClient::smove(const RedisDBIdx& dbi, const KEY& srckey, const KEY& deskey, const VALUE& member) {
return command_bool(dbi, "SMOVE %s", srckey.c_str(), deskey.c_str(), member.c_str());
}
示例6: smember
bool xRedisClient::smember(const RedisDBIdx& dbi, const KEY& key, VALUES& vValue) {
return command_list(dbi, vValue, "SMEMBER %s", key.c_str());
}
示例7: sismember
bool xRedisClient::sismember(const RedisDBIdx& dbi, const KEY& key, const VALUE& member) {
return command_bool(dbi, "SISMEMBER %s %s", key.c_str(), member.c_str());
}
示例8: srandmember
bool xRedisClient::srandmember(const RedisDBIdx& dbi, const KEY& key, VALUES& members, int count) {
if (0==count) {
return command_list(dbi, members, "SRANDMEMBER %s", key.c_str());
}
return command_list(dbi, members, "SRANDMEMBER %s %d", key.c_str(), count);
}
示例9: spop
bool xRedisClient::spop(const RedisDBIdx& dbi, const KEY& key, VALUE& member) {
return command_string(dbi, member, "SPOP %s", key.c_str());
}