本文整理汇总了C++中ACE_TString::fast_rep方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_TString::fast_rep方法的具体用法?C++ ACE_TString::fast_rep怎么用?C++ ACE_TString::fast_rep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_TString
的用法示例。
在下文中一共展示了ACE_TString::fast_rep方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: impl
void
TAO_ExtValueDef_i::fill_exceptions (CORBA::ExcDescriptionSeq &exceptions,
ACE_Configuration_Section_Key &key,
const char *sub_section)
{
ACE_Configuration_Section_Key excepts_key;
int status =
this->repo_->config ()->open_section (key,
sub_section,
0,
excepts_key);
if (status != 0)
{
exceptions.length (0);
return;
}
CORBA::ULong count = 0;
this->repo_->config ()->get_integer_value (excepts_key,
"count",
count);
exceptions.length (count);
char *stringified = 0;
ACE_TString holder;
ACE_Configuration_Section_Key except_key;
for (CORBA::ULong i = 0; i < count; ++i)
{
stringified = TAO_IFR_Service_Utils::int_to_string (i);
this->repo_->config ()->get_string_value (excepts_key,
stringified,
holder);
this->repo_->config ()->expand_path (this->repo_->root_key (),
holder,
except_key,
0);
this->repo_->config ()->get_string_value (except_key,
"name",
holder);
exceptions[i].name = holder.fast_rep ();
this->repo_->config ()->get_string_value (except_key,
"id",
holder);
exceptions[i].id = holder.fast_rep ();
TAO_ExceptionDef_i impl (this->repo_);
impl.section_key (except_key);
exceptions[i].type = impl.type_i ();
this->repo_->config ()->get_string_value (except_key,
"container_id",
holder);
exceptions[i].defined_in = holder.fast_rep ();
this->repo_->config ()->get_string_value (except_key,
"version",
holder);
exceptions[i].version = holder.fast_rep ();
}
}
示例2: LoadSection
void ConfigTreeCtrl::LoadSection(wxTreeItemId& ParentItem, const ACE_Configuration_Section_Key& Key)
{
ACE_TString Name;
int Index = 0;
while(!m_pConfig->enumerate_sections(Key, Index, Name))
{
wxTreeItemId Item = AppendItem(ParentItem, Name.fast_rep());
ACE_Configuration_Section_Key Child;
m_pConfig->open_section(Key, Name.fast_rep(), 0, Child);
LoadSection( Item, Child);
++Index;
}
}
示例3:
CORBA::Contained::Description *
TAO_EventPortDef_i::describe_i (void)
{
CORBA::ComponentIR::EventPortDescription epd;
TAO_IFR_Desc_Utils<CORBA::ComponentIR::EventPortDescription,
TAO_EventPortDef_i>::fill_desc_begin (
epd,
this->repo_,
this->section_key_
);
ACE_TString holder;
this->repo_->config ()->get_string_value (this->section_key_,
"base_type",
holder);
epd.event = holder.fast_rep ();
CORBA::Contained::Description *retval = 0;
ACE_NEW_RETURN (retval,
CORBA::Contained::Description,
0);
retval->kind = this->def_kind ();
retval->value <<= epd;
return retval;
}
示例4:
// Process service configuration directives from the files queued for
// processing
int
ACE_Service_Gestalt::process_directives (bool )
{
ACE_TRACE ("ACE_Service_Gestalt::process_directives");
if (this->svc_conf_file_queue_ == 0
|| this->svc_conf_file_queue_->is_empty ())
{
return 0;
}
ACE_TString *sptr = 0;
int failed = 0;
// Iterate through all the svc.conf files.
for (ACE_SVC_QUEUE_ITERATOR iter (*this->svc_conf_file_queue_);
iter.next (sptr) != 0;
iter.advance ())
{
int result = this->process_file (sptr->fast_rep ());
if (result < 0)
return result;
failed += result;
}
return failed;
} /* process_directives () */
示例5:
void
TAO_Port_Desc_Seq_Utils<T_desc_seq>::port_base_type (T_desc_seq &desc_seq,
ACE_TString &holder,
CORBA::ULong index)
{
desc_seq[index].interface_type = holder.fast_rep ();
}
示例6: default_svc_conf
// Process service configuration directives from the files queued for
// processing
int
ACE_Service_Gestalt::process_directives (bool ignore_default_svc_conf_file)
{
ACE_TRACE ("ACE_Service_Gestalt::process_directives");
if (this->svc_conf_file_queue_ == 0
|| this->svc_conf_file_queue_->is_empty ())
return 0;
ACE_TString *sptr = 0;
ACE_TString default_svc_conf (ACE_DEFAULT_SVC_CONF);
// Iterate through all the svc.conf files.
for (ACE_SVC_QUEUE_ITERATOR iter (*this->svc_conf_file_queue_);
iter.next (sptr) != 0;
iter.advance ())
{
if (*sptr == default_svc_conf && ignore_default_svc_conf_file)
continue;
int result = this->process_file (sptr->fast_rep ());
if (result < 0)
return result;
}
return 0;
} /* process_directives () */
示例7:
void
TAO_Port_Desc_Seq_Utils<CORBA::ComponentIR::EventPortDescriptionSeq>::port_base_type (
CORBA::ComponentIR::EventPortDescriptionSeq &desc_seq,
ACE_TString &holder,
CORBA::ULong index
)
{
desc_seq[index].event = holder.fast_rep ();
}
示例8: OnModify
void ValueListCtrl::OnModify(wxCommandEvent& event)
{
long Item = GetSelectedItem();
if(Item == -1)
{
return ;
}
wxListItem ListItem;
ACE_Configuration::VALUETYPE Type = (ACE_Configuration::VALUETYPE)GetItemData(Item);
wxString Name = GetItemText(Item);
switch(Type)
{
case ACE_Configuration::STRING:
{
ACE_TString Value;
m_pConfig->get_string_value(m_Key, Name, Value);
wxString ValueText(Value.fast_rep());
ValueDlg Dlg(this, Name, ValueText);
if(Dlg.ShowModal() != wxID_OK)
{
return;
}
Value = (const char*)Dlg.GetStringValue();
m_pConfig->set_string_value(m_Key, Name, Value);
}
break;
case ACE_Configuration::INTEGER:
{
u_int Value;
m_pConfig->get_integer_value(m_Key, Name, Value);
ValueDlg Dlg(this, Name, Value);
if(Dlg.ShowModal() != wxID_OK)
{
return;
}
Value = Dlg.GetUINTValue();
m_pConfig->set_integer_value(m_Key, Name, Value);
}
break;
case ACE_Configuration::BINARY:
{
wxMessageBox("Binary modification not supported (why don't you implement it?)");
//assert(0);
}
break;
}
DisplaySection(m_Key);
}
示例9: impl
CORBA::Boolean
TAO_InterfaceDef_i::is_a_i (const char *interface_id)
{
if (ACE_OS::strcmp (interface_id, "IDL:omg.org/CORBA/Object:1.0") == 0)
{
return 1;
}
ACE_TString id;
this->repo_->config ()->get_string_value (this->section_key_,
"id",
id);
// Is it our type?
if (ACE_OS::strcmp (id.fast_rep (), interface_id) == 0)
{
return 1;
}
// Is it one of our ancestors' types?
CORBA::InterfaceDefSeq_var bases =
this->base_interfaces_i ();
CORBA::ULong length = bases->length ();
PortableServer::ObjectId_var oid;
char *base_path = 0;
ACE_Configuration_Section_Key base_key;
for (CORBA::ULong i = 0; i < length; ++i)
{
base_path = TAO_IFR_Service_Utils::reference_to_path (bases[i]);
this->repo_->config ()->expand_path (this->repo_->root_key (),
base_path,
base_key,
0);
TAO_InterfaceDef_i impl (this->repo_);
impl.section_key (base_key);
CORBA::Boolean success = impl.is_a_i (interface_id);
if (success == 1)
{
return 1;
}
}
return 0;
}
示例10: DisplaySection
void ValueListCtrl::DisplaySection(const ACE_Configuration_Section_Key& Key)
{
m_Key = Key;
DeleteAllItems();
m_pConfig = MainFrame::Instance()->GetpConfig();
ACE_TString Name;
int Index = 0;
ACE_Configuration::VALUETYPE Type;
ACE_TString StringValue;
u_int UINTValue;
while(!m_pConfig->enumerate_values(Key, Index, Name, Type))
{
int Row = InsertItem(0, Name.fast_rep());
switch(Type)
{
case ACE_Configuration::STRING:
SetItem(Row, 1, "String");
m_pConfig->get_string_value(Key, Name.fast_rep(), StringValue);
SetItem(Row, 2, StringValue.fast_rep());
break;
case ACE_Configuration::INTEGER:
{
SetItem(Row, 1, "Integer");
m_pConfig->get_integer_value(Key, Name.fast_rep(), UINTValue);
wxString Text;
Text.sprintf("%d", UINTValue);
SetItem(Row, 2, Text);
}
break;
case ACE_Configuration::BINARY:
SetItem(Row, 1, "Binary");
break;
}
SetItemData(Row, Type);
++Index;
}
}
示例11:
CORBA::InterfaceDef_ptr
TAO_UsesDef_i::interface_type_i (void)
{
ACE_TString holder;
this->repo_->config ()->get_string_value (this->section_key_,
"base_type",
holder);
this->repo_->config ()->get_string_value (this->repo_->repo_ids_key (),
holder.fast_rep (),
holder);
CORBA::Object_var obj =
TAO_IFR_Service_Utils::path_to_ir_object (holder,
this->repo_);
return CORBA::InterfaceDef::_narrow (obj.in ());
}
示例12: OnNewUINT
void ConfigTreeCtrl::OnNewUINT(wxCommandEvent& event)
{
ValueDlg Dlg(this, false);
if(Dlg.ShowModal() != wxID_OK)
{
return;
}
u_int Value = Dlg.GetUINTValue();
ACE_TString Name = Dlg.GetName();
// Get the key for this node
wxTreeItemId ItemID = GetSelection();
ACE_Configuration_Section_Key Key;
ResolveKey(ItemID, Key);
m_pConfig->set_integer_value(Key, Name.fast_rep(), Value);
m_pListCtrl->DisplaySection(Key);
}
示例13: impl
CORBA::Boolean
TAO_EventPortDef_i::is_a_i (
const char *event_id
)
{
ACE_TString holder;
this->repo_->config ()->get_string_value (this->section_key_,
"base_type",
holder);
this->repo_->config ()->get_string_value (this->repo_->repo_ids_key (),
holder.fast_rep (),
holder);
ACE_Configuration_Section_Key key;
this->repo_->config ()->expand_path (this->repo_->root_key (),
holder,
key,
0);
TAO_EventDef_i impl (this->repo_);
impl.section_key (key);
return impl.is_a_i (event_id);
}
示例14: impl
void
TAO_IFR_Desc_Utils<T_desc,T_impl>::fill_desc_begin (
T_desc &desc,
TAO_Repository_i *repo,
ACE_Configuration_Section_Key &key
)
{
T_impl impl (repo);
impl.section_key (key);
desc.name = impl.name_i ();
desc.id = impl.id_i ();
ACE_TString holder;
repo->config ()->get_string_value (key,
"container_id",
holder);
desc.defined_in = holder.fast_rep ();
desc.version = impl.version_i ();
}
示例15: repo_ids
CORBA::Contained::Description *
TAO_InterfaceDef_i::describe_i (void)
{
CORBA::Contained::Description *desc_ptr = 0;
ACE_NEW_THROW_EX (desc_ptr,
CORBA::Contained::Description,
CORBA::NO_MEMORY ());
CORBA::Contained::Description_var retval = desc_ptr;
retval->kind = this->def_kind ();
CORBA::InterfaceDescription ifd;
ACE_TString holder;
this->repo_->config ()->get_string_value (this->section_key_,
"name",
holder);
ifd.name = holder.fast_rep ();
this->repo_->config ()->get_string_value (this->section_key_,
"id",
holder);
ifd.id = holder.fast_rep ();
this->repo_->config ()->get_string_value (this->section_key_,
"container_id",
holder);
ifd.defined_in = holder.fast_rep ();
this->repo_->config ()->get_string_value (this->section_key_,
"version",
holder);
ifd.version = holder.fast_rep ();
CORBA::ULong i = 0;
CORBA::InterfaceDefSeq_var bases =
this->base_interfaces_i ();
CORBA::ULong length = bases->length ();
CORBA::RepositoryIdSeq repo_ids (length);
repo_ids.length (length);
char *base_path = 0;
ACE_Configuration_Section_Key base_key;
for (i = 0; i < length; ++i)
{
base_path = TAO_IFR_Service_Utils::reference_to_path (bases[i]);
this->repo_->config ()->expand_path (this->repo_->root_key (),
base_path,
base_key,
0);
TAO_InterfaceDef_i impl (this->repo_);
impl.section_key (base_key);
repo_ids[i] = impl.id_i ();
}
ifd.base_interfaces = repo_ids;
retval->value <<= ifd;
return retval._retn ();
}