Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

YDerivedType< T > Class Template Reference

#include <object.h>

Inheritance diagram for YDerivedType< T >:

Inheritance graph
[legend]
Collaboration diagram for YDerivedType< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 YDerivedType (const T &c, const YDerivedType< T > *p=0, const YObjectArgs &args=YObjectArgs())
 YDerivedType (const YDerivedType< T > *p, const YObjectArgs &args=YObjectArgs())
 value must not be set. Only parent is valid

 YDerivedType (const YDerivedType< T > &p)
void SetParent (const YDerivedType< T > *p)
void DetachParent ()
virtual bool IsValid () const
 returns true if this instance has a valid content

bool IsDisabled () const
 returns true if this instance is disabled. Disabled objects will return contents of the parent objects.

bool AreChildsDisabled () const
 returns true if this instance has disabled its child objects

void SetChildsDisabled (bool b)
void Invalid ()
 This function will unset the current content. If parent is zero this function has no effect!

const YDerivedType< T > * GetValidContent () const
const YDerivedType< T > * GetDerivedParent () const
const T & GetContent () const
const T & SetContent (const T &c)
const T & operator>> (T &dest) const
const T & operator= (const T &c)
 This operator sets the content of the instance.

const YDerivedType< T > & operator= (const YDerivedType< T > &c)
const T & operator<< (const T &c)
 This operator sets the content of the instance. It is similar to "=".

bool operator!= (const YDerivedType< T > &c) const
 This operator compares the object with the and returns true if it is not equal.

bool operator!= (const T &c) const
 This operator compares the object with the c and returns true if it is not equal.

bool operator== (const YDerivedType< T > &c) const
 This operator compares the object with the and returns true if it is equal.

bool operator== (const T &c) const
 This operator compares the object with the and returns true if it is equal.

 operator bool ()
 This conversion operator checks, if the content is valid.

virtual bool CheckLimits (T &dest, const T &source) const
virtual void DerivedParentContentChanged ()
virtual void ObjectDisabled (bool b)

Private Attributes

content
bool valid
bool disabled
 true if this object is disabled. In this case parent objects are used. Root objects can not be disabled.

bool childsdisabled
 If set all child are disabled to ensure that this property is used in all childs.

const YDerivedType< T > * derivedparent
 Ptr to parent of object.

template<class T>
class YDerivedType< T >


Constructor & Destructor Documentation

template<class T>
YDerivedType< T >::YDerivedType const T &    c,
const YDerivedType< T > *    p = 0,
const YObjectArgs   args = YObjectArgs()
[inline]
 

template<class T>
YDerivedType< T >::YDerivedType const YDerivedType< T > *    p,
const YObjectArgs   args = YObjectArgs()
[inline]
 

value must not be set. Only parent is valid

template<class T>
YDerivedType< T >::YDerivedType const YDerivedType< T > &    p [inline]
 

This is a Copy-Construktur for YDerivedType. It is not the final version Use it with care! The contents will be copied mostly from

without the ptr to YSet Attention: The copied object is from the parents of

derived too! So be sure that the parents are not destroyed before the childs are destroyed! This is important by using local attributes


Member Function Documentation

template<class T>
bool YDerivedType< T >::AreChildsDisabled   const [inline]
 

returns true if this instance has disabled its child objects

template<class T>
virtual bool YDerivedType< T >::CheckLimits T &    dest,
const T &    source
const [inline, virtual]
 

Checks the limits of and copies a final version to dest which will be used during SetContent()

Returns:
true=content can be set

false=content can not be set

Reimplemented in YTIME, YASA_DEADLINE, YASA_TICK, YASA_PRIORITY, YASA_CPU, YASA_MAXCPU, YASA_TASKTYPE, YASA_SCHEDULERTYPE, YASA_SERVERTYPE, YASA_DLBEHAVIOUR, YASA_MUTEXPROTOCOL, YASA_RESOURCEACTION, YASA_CALCPREEMPTIONTIME, and YASA_TIMERTICK.

template<class T>
virtual void YDerivedType< T >::DerivedParentContentChanged   [inline, virtual]
 

This is a slot in the base class (tricky right?) to ensure that derived objects can receive signals from their parent objects. This functions is called every time an parent object is changed. This function will refer the signal to its children. Due to possible changes in "object limits" we call SetContent() in this function.

prevent UpdateObject twice

Reimplemented from YDerivedObject.

template<class T>
void YDerivedType< T >::DetachParent   [inline]
 

The object will be detached from its parent. If it is currently not valid it will be set to the current value of its parent and a signal will be emitted. If the content is valid it will not change. If the object is disabled it will be enabled but all childs will be disabled. If the parent has disabled the childs the current object will take over this feature so alle kinds will be disabled further

