FACE Namespace Reference

Namespaces

namespace  TS

Functions

Charstring_alloc (UnsignedLong len)
Charstring_dup (const Char *str)
void string_free (Char *str)

Function Documentation

Char* FACE::string_alloc ( UnsignedLong  len  ) 

Definition at line 15 of file StringManager.cpp.

References ACE_Allocator::instance(), ACE_Allocator::malloc(), and str.

Referenced by OpenDDS::SafetyProfile::StringTraits< CORBA::Char >::alloc(), OpenDDS::Federator::InfoRepoMulticastResponder::init(), OpenDDS::FaceTypes::operator>>(), and string_dup().

00016 {
00017   if (len == 0) return &s_empty;
00018   void* const raw =
00019     ACE_Allocator::instance()->malloc(len + 1);
00020   Char* const str = static_cast<Char*>(raw);
00021   if (str) str[0] = static_cast<Char>(0);
00022   return str;
00023 }

Here is the call graph for this function:

Here is the caller graph for this function:

Char* FACE::string_dup ( const Char str  ) 

Definition at line 25 of file StringManager.cpp.

References len, and string_alloc().

Referenced by TAO_DDS_DCPSInfo_i::dump_to_string(), OpenDDS::SafetyProfile::StringTraits< CORBA::Char >::dup(), OpenDDS::DCPS::ContentFilteredTopicImpl::get_filter_expression(), OpenDDS::DCPS::TopicDescriptionImpl::get_name(), OpenDDS::DCPS::QueryConditionImpl::get_query_expression(), OpenDDS::DCPS::MultiTopicImpl::get_subscription_expression(), OpenDDS::DCPS::TopicDescriptionImpl::get_type_name(), and QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().

00026 {
00027   if (!str) return 0;
00028   if (!*str) return &s_empty;
00029   const size_t len = std::strlen(str);
00030   Char* const cpy = string_alloc(static_cast<UnsignedLong>(len));
00031   if (cpy) std::strncpy(cpy, str, len + 1);
00032   return cpy;
00033 }

Here is the call graph for this function:

Here is the caller graph for this function:

void FACE::string_free ( Char str  ) 

Definition at line 35 of file StringManager.cpp.

References ACE_Allocator::free(), and ACE_Allocator::instance().

Referenced by OpenDDS::SafetyProfile::StringTraits< CORBA::Char >::free(), OpenDDS::FaceTypes::operator>>(), and OpenDDS::DCPS::operator>>().

00036 {
00037   if (str != &s_empty) ACE_Allocator::instance()->free(str);
00038 }

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1