| Midgard2 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <midgard/midgard.h>
MidgardReflectionProperty;
MidgardReflectionProperty * midgard_reflection_property_new
(MidgardDBObjectClass *klass);
GType midgard_reflection_property_get_midgard_type
(MidgardReflectionProperty *self,
const gchar *propname);
gboolean midgard_reflection_property_is_link (MidgardReflectionProperty *self,
const gchar *propname);
gboolean midgard_reflection_property_is_linked
(MidgardReflectionProperty *self,
const gchar *propname);
const MidgardDBObjectClass * midgard_reflection_property_get_link_class
(MidgardReflectionProperty *self,
const gchar *propname);
const gchar * midgard_reflection_property_get_link_name
(MidgardReflectionProperty *self,
const gchar *propname);
const gchar * midgard_reflection_property_get_link_target
(MidgardReflectionProperty *self,
const gchar *propname);
const gchar * midgard_reflection_property_description
(MidgardReflectionProperty *self,
const gchar *propname);
const gchar * midgard_reflection_property_get_user_value
(MidgardReflectionProperty *self,
const gchar *property,
const gchar *name);
MidgardReflectionProperty class lets developers write "reflected" applications and provides as many information defined in MgdSchema files as possible.
MidgardReflectionProperty provides information declared in schema files as attributes of types' properties: multilang, link, type, etc.
MidgardReflectionProperty * midgard_reflection_property_new (MidgardDBObjectClass *klass);
|
MidgardDBObjectClass pointer |
Returns : |
newly initialized MidgardReflectionProperty instance or NULL on failure.
|
GType midgard_reflection_property_get_midgard_type (MidgardReflectionProperty *self, const gchar *propname);
|
MidgardReflectionProperty instance |
|
property name which is registered for MidgardDBObjectClass |
Returns : |
type (GType) of the property or NULL if property is not registered for given class.
|
gboolean midgard_reflection_property_is_link (MidgardReflectionProperty *self, const gchar *propname);
Checks whether property is a link.
|
MidgardReflectionProperty instance |
|
property name |
Returns : |
TRUE if property is registered as link, FALSE otherwise (or in case if property is not registered for given class.
|
gboolean midgard_reflection_property_is_linked (MidgardReflectionProperty *self, const gchar *propname);
Checks if property is linked with another type.
|
MidgardReflectionProperty instance |
|
property name |
Returns : |
TRUE if property is linked with another type (property of another class is defined as a link to given one).
FALSE is returned if property is not linked or is not registered for given class.
|
const MidgardDBObjectClass * midgard_reflection_property_get_link_class
(MidgardReflectionProperty *self,
const gchar *propname);
|
MidgardReflectionProperty instance |
|
property name |
Returns : |
the pointer to the MidgardDBObjectClass, a given property is a link to.
see midgard_reflection_property_get_link_name()
|
const gchar * midgard_reflection_property_get_link_name (MidgardReflectionProperty *self, const gchar *propname);
|
MidgardReflectionProperty instance |
|
property name |
Returns : |
The name of the class, the given property is a link to.
Or NULL if property is not a link or given property is not registered for given class.
|
const gchar * midgard_reflection_property_get_link_target (MidgardReflectionProperty *self, const gchar *propname);
|
MidgardReflectionProperty instance |
|
property name |
Returns : |
The name of the property, the given one is a link to.
Or NULL if property is not a link or it's not registered for given class.
|
const gchar * midgard_reflection_property_description (MidgardReflectionProperty *self, const gchar *propname);
|
MidgardReflectionProperty instance |
|
property name |
Returns : |
description of the given property or NULL.
|
const gchar * midgard_reflection_property_get_user_value (MidgardReflectionProperty *self, const gchar *property, const gchar *name);
|
MidgardReflectionProperty instance |
|
property to look value for |
|
name of user defined field |
Returns : |
value for user defined field, or NULL if none found |
Since 9.09