コード例 #1
0
ファイル: Admin.cpp プロジェクト: binary42/OCI
void
TAO_Notify_Admin::save_attrs (TAO_Notify::NVPList& attrs)
{
  TAO_Notify_Object::save_attrs(attrs);
  attrs.push_back(TAO_Notify::NVP("InterFilterGroupOperator",
                                  this->filter_operator_));
  if (this->is_default_)
    {
      attrs.push_back (TAO_Notify::NVP ("default", "yes"));
    }
}
コード例 #2
0
ファイル: Proxy.cpp プロジェクト: OspreyHub/ATCD
void
TAO_Notify_Proxy::save_attrs (TAO_Notify::NVPList& attrs)
{
  TAO_Notify_Object::save_attrs(attrs);
  TAO_Notify_Peer * peer = this->peer();
  if (peer != 0)
  {
    attrs.push_back (TAO_Notify::NVP("PeerIOR", peer->get_ior()));
  }
}
コード例 #3
0
ファイル: FilterAdmin.cpp プロジェクト: OspreyHub/ATCD
void
TAO_Notify_FilterAdmin::save_persistent (TAO_Notify::Topology_Saver& saver)
{
  if (this->filter_list_.current_size() == 0)
    return;

  bool changed = true;

  TAO_Notify::NVPList attrs;
  bool want_children = saver.begin_object(0, "filter_admin", attrs, changed);
  if (want_children)
  {
    FILTER_LIST::ITERATOR iter (this->filter_list_);
    FILTER_LIST::ENTRY* entry;

    TAO_Notify_Properties* properties = TAO_Notify_PROPERTIES::instance();
    CORBA::ORB_var orb = properties->orb();
    ACE_ASSERT(! CORBA::is_nil(orb.in()));

    for (; iter.next(entry) != 0; iter.advance())
    {
      TAO_Notify::NVPList fattrs;
      CORBA::Long id = entry->ext_id_;

      //TBD: this presume the filter always collocated.
      //otherwise we need modify the filter interface to add get_filter_id()

      TAO_Notify_FilterFactory* factory = ec_->default_filter_factory_servant ();
      TAO_Notify_Object::ID mapid = factory->get_filter_id (entry->int_id_.in ());

      fattrs.push_back(TAO_Notify::NVP("MapId", mapid));
      saver.begin_object(id, "filter", fattrs, changed);
      saver.end_object(id, "filter");
    }
  }

  saver.end_object(0, "filter_admin");
}