Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

property.h File Reference

#include "base/inttypes.h"

Go to the source code of this file.

Namespaces

namespace  base

Defines

#define DEF_PROPERTY(NAME)
 We choose to let the compiler generate unique IDs for the properties.
#define PROPERTY2STRING(NAME)   ((const char*)NAME)
 This macro is used only for debugging and is used to print the internal string used as a unique ID.

Typedefs

typedef int const * property_t
 Global property types.

Variables

property_t EXACT_RELATION
 sets a relation flag, expects bool*
property_t FLAG
 sets a generic flag, expects bool*
property_t SIZE
 sets a generic size, expects uint32_t*


Define Documentation

#define DEF_PROPERTY NAME   ) 
 

Value:

static const char string_##NAME[] = MODULE_NAME":"#NAME; \
base::property_t NAME = (base::property_t) string_##NAME
We choose to let the compiler generate unique IDs for the properties.

This will also work for imported properties from external plugins and it will ensure compatibility between properties in different modules. This macro declares a property (in a .cpp file). The property name must be declared extern in a .h header (property.h in a proper module). For this to work the macro MODULE_NAME must be declared locally in the .cpp file.

#define PROPERTY2STRING NAME   )     ((const char*)NAME)
 

This macro is used only for debugging and is used to print the internal string used as a unique ID.


Typedef Documentation

typedef int const* base::property_t
 

Global property types.

On a number of components there is a setProperty method used to set a particular property. If we take pipeline/components.h as an example we may have properties for different kinds of buffers, such as, PWList. Implementations are scattered in several modules so it is better to centralize all the properties in one place. Properties are expected to be used with methods setProperty(property_t, const void*): for a given property there is an expected type of data to read.


Variable Documentation

property_t base::EXACT_RELATION
 

sets a relation flag, expects bool*

property_t base::FLAG
 

sets a generic flag, expects bool*

property_t base::SIZE
 

sets a generic size, expects uint32_t*


Generated on Fri Jun 30 00:02:30 2006 for Module base by  doxygen 1.4.2