Example #1
0
void library::add(imgtool_get_info get_info)
{
	int (*make_class)(int index, imgtool_class *imgclass);
	imgtool_class imgclass;
	int i, result;

	// try this class
	memset(&imgclass, 0, sizeof(imgclass));
	imgclass.get_info = get_info;

	// do we have derived getinfo functions?
	make_class = (int (*)(int index, imgtool_class *imgclass))
		imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_MAKE_CLASS);

	if (make_class)
	{
		i = 0;
		do
		{
			// clear out the class
			memset(&imgclass, 0, sizeof(imgclass));
			imgclass.get_info = get_info;

			// make the class
			result = make_class(i++, &imgclass);
			if (result)
				add_class(&imgclass);
		}
		while(result);
	}
	else
	{
		add_class(&imgclass);
	}
}
static void add_classes(PyObject * module)
{
    add_class(module, &pybreezyslam_ScanType, "Scan");
    add_class(module,   &pybreezyslam_MapType, "Map");
    add_class(module, &pybreezyslam_PositionType, "Position");
    add_class(module, &pybreezyslam_LaserType, "Laser");
    add_class(module, &pybreezyslam_RandomizerType, "Randomizer");
}
Example #3
0
/* build tree from back refs */
void
back_trace_rt(struct RP_class *root)
{
 xrefblk_t xb;
 size_t namelen;
 int ok;

 for ( ok = xb.first_to(root->CRuntime,XREF_ALL); ok; ok=xb.next_to() )
 {
   if ( xb.iscode )
    continue;
   namelen = check_for_RTStruct(xb.from - 16);
   if ( !namelen )
   {
    /* check for possible vtbl */
    ea_t vtbl = check_for_vtbl(xb.from);
    if ( vtbl == NULL )
     continue;
    root->vtbl = vtbl; /* And what I have to do if we already have vtbl ? */
    continue;
   }
   add_class(root, xb.from - 16, namelen);
   make_RTStruct(xb.from - 16, namelen);
 }
 /* go to next level */
 for ( ok = 0; ok < root->total; ok++ )
   back_trace_rt(root->children[ok]);
}
Example #4
0
void FindBar::build_widgets(Glib::RefPtr<Gtk::Builder>& builder) {
    builder->get_widget("find_bar", find_bar_);
    builder->get_widget("find_entry", find_entry_);
    builder->get_widget("replace_entry", replace_entry_);
    builder->get_widget("find_next_button", find_next_button_);
    builder->get_widget("replace_button", replace_button_);
    builder->get_widget("replace_all_button", replace_all_button_);
    builder->get_widget("find_close_button", close_button_);
    builder->get_widget("case_sensitive", case_sensitive_);

    find_entry_->signal_changed().connect(sigc::mem_fun(this, &FindBar::on_entry_changed));
    find_entry_->signal_activate().connect(sigc::mem_fun(this, &FindBar::on_entry_activated));
    find_entry_->signal_key_press_event().connect(sigc::mem_fun(this, &FindBar::on_entry_key_press));

    find_next_button_->signal_clicked().connect(sigc::mem_fun(this, &FindBar::on_find_next_clicked));

    close_button_->signal_clicked().connect([&]() {
        signal_close_requested_();
    });

    find_entry_->add_events(Gdk::KEY_PRESS_MASK);
    case_sensitive_->signal_state_changed().connect(sigc::mem_fun(this, &FindBar::on_case_sensitive_changed));

    auto context = Gtk::StyleContext::create();
    auto entry_path = find_entry_->get_path();
    context->set_path(entry_path);
    context->add_class("entry");

    default_entry_colour_ = context->get_color(Gtk::STATE_FLAG_FOCUSED);
}
Example #5
0
    Class* open_class(STATE, GCToken gct, CallFrame* call_frame, Module* under, Object* super, Symbol* name, bool* created) {
      bool found;

      *created = false;

      Object* obj = under->get_const(state, name, &found);

      OnStack<4> os(state, under, super, name, obj);

      if(found) {
        TypedRoot<Object*> sup(state, super);

        if(Autoload* autoload = try_as<Autoload>(obj)) {
          obj = autoload->resolve(state, gct, call_frame, true);

          // Check if an exception occurred
          if(!obj) return NULL;
        }

        // Autoload::resolve will return nil if code loading failed, in which
        // case we ignore the autoload.
        if(!obj->nil_p()) {
          return check_superclass(state, call_frame, as<Class>(obj), sup.get());
        }
      }

      *created = true;
      return add_class(state, under, super, name);
    }
