20 #ifndef __APRILLIBRARY_INC__
21 #define __APRILLIBRARY_INC__
32 #include <libbbb/1/list2d.h>
55 typedef Factory * (*FactoryCreator) ( World * w,
const QString & s_name );
92 void save ( QSettings & s );
95 void load ( QSettings & s );
121 QMap<QString,WorldFactory*> world_factories_;
124 QMap<QString,FactoryCreator> factories_src_;
174 void loadProps (
void );
182 void saveProps (
void );
186 { Q_ASSERT( uniq_ != NULL );
return uniq_->props_; }
201 static bool hasWorld (
206 static void remWorld (
212 static World * firstWorld (
void );
215 static QString uniqueWorldName (
const QString & pattern );
218 static int worldsCount (
void )
219 {
return uniq_->worlds_.count(); }
222 static World * findWorld (
const QString & s_name );
225 static World * worldAt (
int i );
228 static bool setCrtWorld (
World * new_crt );
232 {
return uniq_->def_world_; }
245 static void addWorld (
252 void internalAddWorld (
World * world );
255 void internalRemWorld (
World * world );
273 static bool unloadPlugIn (
const QString & s );
297 static int pluginsCount (
void )
298 {
return uniq_->plugins_.count(); }
315 static bool registerFactory (
316 const QString & s_name,
317 FactoryCreator callback
321 static bool unregisterFactory (
322 const QString & s_name,
323 FactoryCreator callback
327 static QString defaultWorldFactoryName (
void );
330 static Factory * factoryForString (
332 const QString & s_name
348 static bool addWorldFactory (
354 static bool remWorldFactory (
368 static Factory * defaultWorldFactoryCreator (
370 const QString & s_name
374 void registerFactoryCreators (
void );
404 #endif // __APRILLIBRARY_INC__