kopete/libkopete
Kopete::Properties::WithProperties< Parent > Class Template Reference
#include <kopeteproperties.h>
Inheritance diagram for Kopete::Properties::WithProperties< Parent >:

Detailed Description
template<class Parent>
class Kopete::Properties::WithProperties< Parent >
Base class for classes to which properties can be applied.
This class provides support for properties to another class. If you want your class to support properties, derive from this passing your class as the Parent parameter:
class YourClass : public WithProperties<YourClass> { ... };
You will also need to explicitly specialise the propertyCreated() member function to load property data upon creation of a new property object.
Definition at line 167 of file kopeteproperties.h.
Public Member Functions | |
| template<typename T> | |
| T | property (Property< Parent, T > const &prop) |
| template<typename T> | |
| void | setProperty (Property< Parent, T > const &prop, const T &value) |
Static Public Member Functions | |
| static void | propertyCreated (const PropertyBase< Parent > &property) |
Member Function Documentation
template<class Parent>
template<typename T>
| T Kopete::Properties::WithProperties< Parent >::property | ( | Property< Parent, T > const & | prop | ) | [inline] |
Get the value of property prop in this object.
- Parameters:
-
prop the Property object representing the property to get
Definition at line 175 of file kopeteproperties.h.
template<class Parent>
template<typename T>
| void Kopete::Properties::WithProperties< Parent >::setProperty | ( | Property< Parent, T > const & | prop, | |
| const T & | value | |||
| ) | [inline] |
Set the value of property prop in this object.
- Parameters:
-
prop the Property object representing the property to get value the value to set the property to
Definition at line 182 of file kopeteproperties.h.
template<class Parent>
| static void Kopete::Properties::WithProperties< Parent >::propertyCreated | ( | const PropertyBase< Parent > & | property | ) | [static] |
Called when a property is created; loads the Parent object's data into the property.
- Note:
- Derived classes must explicitly specialize this to load the property's data into every object of this type.
The documentation for this class was generated from the following file:
KDE 4.0 API Reference