Example #6
0
    Class* open_class(STATE, GCToken gct, CallFrame* call_frame, Module* under, Object* super, Symbol* name, bool* created) {
      ConstantMissingReason reason;

      *created = false;

      Object* obj = under->get_const(state, name, G(sym_public), &reason);

      if(reason == vFound) {
        OnStack<4> os(state, under, super, name, obj);

        if(Autoload* autoload = try_as<Autoload>(obj)) {
          obj = autoload->resolve(state, gct, call_frame, under, true);

          // Check if an exception occurred
          if(!obj) return NULL;
        }

        // Autoload::resolve will return nil if code loading failed, in which
        // case we ignore the autoload.
        if(!obj->nil_p()) {
          return check_superclass(state, call_frame, as<Class>(obj), super);
        }
      }

      *created = true;
      return add_class(state, under, super, name);
    }
TypeSystemInstance::TypeSystemInstance()
{
    // The runtime type system creates the type info cache.
    // In order to get the DLLs using the same static TypeInfo instance we have to "smuggle" in a pointer to it via this object.
    dll_shared_typeinfo = new TypeInfoCache;
    TypeInfoCache::set_instance(dll_shared_typeinfo);

    Namespace global_ns = Namespace::global(*this);

    // Register proxy methods (methods that act on the ExprProxy instead of the object itself)
    // Everything below here uses proxy methods.
    static TypeIndex proxy_methods_type = BetterTypeInfo::create_index<ProxyMethodsType>();
    proxy_methods = new ProxyMethods(proxy_methods_type, "ProxyMethods", *this, NamespacePath::global());
    add_class(proxy_methods_type, proxy_methods);
    proxy_methods->bind_method("get_class", &AbstractCppObjProxy::get_class);
    proxy_methods->bind_method("get_type", &AbstractCppObjProxy::get_type);
    proxy_methods->bind_method("lm_get_type", &AbstractCppObjProxy::get_type);  // Added this because AbstractClass class_proxy also has a get_type we don't want to call
    proxy_methods->bind_method("describe", &AbstractCppObjProxy::describe);
    proxy_methods->bind_method("get_base_names", &AbstractCppObjProxy::get_base_names);

    // Allow conversions from nil to any pointer.
    static TypeIndex nil_expr_type = BetterTypeInfo::create_index<BottomPtrType>();
    conv_graph.add_type(nil_expr_type);

    // register void so functions returning void will work right.
    static TypeIndex void_type = BetterTypeInfo::create_index<void>();
    auto void_class = new DummyClass<void>(void_type, "void", *this, NamespacePath::global());
    add_class(void_type, void_class);
    void_class->add_base_abstr(proxy_methods);

    // register the Bottom Pointer so unsafe_ptr_cast will work.
    static TypeIndex bot_type = BetterTypeInfo::create_index<BottomPtrTag__>();
    auto bot_class = new DummyClass<BottomPtrTag__>(bot_type, "unsafe_ptr_cast", *this, NamespacePath::global());
    add_class(bot_type, bot_class);
    bot_class->add_base_abstr(proxy_methods);
    add_conv<BottomPtrTag__*&, BottomPtrTag__*>();
    add_conv<BottomPtrTag__* const&, BottomPtrTag__*>();

    // register the Unknown_CppObj so functions returning unregistered classes
    // can still be called.
    static TypeIndex unknown_type = BetterTypeInfo::create_index<Unknown_CppObj>();
    auto unknown_class = new DummyClass<Unknown_CppObj>(unknown_type, "Unknown_CppObj", *this, NamespacePath::global());
    add_class(unknown_type, unknown_class);
    unknown_class->add_base_abstr(proxy_methods);
    this->unknown_class = unknown_class;
}
Example #8
0
void LinkPromLink::realize() {
	ModulePromGroup* s = link->project->get(link->src);
	if(!s) { ERROR("Unknown module : " << link->src); return;}
	ModulePromGroup* d = link->project->get(link->dst);
	if(!d) { ERROR("Unknown module : " << link->dst); return;}
	connect(s,d);
	if(link->type == "") add_class("seq");
	if(link->type == "-") add_class("sync");
	if(link->type == "0") add_class("clock");
	if(link->type == "/") add_class("async");

	if(link->properties.get("bezier_x2")) component->b->x2 = TOFLOAT(link->properties.get_as_string("bezier_x2"));
	if(link->properties.get("bezier_y2")) component->b->y2 = TOFLOAT(link->properties.get_as_string("bezier_y2"));
	if(link->properties.get("bezier_x3")) component->b->x3 = TOFLOAT(link->properties.get_as_string("bezier_x3"));
	if(link->properties.get("bezier_y3")) component->b->y3 = TOFLOAT(link->properties.get_as_string("bezier_y3"));
	if(!link->properties.get("bezier_x2") && src==dst) component->b->set(120,0,0,-120);
}
Example #9
0
environment decl_attributes::apply(environment env, io_state const & ios, name const & d) const {
    if (m_is_instance) {
        if (m_priority) {
            #if defined(__GNUC__) && !defined(__CLANG__)
            #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
            #endif
            env = add_instance(env, d, *m_priority, m_persistent);
        } else {
            env = add_instance(env, d, m_persistent);
        }
    }
    if (m_is_trans_instance) {
        if (m_priority) {
            #if defined(__GNUC__) && !defined(__CLANG__)
            #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
            #endif
            env = add_trans_instance(env, d, *m_priority, m_persistent);
        } else {
            env = add_trans_instance(env, d, m_persistent);
        }
    }
    if (m_is_coercion)
        env = add_coercion(env, ios, d, m_persistent);
    auto decl = env.find(d);
    if (decl && decl->is_definition()) {
        if (m_is_reducible)
            env = set_reducible(env, d, reducible_status::Reducible, m_persistent);
        if (m_is_irreducible)
            env = set_reducible(env, d, reducible_status::Irreducible, m_persistent);
        if (m_is_semireducible)
            env = set_reducible(env, d, reducible_status::Semireducible, m_persistent);
        if (m_is_quasireducible)
            env = set_reducible(env, d, reducible_status::Quasireducible, m_persistent);
        if (m_unfold_hint)
            env = add_unfold_hint(env, d, m_unfold_hint, m_persistent);
        if (m_unfold_full_hint)
            env = add_unfold_full_hint(env, d, m_persistent);
    }
    if (m_constructor_hint)
        env = add_constructor_hint(env, d, m_persistent);
    if (m_symm)
        env = add_symm(env, d, m_persistent);
    if (m_refl)
        env = add_refl(env, d, m_persistent);
    if (m_trans)
        env = add_trans(env, d, m_persistent);
    if (m_subst)
        env = add_subst(env, d, m_persistent);
    if (m_recursor)
        env = add_user_recursor(env, d, m_recursor_major_pos, m_persistent);
    if (m_is_class)
        env = add_class(env, d, m_persistent);
    if (m_rewrite)
        env = add_rewrite_rule(env, d, m_persistent);
    if (m_has_multiple_instances)
        env = mark_multiple_instances(env, d, m_persistent);
    return env;
}
Example #10
0
VALUE add_class(VALUE self,VALUE name){int i;
  char *clasname=RSTRING_PTR(name);
  if (!clasno&& strcmp(clasname,"Class")) add_class(self,rb_str_new2("Class"));
  for (i=0;i<clasno;i++)
    if (!strcmp(clasname,class_names[i])) return INT2FIX(i);
  class_names[clasno]=strdup(clasname);
  methods[clasno]=calloc(sizeof(void *),100);
  class_obj[clasno]=Class(clasname);
  clasno++;
  return INT2FIX(clasno-1);
}
Example #11
0
void LinkPromLink::realize() {
	ModulePromGroup* s = link->project->get(link->src);
	if(!s) { ERROR("Unknown module : " << link->src); return;}
	ModulePromGroup* d = link->project->get(link->dst);
	if(!d) { ERROR("Unknown module : " << link->dst); return;}
	connect(s,d);
	if(link->is_type_algo()) add_class("algo");
	else {
		if(link->type == No_l_1_a || link->type == No_l_1_t) add_class("one_to_all");
		if(link->type == No_l_1_1_modif || link->type == No_l_1_1_non_modif) add_class("one_to_one");
		if(link->type == No_l_neuro_mod) add_class("neuromod");
	}

	if(link->secondary > 0) add_class("secondary");

	if(link->annotations.get("bezier_x2")) component->b->x2 = TOFLOAT(link->annotations.get_as_string("bezier_x2"));
	if(link->annotations.get("bezier_y2")) component->b->y2 = TOFLOAT(link->annotations.get_as_string("bezier_y2"));
	if(link->annotations.get("bezier_x3")) component->b->x3 = TOFLOAT(link->annotations.get_as_string("bezier_x3"));
	if(link->annotations.get("bezier_y3")) component->b->y3 = TOFLOAT(link->annotations.get_as_string("bezier_y3"));
	if(!link->annotations.get("bezier_x2") && src==dst) component->b->set(120,0,0,-120);
}
void Tango::DServer::class_factory()
{
	add_class(LimaDetector_ns::LimaDetectorClass::init("LimaDetector"));
	
#ifdef SIMULATOR_ENABLED
	add_class(SimulatorCCD_ns::SimulatorCCDClass::init("SimulatorCCD"));
#endif

#ifdef BASLER_ENABLED
	add_class(BaslerCCD_ns::BaslerCCDClass::init("BaslerCCD"));
#endif

#ifdef PILATUS_ENABLED
	add_class(PilatusPixelDetector_ns::PilatusPixelDetectorClass::init("PilatusPixelDetector"));
#endif

#ifdef XPAD_ENABLED	
	add_class(XpadPixelDetector_ns::XpadPixelDetectorClass::init("XpadPixelDetector"));
#endif

#ifdef MARCCD_ENABLED	
	add_class(MarCCD_ns::MarCCDClass::init("MarCCD"));
#endif

#ifdef ADSC_ENABLED	
	add_class(AdscCCD_ns::AdscCCDClass::init("AdscCCD"));
#endif

#ifdef PROSILICA_ENABLED
	add_class(ProsilicaCCD_ns::ProsilicaCCDClass::init("ProsilicaCCD"));
#endif

#ifdef PRINCETON_ENABLED
	add_class(PrincetonCCD_ns::PrincetonCCDClass::init("PrincetonCCD"));
#endif

#ifdef PCO_ENABLED
	add_class(Pco_ns::PcoClass::init("Pco"));
#endif
}
Example #13
0
/**
    Add type. Returns the index of the new type on success,
    FREESASA_FAIL if realloc/strdup fails, FREESASA_WARN if type
    already known (ignore duplicates).
 */
