Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
OfClassFactory Class Reference
Inheritance diagram for OfClassFactory:
EventObject CoreCustomData CoreBaseObject CoreBaseType

Classes

class  CategoryTreeNode
 contain a set of OfClass for a given Category. the cateogry name is relative to its parent CategoryTreeNode More...
 

Public Member Functions

 OfClassFactory (OfObjectFactory &objects, const CoreVector< CoreString > &module_path)
 
OfClassadd (const CoreString &class_name, const CoreString &base_class="", const int &flags=0)
 
OfClassadd (const char *buffer)
 
OfClassadd_from_cid (const CoreString &cid)
 
OfClasssecure_declare (const ParserEntry &class_entry, const CoreString &application_key_id)
 
OfClassdeclare (const char *buffer)
 
OfClassget (const CoreString &class_name) const
 
OfClassexists (const CoreString &class_name) const
 
void remove (CoreString class_name)
 
const unsigned int & get_count () const
 
CoreArray< OfClass * > get_classes (const CoreString &class_name="") const
 
void set_class_aliases (OfClass *of_class, const CoreVector< CoreString > &aliases)
 
bool has_class_aliases (OfClass *of_class) const
 
OfClassis_alias (const CoreString &class_name) const
 
void get_class_aliases (const OfClass *of_class, CoreVector< CoreString > &aliases)
 
void add_class_alias (const CoreString &alias, OfClass *of_class)
 
bool is_class_name_available (const CoreString &name) const
 
const CoreVector< CoreString > & get_library_path () const
 
void set_library_path (const CoreVector< CoreString > &library_path)
 
OfObjectFactoryget_objects () const
 
bool get_dso_exists (const CoreString &dso_filename) const
 
void add_dso (const CoreString &dso_filename, const CoreVector< OfClass * > &dso_classes)
 
void scan_modules ()
 
bool add_module (const CoreString &filename)
 
CoreString get_class_module_path (const CoreString &class_name) const
 
const CoreStringget_root_category_name ()
 
void get_category_classes (const CoreString &cat_path, CoreSet< const OfClass * > &cat_classes)
 get all classes for the given category path
 
void get_category_classes_recursively (const CoreString &cat_path, CoreSet< const OfClass * > &cat_classes)
 get all classes recursively for the given category path
 
void get_sub_categories_names (const CoreString &cat_path, CoreVector< CoreString > &sub_cat_names)
 
void get_sub_categories_pathes (const CoreString &cat_path, CoreVector< CoreString > &sub_cat_pathes)
 get all subcategories under the given category.
 
virtual size_t get_memory_size () const override
 
- Public Member Functions inherited from EventObject
 EventObject ()
 Constructor.
 
 EventObject (const EventObject &src)
 Copy Constructor.
 
virtual ~EventObject () override
 Destructor.
 
void connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 
bool disconnect_all (EventObject &sender)
 Disconnects from all objects sender was listening on.
 
void disconnect_all ()
 Disconnects from all objects we were listening on.
 
void remove_all_connection ()
 Disconnects object from other objects it is listening to, and also disconnects all objects listening to it.
 
void raise_event (const CoreString &event_id) const
 sends an event
 
void raise_event (const EventInfo &event_info) const
 sends an event
 
bool is_connected (EventObject &sender, const CoreString &event_id, void *data)
 
void set_mute (const bool &mute)
 Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0.
 
bool is_mute () const
 Returns if object is muted.
 
CoreArray< EventObject * > get_senders () const
 
unsigned int get_sender_count () const
 
unsigned int get_receiver_count () const
 
void connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- Public Member Functions inherited from CoreCustomData
 CoreCustomData (const CoreCustomData &src)
 
void add_custom_data (void *key, const bool &data)
 
void add_custom_data (void *key, const int &data)
 
void add_custom_data (void *key, const unsigned int &data)
 
void add_custom_data (void *key, const char *data)
 