template<class T>
const T& YDerivedType< T >::GetContent   const [inline]
 

returns the first valid content. This function is parsing the instances until the first occurence of a valid content. This content will be returned. Disabled objects will return contents of the parent objects.

template<class T>
const YDerivedType<T>* YDerivedType< T >::GetDerivedParent   const [inline]
 

template<class T>
const YDerivedType<T>* YDerivedType< T >::GetValidContent   const [inline]
 

Returns the first non disable and valid ptr to content. This function is parsing the instances until the first occurence of a valid content.

template<class T>
void YDerivedType< T >::Invalid   [inline]
 

This function will unset the current content. If parent is zero this function has no effect!

template<class T>
bool YDerivedType< T >::IsDisabled   const [inline]
 

returns true if this instance is disabled. Disabled objects will return contents of the parent objects.

template<class T>
virtual bool YDerivedType< T >::IsValid   const [inline, virtual]
 

returns true if this instance has a valid content

Implements YDerivedObject.

template<class T>
virtual void YDerivedType< T >::ObjectDisabled bool    b [inline, virtual]
 

If the parent object has called the function SetChildsDisabled() all child objects will receive the signal DisableObjects() in this slot. The content of all child objects will be disabled.

Reimplemented from YDerivedObject.

template<class T>
YDerivedType< T >::operator bool   [inline]
 

This conversion operator checks, if the content is valid.

template<class T>
bool YDerivedType< T >::operator!= const T &    c const [inline]
 

This operator compares the object with the c and returns true if it is not equal.

template<class T>
bool YDerivedType< T >::operator!= const YDerivedType< T > &    c const [inline]
 

This operator compares the object with the and returns true if it is not equal.

template<class T>
const T& YDerivedType< T >::operator<< const T &    c [inline]
 

This operator sets the content of the instance. It is similar to "=".

template<class T>
const YDerivedType<T>& YDerivedType< T >::operator= const YDerivedType< T > &    c [inline]
 

This operator will set the content of the current object to "c". After calling this this function the current object is valid and set!

template<class T>
const T& YDerivedType< T >::operator= const T &    c [inline]
 

This operator sets the content of the instance.

Reimplemented in YString, YTIME, YASA_PERIOD, YASA_DEADLINE, YASA_DEADLINETOLERANCE, YASA_LAXITY, YASA_REQUIREDTIME, YASA_OFFSET, YASA_SCHEDULINGTIME, YASA_SYNCHRONIZATIONOFFSET, YASA_TICK, YASA_PRIORITY, YASA_CPU, YASA_MAXCPU, YASA_TASKTYPE, YASA_SCHEDULERTYPE, YASA_SERVERTYPE, YASA_DLBEHAVIOUR, YASA_MUTEXPROTOCOL, YASA_RESOURCEACTION, YASA_CALCPREEMPTIONTIME, and YASA_TIMERTICK.

template<class T>
bool YDerivedType< T >::operator== const T &    c const [inline]
 

This operator compares the object with the and returns true if it is equal.

template<class T>
bool YDerivedType< T >::operator== const YDerivedType< T > &    c const [inline]
 

This operator compares the object with the and returns true if it is equal.

template<class T>
const T& YDerivedType< T >::operator>> T &    dest const [inline]
 

This operator copies the content of the current instance to the destination. Destination is a type of instead YDerivedType. There is another global operator defined if you used the macro TYPEDEF_DERIVE(type, name) to define the YSettins type

template<class T>
void YDerivedType< T >::SetChildsDisabled bool    b [inline]
 

Sets this object and all child objects into disable state Disabled objects will return contents of the parent objects.

template<class T>
const T& YDerivedType< T >::SetContent const T &    c [inline]
 

This function is used to set the content of the object. Attention: During process there will be called the virtual function CheckLimits() to ensure the limits of the objects. In this way it is possible that the arguments will be modified!

template<class T>
void YDerivedType< T >::SetParent const YDerivedType< T > *    p [inline]
 

Set a new parent. The content will not be infected parents to zero are illegal. Use Detach instead !!! A signal "objectdisabled(true|false) is emitted if necessary.


Member Data Documentation

template<class T>
bool YDerivedType< T >::childsdisabled [private]
 

If set all child are disabled to ensure that this property is used in all childs.

template<class T>
T YDerivedType< T >::content [private]
 

template<class T>
const YDerivedType<T>* YDerivedType< T >::derivedparent [private]
 

Ptr to parent of object.

template<class T>
bool YDerivedType< T >::disabled [private]
 

true if this object is disabled. In this case parent objects are used. Root objects can not be disabled.

template<class T>
bool YDerivedType< T >::valid [private]
 

true if is valid


The documentation for this class was generated from the following file:
Generated on Thu Feb 13 23:54:18 2003 for Yasa by doxygen1.3-rc3