static int
add_type(struct classifier_types *types,
         const char *type_name,
         const char *class_name, 
         double r)
{
    int the_class, n = types->n_types + 1;
    char **tn = types->name;
    double *tr = types->type_radius;
    int *tc = types->type_class;
    
    if (find_string(types->name, type_name, types->n_types) >= 0)
        return freesasa_warn("Ignoring duplicate entry for '%s'.", type_name);
    
    the_class = add_class(types,class_name);
    if (the_class == FREESASA_FAIL) {
        return mem_fail();
    }
    
    if ((types->name = realloc(tn, sizeof(char*)*n)) == NULL) {
        types->name = tn;
        return mem_fail();
    }
    
    if ((types->type_radius = realloc(tr, sizeof(double)*n)) == NULL) {
        types->type_radius = tr;
        return mem_fail();
    }
    
    if ((types->type_class = realloc(tc, sizeof(int) * n)) == NULL) {
        types->type_class = tc;
        return mem_fail();
    }
    
    if ((types->name[n-1] = strdup(type_name)) == NULL) {
        return mem_fail();
    }
        
    types->n_types++;
    types->type_radius[types->n_types-1] = r;
    types->type_class[types->n_types-1] = the_class;
    return types->n_types-1;
}
Example #14
0
END_TEST