void add_custom_data (void *key, const CoreString &data)
 
void add_custom_data (void *key, const double &data)
 
void add_custom_data (void *key, void *data)
 
void remove_custom_data (void *key)
 
void remove_all_custom_data ()
 
void set_custom_data (void *key, const bool &data)
 
void set_custom_data (void *key, const int &data)
 
void set_custom_data (void *key, const unsigned int &data)
 
void set_custom_data (void *key, const double &data)
 
void set_custom_data (void *key, const char *data)
 
void set_custom_data (void *key, const CoreString &data)
 
void set_custom_data (void *key, void *data)
 
void get_custom_data (void *key, bool &data) const
 
void get_custom_data (void *key, int &data) const
 
void get_custom_data (void *key, unsigned int &data) const
 
void get_custom_data (void *key, double &data) const
 
void get_custom_data (void *key, CoreString &data) const
 
void get_custom_data (void *key, void *&data) const
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
const unsigned long & get_class_info_id () const
 
virtual bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 

Static Public Member Functions

static const CoreStringcategory_separator ()
 
static CoreString get_category_name (const CoreString &cat_path)
 
- Static Public Member Functions inherited from EventObject
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 
static void raise_event (EventObject &sender, const CoreString &event_id)
 Sends an event.
 
static void raise_event (EventObject &sender, const EventInfo &event_info)
 Sends an event.
 
static void connect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- Static Public Member Functions inherited from CoreCustomData
static void * get_custom_data_key (const CoreString &key)
 
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Static Public Member Functions inherited from CoreBaseType
static const CoreClassInfoclass_info ()
 Get the type descriptor of this instance.
 

Friends

class OfObjectFactory
 
class OfClass
 
class CtxEval
 
class OfTestHelpers
 
class OfAttrTableTests
 

Additional Inherited Members

- Public Types inherited from EventObject
typedef void(* EventInfoFunction )(EventObject &, const EventInfo &, void *)
 event callback signature for free functions / static methods.
 
typedef void(EventObject::* EventInfoMethod )(EventObject &, const EventInfo &, void *)
 event callback signature for methods.
 
typedef void(* EventFunction )(EventObject &, const CoreString &, void *)
 
typedef void(EventObject::* EventMethod )(EventObject &, const CoreString &, void *)
 

Class Documentation

class OfClassFactory::CategoryTreeNode

contain a set of OfClass for a given Category. the cateogry name is relative to its parent CategoryTreeNode

Class Members
CoreString m_category_name Category name ex "my_cat".
CoreString m_category_path Category path ex "/my_cat1/my_cat".
CoreSet< const OfClass * > m_classes classes declared in this category

Member Function Documentation

bool OfClassFactory::add_module ( const CoreString filename)

Add and load the module specified by the given filename.

If the module is loaded successfully, the EVT_ID_CLASS_FACTORY_ADD_CLASS event is sent with the list of OfClasses added by the module.

Parameters
filenameFile path of the module to load.
Returns
true if the module is loaded successfully, false otherwise.
void OfClassFactory::get_category_classes ( const CoreString cat_path,
CoreSet< const OfClass * > &  cat_classes 
)

get all classes for the given category path

Parameters
[in]cat_pathcategory path ex: /my/little/category
[out]cat_classesclasses found for the given category
void OfClassFactory::get_category_classes_recursively ( const CoreString cat_path,
CoreSet< const OfClass * > &  cat_classes 
)

get all classes recursively for the given category path

Parameters
[in]cat_pathcategory path ex: /my/little/category
[out]cat_classesclasses found for the given category
void OfClassFactory::get_sub_categories_pathes ( const CoreString cat_path,
CoreVector< CoreString > &  sub_cat_pathes 
)

get all subcategories under the given category.

Parameters
[in]cat_pathparent category
[out]sub_cat_pathessubcategories found.
void OfClassFactory::scan_modules ( )

Scan the current library paths and add (load) the found modules.