* overview bundles imitate style of bundled node type * removed bundle for built-in types * show contents of overview bundle in vertical list layouted with new ListLayouter * nodes starting with the same letter are grouped with the letter displayed above * pressing the letter key will scroll to the group * also use this list layouting for namespace & package contents * renamed BucketGrid to BucketLayouter * moved used functions of GraphPostProcessor to GraphViewStyle and removed GraphPostProcessor fortune cookie message = Don't be afraid to take that big step
58 lines
861 B
C++
58 lines
861 B
C++
#ifndef PROPERTY_H
|
|
#define PROPERTY_H
|
|
|
|
template<class T>
|
|
class Property
|
|
{
|
|
public:
|
|
explicit Property(T* valuePointer);
|
|
~Property();
|
|
|
|
T& operator=(const T& value);
|
|
Property<T>& operator=(const Property<T>& property);
|
|
|
|
operator const T&() const;
|
|
T& operator()() const;
|
|
|
|
private:
|
|
T* m_valuePointer;
|
|
};
|
|
|
|
template<class T>
|
|
Property<T>::Property(T* valuePointer)
|
|
: m_valuePointer(valuePointer)
|
|
{
|
|
}
|
|
|
|
template<class T>
|
|
Property<T>::~Property()
|
|
{
|
|
}
|
|
|
|
template<class T>
|
|
T& Property<T>::operator=(const T& value)
|
|
{
|
|
*m_valuePointer = value;
|
|
return *m_valuePointer;
|
|
}
|
|
|
|
template<class T>
|
|
Property<T>& Property<T>::operator=(const Property<T>& property)
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
template<class T>
|
|
Property<T>::operator const T&() const
|
|
{
|
|
return *m_valuePointer;
|
|
}
|
|
|
|
template<class T>
|
|
T& Property<T>::operator()() const
|
|
{
|
|
return *m_valuePointer;
|
|
}
|
|
|
|
#endif // PROPERTY_H
|