START_TEST (test_classifier) 
{
    freesasa_set_verbosity(FREESASA_V_SILENT);

    set_fail_freq(1);
    ck_assert_ptr_eq(classifier_types_new(),NULL);
    ck_assert_ptr_eq(classifier_residue_new("A"),NULL);
    ck_assert_ptr_eq(classifier_config_new(),NULL);

    for (int i = 1; i < 5; ++i) {
        set_fail_freq(10000);
        struct classifier_types *types = classifier_types_new();
        struct classifier_residue *res = classifier_residue_new("ALA");
        struct classifier_config *cfg = classifier_config_new();

        if (i < 3) {
            set_fail_freq(i);
            ck_assert_int_eq(add_class(types,"A"),FREESASA_FAIL);        
            set_fail_freq(i);
            ck_assert_int_eq(add_type(types,"a","A",1.0),FREESASA_FAIL);
        } 
        set_fail_freq(i);
        ck_assert_int_eq(add_atom(res,"A",1.0,0),FREESASA_FAIL);
        set_fail_freq(i);
        ck_assert_int_eq(add_residue(cfg,"A"),FREESASA_FAIL);
        classifier_types_free(types);
        classifier_residue_free(res);
        classifier_config_free(cfg);
    }
    // don't test all levels, but make sure errors in low level
    // allocation propagates to the interface
    FILE *config = fopen(SHAREDIR "naccess.config","r");
    ck_assert_ptr_ne(config, NULL);
    for (int i = 1; i < 50; ++i) {
        set_fail_freq(i);
        ck_assert_ptr_eq(freesasa_classifier_from_file(config),NULL);
        rewind(config);
    }
    fclose(config);
    freesasa_set_verbosity(FREESASA_V_NORMAL);
}
Example #15
0
int main()
{
    generate_data();
    printf("University Course Scheduler\n\n");
    student_t *student = register_student();
    int exitted = FALSE;
    int choice = 0;

    while (!exitted) {
        printf("Main Menu\n");
        printf("1 - Search Classes\n");
        printf("2 - Add Class\n");
        printf("3 - Remove Class\n");
        printf("4 - Print Schedule\n");
        printf("5 - Exit\n");
        printf("Choice: ");
        choice = readnum(line, LINE_SIZE);
        if (choice == -1)
            break;

        switch(choice) {
        case 1:
            search_classes(); break;
        case 2:
            add_class(student); break;
        case 3:
            remove_class(student); break;
        case 4:
            student->print_schedule(student); break;
        case 5:
            exitted = TRUE; break;
        default:
            printf("Bad Input\n");
        }
    }

    printf("Exiting.\n");
    return 0;
}
Example #16
0
    Class* open_class(STATE, CallFrame* call_frame, Module* under, Object* super, Symbol* name, bool* created) {
      bool found;

      *created = false;

      Object* obj = under->get_const(state, name, &found);
      if(found) {
        TypedRoot<Object*> sup(state, super);

        if(Autoload* autoload = try_as<Autoload>(obj)) {
          obj = autoload->resolve(state, call_frame);

          // Check if an exception occurred
          if(!obj) return NULL;
        }

        return check_superclass(state, call_frame, as<Class>(obj), sup.get());
      }

      *created = true;
      return add_class(state, under, super, name);
    }
