Beispiel #1
0
McEnvironment::McEnvironment(Parser* parser) : parser(parser) {
	/* Register the module factories */
	registerFactory(new MaterialsFactory(this));
	registerFactory(new AceFactory(this));
	registerFactory(new GeometryFactory(this));
	registerFactory(new SourceFactory(this));
}
NavigationPlayerManager::NavigationPlayerManager()
{
    registerFactory(new NavigationPlayerFactory<NormalNavigationPlayer>());
    registerFactory(new NavigationPlayerFactory<ExpandingNavigationPlayer>());
    registerFactory(new NavigationPlayerFactory<FixedRegionNavigationPlayer>());
    registerFactory(new NavigationPlayerFactory<CascadeClassifierNavigationPlayer>());
    registerFactory(new NavigationPlayerFactory<MangaNavigationPlayer>());

    // Register plugins
    sapi::PluginLoadCallback<sapi::INavigationPlayerPlugin> callback = [this](sapi::INavigationPlayerPlugin *plugin, const QJsonObject &meta) {
        this->registerFactory(new PluginNavigationPlayerFactory(plugin, meta));
    };

    sapi::loadPlugins("navigationplayers", callback);
}
ossimFontFactoryRegistry::ossimFontFactoryRegistry()
:theDefaultFont(NULL)
{
   // theInstance = this;
#if OSSIM_HAS_FREETYPE
   registerFactory(ossimFreeTypeFontFactory::instance());
#endif
}
Beispiel #4
0
URegistryKey
ICULocaleService::registerInstance(UObject* objToAdopt, const UnicodeString& locale, int32_t kind, int32_t coverage, UErrorCode& status)
{
    ICUServiceFactory * factory = new SimpleLocaleKeyFactory(objToAdopt, locale, kind, coverage);
    if (factory != NULL) {
        return registerFactory(factory, status);
    }
    delete objToAdopt;
    return NULL;
}
STDAPI DllRegisterServer()
{
	registerFactory( CLSID_MackieControlXT, s_szMackieControlXTFriendlyName );
	registerFactory( CLSID_MackieControlXTPropPage, s_szMackieControlXTFriendlyNamePropPage );
	registerFactory( CLSID_MackieControlMaster, s_szMackieControlMasterFriendlyName );
	registerFactory( CLSID_MackieControlMasterPropPage, s_szMackieControlMasterFriendlyNamePropPage );
	registerFactory( CLSID_MackieControlC4, s_szMackieControlC4FriendlyName );
	registerFactory( CLSID_MackieControlC4PropPage, s_szMackieControlC4FriendlyNamePropPage );

	// Add the CLSID to HKEY_CLASSES_ROOT\CakewalkControlSurfaces
	char szCLSID[ 128 ];
	char szKey[ 256 ];

	CLSIDToString( CLSID_MackieControlXT, szCLSID, sizeof szCLSID );
	strlcpy( szKey, "CakewalkControlSurfaces\\", sizeof(szKey) );
	strlcat( szKey, szCLSID, sizeof(szKey) );
	setKeyAndValue( HKEY_CLASSES_ROOT, szKey, NULL, "Description", s_szMackieControlXTFriendlyName );
	setKeyAndValue( HKEY_CLASSES_ROOT, szKey, NULL, "HelpFilePath", "" );

	CLSIDToString( CLSID_MackieControlMaster, szCLSID, sizeof szCLSID );
	strlcpy( szKey, "CakewalkControlSurfaces\\", sizeof(szKey) );
	strlcat( szKey, szCLSID, sizeof(szKey) );
	setKeyAndValue( HKEY_CLASSES_ROOT, szKey, NULL, "Description", s_szMackieControlMasterFriendlyName );
	setKeyAndValue( HKEY_CLASSES_ROOT, szKey, NULL, "HelpFilePath", "" );
		
	CLSIDToString( CLSID_MackieControlC4, szCLSID, sizeof szCLSID );
	strlcpy( szKey, "CakewalkControlSurfaces\\", sizeof(szKey) );
	strlcat( szKey, szCLSID, sizeof(szKey) );
	setKeyAndValue( HKEY_CLASSES_ROOT, szKey, NULL, "Description", s_szMackieControlC4FriendlyName );
	setKeyAndValue( HKEY_CLASSES_ROOT, szKey, NULL, "HelpFilePath", "" );

	return S_OK;
}
Beispiel #6
0
URegistryKey
ICUService::registerInstance(UObject* objToAdopt, const UnicodeString& id, UBool visible, UErrorCode& status) 
{
    ICUServiceKey* key = createKey(&id, status);
    if (key != NULL) {
        UnicodeString canonicalID;
        key->canonicalID(canonicalID);
        delete key;

        ICUServiceFactory* f = createSimpleFactory(objToAdopt, canonicalID, visible, status);
        if (f != NULL) {
            return registerFactory(f, status);
        }
    }
    delete objToAdopt;
    return NULL;
}
EditPartFactory::EditPartFactory()
{
	registerFactory (shared_ptr< ModelElementType >(
		new ModelElementType( typeid(RectangleShape).name(), 
			Glib::ustring(_("Rectangle")),
			loadPixbuf ("draw-rectangle.png"),
			shared_ptr< IBoundsModelElement >( new BoundsShape() ) )), 
		&createObject< RectangleShapeEditPart >);

	registerFactory (shared_ptr< ModelElementType >(
		new ModelElementType( typeid(EllipseShape).name(), 
			Glib::ustring(_("Ellipse")),
			loadPixbuf ("draw-ellipse.png"),
			shared_ptr< IBoundsModelElement >( new BoundsShape() ) )), 
		&createObject< EllipseShapeEditPart >);
		
	registerFactory (shared_ptr< ModelElementType >(
		new ModelElementType( typeid(Frame).name(), 
			Glib::ustring(_("Frame")),
			loadPixbuf ("draw-rectangle.png"),
			shared_ptr< IBoundsModelElement >( new BoundsFrame() ) )), 
		&createObject< FrameEditPart >);
		
	registerFactory (shared_ptr< ModelElementType >(
		new ModelElementType( typeid(LineBase).name(), 
			Glib::ustring(_("Line")),
			loadPixbuf ("draw-line.png"),
			shared_ptr< IBoundsModelElement >( new BoundsLine() ) )), 
		&createObject< LineEditPart >);
		
	registerFactory (shared_ptr< ModelElementType >(
		new ModelElementType( typeid(CurveLine).name(), 
			Glib::ustring(_("Curve")),
			loadPixbuf ("draw-curve.png"),
			&createInsertTool< InsertCurveTool > )), 
		&createObject< CurveEditPart >);

	registerFactory (shared_ptr< ModelElementType >(
		new ModelElementType( typeid(TextShape).name(), 
			Glib::ustring(_("Text")),
			loadPixbuf ("draw-text.png"),
			shared_ptr< IBoundsModelElement >( new BoundsShape() ) )), 
		&createObject< TextEditPart >);
		
	registerFactory (shared_ptr< ModelElementType >(
		new ModelElementType( typeid(Diagram).name(), Glib::ustring(_("Diagram")), true)), 
		&createObject< DiagramEditPart >);
}
void rspfProjectionFactoryRegistry::initializeDefaults()
{
   registerFactory(rspfSensorModelFactory::instance());
   registerFactory(rspfNitfProjectionFactory::instance());
   registerFactory(rspfTiffProjectionFactory::instance());
   registerFactory(rspfWktProjectionFactory::instance());
   registerFactory(rspfMapProjectionFactory::instance());
   registerFactory(rspfMiscProjectionFactory::instance());

   // KEEP THIS LAST PLEASE!
   // This factory constructs map projections from EPSG codes. An infinite loop will occur if this
   // is placed before the explicit (non-coded) factories, since this factory will invoke the above
   // factories via this registry after populating a KWL which includes a PCS code. If this factory
   // sees that request before the others, it will be caught in a loop.
   registerFactory(rspfEpsgProjectionFactory::instance()); 
}
Beispiel #9
0
LabelItemFactory::LabelItemFactory()
: GraphicsFactory() {
  registerFactory("label", this);
}
void RelationFactory::registerFactory(const QStringList& nodes, RelationFactory *factory) {
  foreach (const QString n, nodes) {
    registerFactory(n, factory);
  }
Beispiel #11
0
PCSpeakerFactoryManager::PCSpeakerFactoryManager() {
	// Register the default
	registerFactory("emu", "Software Emulation", &createEmulatedPCSpeaker);
}
BasicPluginFactory::BasicPluginFactory()
: ObjectFactory() {
  registerFactory(BasicPlugin::staticTypeTag, this);
}
Beispiel #13
0
 CalendarService()
   : ICULocaleService("Calendar")
 {
   UErrorCode status = U_ZERO_ERROR;
   registerFactory(new DefaultCalendarFactory(), status);
 }
void GraphicsFactory::registerFactory(const QStringList& nodes, GraphicsFactory *factory) {
  foreach (const QString n, nodes) {
    registerFactory(n, factory);
  }
Beispiel #15
0
 ICUBreakIteratorService()
     : ICULocaleService(UNICODE_STRING("Break Iterator", 14))
 {
     UErrorCode status = U_ZERO_ERROR;
     registerFactory(new ICUBreakIteratorFactory(), status);
 }
EditableMatrixFactory::EditableMatrixFactory()
: PrimitiveFactory() {
  registerFactory(EditableMatrix::staticTypeTag, this);
}
PictureItemFactory::PictureItemFactory()
: GraphicsFactory() {
  registerFactory("picture", this);
}
EventMonitorFactory::EventMonitorFactory()
: ObjectFactory() {
  registerFactory(EventMonitorEntry::staticTypeTag, this);
}
Beispiel #19
0
void 
TestFactoryRegistry::registerFactory( const std::string &name,
                                      TestFactory *factory )
{
  registerFactory( factory );
}
EquationFactory::EquationFactory()
: ObjectFactory() {
  registerFactory(Equation::staticTypeTag, this);
}
Beispiel #21
0
SvgItemFactory::SvgItemFactory()
: GraphicsFactory() {
  registerFactory("svg", this);
}
Beispiel #22
0
ComponentRegistry::ComponentRegistry() :
        u1("^(.*?\\$.+?)$"),
        strip_it("^\\s*(.+?)\\s*$")
{

	// register all of the built-ins here
	registerFactory("experiment", new ExperimentFactory());
	registerFactory("protocol", new ProtocolFactory());
	registerFactory("block", new BlockFactory());
	registerFactory("list", new GenericListStateFactory());
	registerFactory("trial", new TrialFactory());
	
	
	registerFactory("task_system", new TaskSystemFactory());
	registerFactory("task_system_state", new TaskSystemStateFactory());
	
	registerFactory("variable", new VariableFactory());
	registerFactory("variable/selection", new SelectionVariableFactory());
	
	
	registerFactory("action/schedule", new ScheduledActionsFactory());
	registerFactory("action/if", new IfFactory());
    registerFactory<StandardComponentFactory, IfElse>();
	
	
	registerFactory("action/assignment", new AssignmentFactory());
	registerFactory("action/pulse", new PulseFactory());
    registerFactory<StandardComponentFactory, ReportString>();
    registerFactory<StandardComponentFactory, AssertionAction>();
	registerFactory("action/next_selection", new NextVariableSelectionFactory());
	registerFactory("action/set_timebase", new SetTimeBaseFactory());
	registerFactory("action/start_timer", new StartTimerFactory());
	registerFactory("action/wait", new WaitFactory());
	registerFactory("action/load_stimulus", new LoadStimulusFactory());
    registerFactory("action/unload_stimulus", new UnloadStimulusFactory());
    registerFactory("action/queue_stimulus", new QueueStimulusFactory());
	registerFactoryAlias("action/queue_stimulus", "action/show_stimulus");
	registerFactory("action/live_queue_stimulus", new LiveQueueStimulusFactory());
	registerFactory("action/dequeue_stimulus", new DequeueStimulusFactory());
	registerFactoryAlias("action/dequeue_stimulus", "action/hide_stimulus");
	registerFactory("action/bring_stimulus_to_front", new BringStimulusToFrontFactory());
	registerFactory("action/send_stimulus_to_back", new SendStimulusToBackFactory());
	registerFactory("action/update_stimulus_display", new UpdateStimulusDisplayFactory());
	registerFactory("action/play_sound", new PlaySoundFactory());
	registerFactory("action/stop_sound", new StopSoundFactory());
	registerFactory("action/pause_sound", new PauseSoundFactory());
	registerFactory("action/start_device_io", new StartDeviceIOFactory());
	registerFactory("action/stop_device_io", new StopDeviceIOFactory());
	registerFactory("action/reset_selection", new ResetSelectionFactory());
	registerFactory("action/accept_selections", new AcceptSelectionsFactory());
	registerFactory("action/reject_selections", new RejectSelectionsFactory());
    registerFactory<StandardComponentFactory, StopExperiment>();
    registerFactory<StandardComponentFactory, PauseExperiment>();
    registerFactory<StandardComponentFactory, ResumeExperiment>();
	registerFactory("action/take_calibration_sample", new TakeCalibrationSampleNowFactory());
	registerFactory("action/begin_calibration_average", new StartAverageCalibrationSampleFactory());
	registerFactory("action/end_calibration_average_and_ignore", new EndAverageAndIgnoreFactory());
	registerFactory("action/end_calibration_average_and_take_sample", new EndAverageAndTakeCalibrationSampleFactory());
	registerFactory("action/update_calibration", new CalibrateNowFactory());
	registerFactory("action/clear_calibration", new ClearCalibrationFactory());

    registerFactory<StandardComponentFactory, PlayDynamicStimulus>();
    registerFactory<StandardComponentFactory, StopDynamicStimulus>();
    registerFactory<StandardComponentFactory, PauseDynamicStimulus>();
    registerFactory<StandardComponentFactory, UnpauseDynamicStimulus>();
            
            
	// transitions
	registerFactory("transition", new TransitionFactory());
	
	// var transform adapters
	registerFactory("averager", new AveragerUserFactory());
	registerFactory("calibrator/standard_eye_calibrator", new EyeCalibratorFactory());
	registerFactory("calibrator/linear_eye_calibrator", new LinearEyeCalibratorFactory());
	registerFactory("filter/basic_eye_monitor", new EyeStatusMonitorVer1Factory());
	registerFactory("advanced_eye_monitor", new EyeStatusMonitorVer2Factory());
	registerFactory("filter/boxcar_filter_1d", new Filter_BoxcarFilter1DFactory());
	registerFactory("linear_filter_1d", new Filter_LinearFilter1DFactory());
	registerFactory("staircase", new SimpleStaircaseOptimizerFactory());
    registerFactory("bias_monitor", new BiasMonitorFactory());
	
	// IO devices
    registerFactory<StandardComponentFactory, DummyIODevice>();
    registerFactory<StandardComponentFactory, IOChannelRequest>();
    registerFactory<StandardComponentFactory, StimulusDisplayDevice>();
	
	// stimuli
    registerFactory<StandardStimulusFactory, BlankScreen>();
    registerFactory<StandardStimulusFactory, ImageStimulus>();
    registerFactory<StandardStimulusFactory, RectangleStimulus>();
    registerFactory<StandardStimulusFactory, FixationPoint>();
    registerFactory<StandardComponentFactory, StimulusGroup>();
	
	// sounds
    registerFactory<StandardComponentFactory, WavFileSound>();
    
}
Beispiel #23
0
 ICUCollatorService()
     : ICULocaleService(UNICODE_STRING_SIMPLE("Collator"))
 {
     UErrorCode status = U_ZERO_ERROR;
     registerFactory(new ICUCollatorFactory(), status);
 }
Beispiel #24
0
 ICUNumberFormatService()
   : ICULocaleService("Number Format")
 {
   UErrorCode status = U_ZERO_ERROR;
   registerFactory(new ICUNumberFormatFactory(), status);
 }
ossimImageHandlerRegistry::ossimImageHandlerRegistry()
{
   ossimObjectFactoryRegistry::instance()->registerFactory(this);
   registerFactory(ossimImageHandlerFactory::instance());
}
GeneratedMatrixFactory::GeneratedMatrixFactory()
: PrimitiveFactory() {
  registerFactory(GeneratedMatrix::staticTypeTag, this);
}
Beispiel #27
0
ArrowItemFactory::ArrowItemFactory()
: GraphicsFactory() {
  registerFactory("arrow", this);
}
DataMatrixFactory::DataMatrixFactory()
: PrimitiveFactory() {
  registerFactory(DataMatrix::staticTypeTag, this);
}
Beispiel #29
0
void 
TestFactoryRegistry::addRegistry( const std::string &name )
{
  registerFactory( &getRegistry( name ) );
}
Beispiel #30
0
 ICUNumberFormatService()
     : ICULocaleService(UNICODE_STRING_SIMPLE("Number Format"))
 {
     UErrorCode status = U_ZERO_ERROR;
     registerFactory(new ICUNumberFormatFactory(), status);
 }