本文整理汇总了C++中firebird::PathName::hasData方法的典型用法代码示例。如果您正苦于以下问题:C++ PathName::hasData方法的具体用法?C++ PathName::hasData怎么用?C++ PathName::hasData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类firebird::PathName
的用法示例。
在下文中一共展示了PathName::hasData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: extractDataFromPluginTo
void ClntAuthBlock::extractDataFromPluginTo(Firebird::ClumpletWriter& user_id)
{
// Add user login name
if (cliOrigUserName.hasData())
{
HANDSHAKE_DEBUG(fprintf(stderr, "Cli: extractDataFromPluginTo: cliOrigUserName=%s\n",
cliOrigUserName.c_str()));
user_id.insertString(CNCT_login, cliOrigUserName);
}
// Add plugin name
Firebird::PathName pluginName = getPluginName();
if (pluginName.hasData())
{
HANDSHAKE_DEBUG(fprintf(stderr, "Cli: extractDataFromPluginTo: pluginName=%s\n", pluginName.c_str()));
user_id.insertPath(CNCT_plugin_name, pluginName);
}
// Add plugin list
if (pluginList.hasData())
{
user_id.insertPath(CNCT_plugin_list, pluginList);
}
// This is specially tricky field - user_id is limited to 255 bytes per entry,
// and we have no ways to override this limit cause it can be sent to any version server.
// Therefore divide data into 254-byte parts, leaving first byte for the number of that part.
// This appears more reliable than put them in strict order.
addMultiPartConnectParameter(dataFromPlugin, user_id, CNCT_specific_data);
// Client's wirecrypt requested level
user_id.insertInt(CNCT_client_crypt, clntConfig->getWireCrypt(WC_CLIENT));
}
示例2: splitPrefix
void PathUtils::splitPrefix(Firebird::PathName& path, Firebird::PathName& prefix)
{
prefix.erase();
while (path.hasData() && path[0] == dir_sep)
{
prefix = dir_sep;
path.erase(0, 1);
}
}
示例3: setPrefixIfNotEmpty
inline void setPrefixIfNotEmpty(const Firebird::PathName& prefix, SSHORT arg_type)
{
/**************************************
*
* s e t P r e f i x I f N o t E m p t y
*
**************************************
*
* Functional description
* Helper for ISC_set_prefix
*
**************************************/
if (prefix.hasData())
{
// ignore here return value of gds__get_prefix():
// it will never fail with our good arguments
gds__get_prefix(arg_type, prefix.c_str());
}
}
示例4: getPrefix
// Build full file name in specified directory
Firebird::PathName getPrefix(unsigned int prefType, const char* name)
{
Firebird::PathName s;
char tmp[MAXPATHLEN];
const char* configDir[] = {
FB_BINDIR, FB_SBINDIR, FB_CONFDIR, FB_LIBDIR, FB_INCDIR, FB_DOCDIR, FB_UDFDIR, FB_SAMPLEDIR,
FB_SAMPLEDBDIR, FB_HELPDIR, FB_INTLDIR, FB_MISCDIR, FB_SECDBDIR, FB_MSGDIR, FB_LOGDIR,
FB_GUARDDIR, FB_PLUGDIR
};
fb_assert(FB_NELEM(configDir) == Firebird::IConfigManager::DIR_COUNT);
fb_assert(prefType < Firebird::IConfigManager::DIR_COUNT);
if (! bootBuild())
{
if (prefType != Firebird::IConfigManager::DIR_CONF &&
prefType != Firebird::IConfigManager::DIR_MSG &&
configDir[prefType][0])
{
// Value is set explicitly and is not environment overridable
PathUtils::concatPath(s, configDir[prefType], name);
return s;
}
}
switch(prefType)
{
case Firebird::IConfigManager::DIR_BIN:
case Firebird::IConfigManager::DIR_SBIN:
#ifdef WIN_NT
s = "";
#else
s = "bin";
#endif
break;
case Firebird::IConfigManager::DIR_CONF:
case Firebird::IConfigManager::DIR_LOG:
case Firebird::IConfigManager::DIR_GUARD:
case Firebird::IConfigManager::DIR_SECDB:
s = "";
break;
case Firebird::IConfigManager::DIR_LIB:
#ifdef WIN_NT
s = "";
#else
s = "lib";
#endif
break;
case Firebird::IConfigManager::DIR_PLUGINS:
s = "plugins";
break;
case Firebird::IConfigManager::DIR_INC:
s = "include";
break;
case Firebird::IConfigManager::DIR_DOC:
s = "doc";
break;
case Firebird::IConfigManager::DIR_UDF:
s = "UDF";
break;
case Firebird::IConfigManager::DIR_SAMPLE:
s = "examples";
break;
case Firebird::IConfigManager::DIR_SAMPLEDB:
s = "examples/empbuild";
break;
case Firebird::IConfigManager::DIR_HELP:
s = "help";
break;
case Firebird::IConfigManager::DIR_INTL:
s = "intl";
break;
case Firebird::IConfigManager::DIR_MISC:
s = "misc";
break;
case Firebird::IConfigManager::DIR_MSG:
gds__prefix_msg(tmp, name);
return tmp;
default:
fb_assert(false);
break;
}
if (s.hasData() && name[0])
{
//.........这里部分代码省略.........