Example #17
0
/**
 * In some limited cases we can do type erasure on an interface when
 * implementors of the interface only implement that interface and have no
 * parent class other than java.lang.Object. We create a base class for those
 * implementors and use the new base class as root, and proceed with type
 * erasure as usual.
 */
void handle_interface_as_root(ModelSpec& spec,
                              Scope& scope,
                              DexStoresVector& stores) {
  TypeSet interface_roots;
  for (const auto root : spec.roots) {
    if (is_interface(type_class(root))) {
      interface_roots.insert(root);
    }
  }

  for (const auto interface_root : interface_roots) {
    auto empty_base =
        create_empty_base_type(spec, interface_root, scope, stores);
    if (empty_base != nullptr) {
      TRACE(TERA, 3, "Changing the root from %s to %s.\n", SHOW(interface_root),
            SHOW(empty_base));
      spec.roots.insert(empty_base);
      add_class(type_class(empty_base), scope, stores);
    }
    // Remove interface roots regardless of whether an empty base was added.
    spec.roots.erase(interface_root);
  }
}
Example #18
0
// ### make-structure-class name include slots => class
Value SYS_make_structure_class(Value name, Value slots, Value include)
{
  if (!symbolp(name))
    return signal_type_error(name, S_symbol);
  if (!listp(slots))
    return signal_type_error(name, S_list);
  StructureClass * c = new StructureClass(name, slots);
  if (include != NIL)
    {
      Value included_class = find_class(include);
      if (included_class == NULL_VALUE)
        {
          String * message = new String(::prin1_to_string(include));
          message->append(" does not name a class.");
          return signal_lisp_error(message);
        }
      c->set_cpl(make_cons(make_value(c), the_class(included_class)->cpl()));
    }
  else
    c->set_cpl(make_cons(make_value(c), the_class(C_structure_object)->cpl()));

  return add_class(name, make_value(c));
}
Example #19
0
int main()
{
  vector<string> classes; //the first line of the ics7 file contains the elements of this
  
  icalproperty_set_x_name(ical_x_class_prop, "X-CLASS");

  icalcomponent* calendar = NULL;
  struct icaltimetype atime;
  struct icalperiodtype rtime;

  //FIXME Later versions will try to load from the default file here
  
  //If we don't have a saved calendar, make a new one
  if (calendar == NULL)
  {
    atime = icaltime_from_timet( time(0),0);

    rtime.start = icaltime_from_timet( time(0),0);
    rtime.end = icaltime_from_timet( time(0),0);
    rtime.end.hour++;
    
    calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
  }
  
  //FIXME Find all non-school days by prompt?
  
  //FIXME Ask for start/end of semester
  
  //Actually manipulating the calendar
  while (true)
  {
    //Prompt for user action
    cout << "What would you like to do?\n" <<
      "1. Add a class\n" <<
      "2. Add an event\n" <<
      "3. Delete an event\n" <<
      "4. Edit an event\n" <<
      "5. Find an event\n" <<
      "6. View an event\n" << 
      "7. Delete a class\n" <<
      "8. Exit the program\n" << endl;
    cout << "Enter the integer corresponding to your choice" << endl;
    
    string user_choice = "";
    cin >> user_choice;
    
    bool user_choice_flag = true;
    
    //Check the string is all digits
    for (int i = 0; i < user_choice.size(); i++)
    {
      if (!isdigit(user_choice[i]))
      {
        cout << "Invalid selection (Not all digits)" << endl;
        user_choice_flag = false;
        break;
      }
    }
    
    if (!user_choice_flag)
    {
      continue;
    }
    
    //Given the choice, perform the desired action
    switch (atoi(user_choice.c_str()))
    {
      //ADD CLASS
      case 1:
      {
        add_class(calendar, classes);
        break;
      }
      
      //ADD EVENT (for a class or in general)
      case 2:
      {
        add_event(calendar);
        break;
      }
      
      //DELETE SINGLE EVENT
      case 3:
      {
        delete_event(calendar);
        break;
      }
      
      //EDIT EVENT (class or general)
      case 4:
      {
        edit_event(calendar);
        break;
      }
      
      //FIND EVENT
      case 5:
      {
        icalcomponent* event = find_event(calendar);
        if (event == NULL)
        {
          append_action_to_closed_log("Find event", false);
        }else
        {
          append_action_to_closed_log("Find event", true);
        }
        break;
      }
      
      //VIEW EVENT
      case 6:
      {
        view_event(calendar);
        break;
      }
      
      //DELETE CLASS
      //FIXME Not implemented in this sprint
      case 7:
      {
        //FIXME Ask for class name
        //FIXME Scan through first level of components for class
        //FIXME Print all matches and get the one to delete
        //FIXME Warn that all events for that class will be deleted
        //FIXME Delete class after user okay
        
        cout << "This feature is not implemented in this sprint." << endl;
        break;
      }
      
      //EXIT
      case 8:
      {
        //Prompt for okay
        if (yes_no_prompt("Your calendar data will not be saved. Continue? (y/n)"))
        {
          return 0;
        }
        
        break;
      }
      
      default:
      {
        cout << "Invalid selection (Not between 1 and 8 inclusive)" << endl;
        break;
      }
    }
  }
  
  return 0;
}
Example #20
0
void Tango::DServer::class_factory()
{

	add_class(GroupManager_ns::GroupManagerClass::init("GroupManager"));

}
Example #21
0
void Tango::DServer::class_factory()
{
	//	Add method class init if needed
	
	add_class(AttributesForwarder_ns::AttributesForwarderClass::init("AttributesForwarder"));
}
void Tango::DServer::class_factory()
{
	//	Add methods for class init
	add_class(Itest2811Controller_ns::Itest2811ControllerClass::init("Itest2811Controller"));

}
Example #23
0
SEXP init_java(SEXP classpath) {
	JavaVMInitArgs initArgs;
	initArgs.version = JNI_VERSION_1_4;

	JavaVMOption options[2];
	std::string classpath_optstr = "-Djava.class.path=";
	classpath_optstr += CHAR(STRING_ELT(classpath,0));

	// these lines require explicit casts to cast away const-ness. I'm trusting
	// Java won't be modifying the options strings.  
	options[0].optionString = (char*)classpath_optstr.c_str();
	options[1].optionString = (char*)"-Djava.version=1.5";
  
    	initArgs.options=options;
    	initArgs.nOptions = 2;

	//jint JNI_GetCreatedJavaVMs(JavaVM **vmBuf, jsize bufLen, jsize *nVMs);
	// See if there's a pre-existing VM, and use it if so. Only the first VM returned
	// is used.
	
	jsize numvms;
	JavaVM *existing_vm;
	JNI_GetCreatedJavaVMs(&existing_vm, 1, &numvms);

	if(numvms > 0)
		existing_vm->AttachCurrentThread((void**)&env, NULL);
	else
		JNI_CreateJavaVM(&jvm, (void**)&env, (void*)&initArgs);

	add_class("RDirectBufferData", "edu/stanford/math/plex/RDirectBufferData");
	add_method("RDirectBufferData", "<init>", "(ILjava/nio/ByteBuffer;)V");
	
	add_class("RipsStream", "edu/stanford/math/plex/RipsStream");
	add_method("RipsStream", "<init>", "(DDILedu/stanford/math/plex/PointData;)V");
	
	add_class("Persistence","edu/stanford/math/plex/Persistence");
	add_method("Persistence", "<init>", "()V");
	add_method("Persistence","computeIntervals", "(Ledu/stanford/math/plex/SimplexStream;)[Ledu/stanford/math/plex/PersistenceInterval$Float;");

	add_class("PersistenceInterval.Float","edu/stanford/math/plex/PersistenceInterval$Float");
	add_method("PersistenceInterval.Float", "<init>", "()V");
	add_method("PersistenceInterval.Float", "2<init>", "(IDD)V");

	add_class("LazyWitnessStream", "edu/stanford/math/plex/LazyWitnessStream");
	add_method("LazyWitnessStream", "<init>", "(DIDI[ILedu/stanford/math/plex/PointData;)V");

	add_class("WitnessStream", "edu/stanford/math/plex/WitnessStream");
	
	add_method("WitnessStream", "<s>makeRandomLandmarks", "(Ledu/stanford/math/plex/PointData;I)[I");
	add_method("WitnessStream", "<s>estimateRmax", "(Ledu/stanford/math/plex/PointData;[I)D");

	add_class("Plex", "edu/stanford/math/plex/Plex");
	add_method("Plex", "<s>FilterInfinite", 
		"([Ledu/stanford/math/plex/PersistenceInterval;)Ledu/stanford/math/plex/Plex$BettiNumbers;");

	add_class("Plex.BettiNumbers", "edu/stanford/math/plex/Plex$BettiNumbers");
	add_method("Plex.BettiNumbers", "toString", "()Ljava/lang/String;");

	add_class("ExplicitStream", "edu/stanford/math/plex/ExplicitStream");
	add_method("ExplicitStream", "<init>", "()V");
	add_method("ExplicitStream", "open", "()V");
	add_method("ExplicitStream", "close", "()V");
	add_method("ExplicitStream", "add", "([ID)V");
	add_method("ExplicitStream", "remove", "([I)V");

	add_class("EuclideanArrayData", "edu/stanford/math/plex/EuclideanArrayData");
	add_method("EuclideanArrayData", "<init>", "([DI)V");	
	add_method("EuclideanArrayData", "2<init>", "(II)V");	

	p = env->NewObject(cl["Persistence"], fn["Persistence.<init>"]);

	return(R_NilValue);
}
Example #24
0
void Tango::DServer::class_factory()
{
	//	Add method class init if needed
	
	add_class(AoudaOBDH_ns::AoudaOBDHClass::init("AoudaOBDH"));
}
Example #25
0
void Tango::DServer::class_factory()
{
	//	Add method class init if needed
	add_class(SEEmulatorBase_ns::SEEmulatorBaseClass::init("SEEmulatorBase"));
}
Example #26
0
obj_Class class_named(char *s){
  int no=FIX2INT(add_class(rb_cObject,rb_str_new2(s)));
  return class_obj[no];
}
Example #27
0
void Tango::DServer::class_factory()
{

	add_class(AdlinkIOCounter_ns::AdlinkIOCounterClass::init("AdlinkIOCounter"));

}
Example #28
0
void Tango::DServer::class_factory()
{
	//	Add method class init if needed
	add_class(BaseDevice_ns::BaseDeviceClass::init("BaseDevice"));
}
Example #29
0
void Tango::DServer::class_factory()
{
	//	Add method class init if needed
	
	add_class(Undulator_ns::UndulatorClass::init("Undulator"));
}
void Tango::DServer::class_factory()
{
	//	Add method class init if needed
	add_class(TangoUserLogFromDB_ns::TangoUserLogFromDBClass::init("TangoUserLogFromDB"));
}