Ejemplo n.º 1
0
  void keyword_manager::register_plugin_keywords()
  {
    const std::vector <type_tuple> &types = BS_KERNEL.registered_types ();
    sp_keyword_info_base_t keywords;
    const type_descriptor &keyword_info_td = keyword_info_base ::bs_type ();
    sp_objbase keyword_manager (this);
    
    for (size_t i = 0, cnt = types.size (); i < cnt; ++i)
      {
        const type_descriptor &td = types[i].td_;
        type_descriptor parent_td = td;
        while (!parent_td.is_nil ())
          {
            if (parent_td.stype_ == keyword_info_td.stype_)
              {
                keywords = BS_KERNEL.create_object (td);
                BOSOUT (section::keywords, level::low) << boost::format ("Loading keywords from [%s]...") % td.short_descr_ << bs_end;
                keywords->register_keywords (keyword_manager);

                break;
              }

            parent_td = parent_td.parent_td ();
          }
      }
  }
Ejemplo n.º 2
0
 void
 well_keywords::register_keywords (sp_objbase &km, std::string /*provider*/) const
 {
   BS_SP (keyword_manager_iface) keyword_manager (km, bs_dynamic_cast ());
   BS_ASSERT (keyword_manager);
   std::vector<std::string> names(1);
 
   names[0] = "csv_schedule";
 
   keyword_manager->register_prop_keyword ("CSV_SCHEDULE", "S", names, &this_t::CSV_SHEDULE_reactor);
   //keyword_manager->register_keyword ("CSV_SHEDULE", keyword_handler(CSV_SHEDULE_reader, CSV_SHEDULE_reactor);
  
 }
Ejemplo n.º 3
0
 void smesh_keywords::register_keywords (sp_objbase &km, std::string provider) const
   {
     smart_ptr <keyword_manager_iface , true> keyword_manager (km);
     keyword_manager->register_supported_keyword ("DIMENS", provider);
     keyword_manager->register_supported_keyword ("ACTNUM", provider);
     keyword_manager->register_supported_keyword ("PERMX", provider);
     keyword_manager->register_supported_keyword ("PERMY", provider);
     keyword_manager->register_supported_keyword ("PERMZ", provider);
     keyword_manager->register_supported_keyword ("PORO", provider);
     keyword_manager->register_supported_keyword ("NTG", provider);
     keyword_manager->register_supported_keyword ("MULTX", provider);
     keyword_manager->register_supported_keyword ("MULTY", provider);
     keyword_manager->register_supported_keyword ("MULTZ", provider);
     keyword_manager->register_supported_keyword ("MULTPV", provider);
   }
Ejemplo n.º 4
0
  void
  equil_keywords::register_keywords (sp_objbase &km, std::string provider) const
  {
    BS_SP (keyword_manager_iface) keyword_manager (km, bs_dynamic_cast ());
    BS_ASSERT (keyword_manager);

    if (provider == "")
      {
        provider = "EQUIL_MODEL";
        keyword_manager->register_keyword ("EQUIL_MODEL", keyword_handler (0, activate));
      }

    keyword_manager->register_supported_keyword ("EQUIL", provider);
    keyword_manager->register_supported_keyword ("RSVD", provider);
    keyword_manager->register_supported_keyword ("PBVD", provider);
  }