本文整理汇总了C++中ACE_CString::fast_clear方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_CString::fast_clear方法的具体用法?C++ ACE_CString::fast_clear怎么用?C++ ACE_CString::fast_clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_CString
的用法示例。
在下文中一共展示了ACE_CString::fast_clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read
bool HeaderBase::read(std::istream& str)
{
ACE_CString name (64, '\0');
ACE_CString value (128, '\0');
int ch = str.peek ();
while (ch != eof_ && ch != '\r' && ch != '\n')
{
name.fast_clear ();
value.fast_clear ();
// parse name
ch = this->read_field (str, name, MAX_NAME_LENGTH, ':');
if (ch == '\n')
{
ch = str.get ();
continue; // ignore invalid headers
}
if (ch != ':')
{
return false; // name too long/missing colon; cannot continue
}
// skip leading whitespace before next field
while (ACE_OS::ace_isspace (str.peek ()))
{
ch = str.get ();
}
// parse value
ch = this->read_field (str, value, MAX_VALUE_LENGTH, '\r');
if (ch == '\r')
ch = str.get (); // get lf
if (ch != '\n')
return false; // value too long/no crlf found; cannot continue
// followup lines starting with ws are continuations of the value
// and must be appended
ch = str.peek ();
while (ch == ' ' || ch == '\t')
{
ch = this->read_field (str, value, MAX_VALUE_LENGTH, '\r');
if (ch == '\r')
ch = str.get (); // get lf
if (ch != '\n')
return false; // multiline value too long/no crlf; cannot continue
ch = str.peek ();
}
this->add (name, value);
INET_DEBUG (9, (LM_DEBUG, DLINFO
ACE_TEXT ("ACE_INet_HTTP: <-+ %C: %C\n"),
name.c_str (),
value.c_str ()));
}
return true;
}
示例2: cleanup
void cleanup(PersistenceUpdater::ALLOCATOR* allocator)
{
if (name.length() > 0)
{
char* strMemory = const_cast<char*>(name.fast_rep());
name.fast_clear();
allocator->free(strMemory);
}
if (dataType.length() > 0)
{
char* strMemory = const_cast<char*>(dataType.fast_rep());
dataType.fast_clear();
allocator->free(strMemory);
}
allocator->free(topicQos.second.second);
}
示例3: catch
ACE_CString
TAO_Notify_PushConsumer::get_ior (void) const
{
ACE_CString result;
CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
try
{
CORBA::String_var ior = orb->object_to_string(this->push_consumer_.in());
result = static_cast<const char*> (ior.in ());
}
catch (const CORBA::Exception&)
{
result.fast_clear();
}
return result;
}