C12Adapter Opensource C++ Interface
MTimeRecurrent Class Referenceabstract

Abstract value to represent a recurrent time, a certain time that happens periodically. More...

Inheritance diagram for MTimeRecurrent:

Public Member Functions

virtual ~MTimeRecurrent ()
 Class destructor.
 
MTimeRecurrentoperator= (const MTimeRecurrent &)
 Assignment operator.
 
virtual MTime GetPertinent (const MTime &) const =0
 Get the event pertinent to a given time period. More...
 
bool IsValid () const
 Tells whether the recurrent date is valid, whether it has a proper range of all its values.
 
virtual void CheckIsValid () const =0
 Checks whether the recurrent date is valid, whether it has a proper range of all its values. More...
 
virtual void SetToNull ()=0
 Set this recurring time to null value, signifying that there is no recurrence defined. More...
 
virtual bool IsNull () const =0
 Returns whether this recurring time is a null time, a special value, which tells that the recurring time is not initialized. More...
 
void CheckIfNotNull () const
 Throw an exception if the recurrent time is null.
 
virtual MVariant NewClone () const =0
 Create a reflection-enabled clone of the recurring date. More...
 
- Public Member Functions inherited from MObject
virtual ~MObject ()
 Object destructor.
 
virtual const MClassGetClass () const =0
 Get the final class of the object. More...
 
virtual unsigned GetEmbeddedSizeof () const
 For embedded object types, return the size of the class. More...
 
bool IsEmbeddedObject () const
 Tell if the object is of embedded kind. More...
 
SHOW_INTERNAL MVariant Call (const MStdString &name, const MVariant &params)
 Call the object service with parameters, given as variant. More...
 
MVariant Call0 (const MStdString &name)
 Call the object service with no parameters. More...
 
MVariant Call1 (const MStdString &name, const MVariant &p1)
 Call the object service with one parameter. More...
 
MVariant Call2 (const MStdString &name, const MVariant &p1, const MVariant &p2)
 Call the object service with two parameter. More...
 
MVariant Call3 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3)
 Call the object service with three parameter. More...
 
MVariant Call4 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3, const MVariant &p4)
 Call the object service with four parameter. More...
 
MVariant Call5 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3, const MVariant &p4, const MVariant &p5)
 Call the object service with five parameter. More...
 
MVariant Call6 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3, const MVariant &p4, const MVariant &p5, const MVariant &p6)
 Call the object service with six parameter. More...
 
virtual MVariant CallV (const MStdString &name, const MVariant::VariantVector &params)
 Call the object service with parameters, given as variant vector. More...
 
virtual bool IsPropertyPresent (const MStdString &name) const
 Tell if the property with the given name exists.
 
virtual bool IsServicePresent (const MStdString &name) const
 Tell if the service with the given name exists.
 
virtual MVariant GetProperty (const MStdString &name) const
 Get the property value using name of the property. More...
 
virtual void SetProperty (const MStdString &name, const MVariant &value)
 Set the property using name of the property, and value. More...
 
virtual MStdStringVector GetAllPropertyNames () const
 Return the list of publicly available properties, persistent or not. More...
 
virtual MStdStringVector GetAllPersistentPropertyNames () const
 Return the list of persistent properties. More...
 
virtual void SetPersistentPropertiesToDefault ()
 Set the persistent properties of the object to their default values. More...
 
virtual MVariant GetPersistentPropertyDefaultValue (const MStdString &name) const
 Get the default value of persistent property with the name given. More...
 
virtual void SetPersistentPropertyToDefault (const MStdString &name)
 Set the persistent property with the name given to default value. More...
 
virtual const char * GetType () const
 Get the name of the type for the object (could be the same as class name).
 
virtual void SetType (const MStdString &)
 Intentionally, it will set the name of the type for the object, but the service will not allow setting the name to anything other than the current name. More...
 
virtual void Validate ()
 Validate internal structures of the object. More...
 

Protected Member Functions

 MTimeRecurrent ()
 Default constructor. More...
 
 MTimeRecurrent (const MTimeRecurrent &)
 Copy constructor, creates the current timezone from a copy given. More...
 
- Protected Member Functions inherited from MObject
 MObject ()
 Object constructor, protected as the class is abstract.
 
void DoSetPersistentPropertiesToDefault (const MClass *staticClass)
 Set the persistent properties to their default values for one object provided the class for that object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MObject
static const MClassGetStaticClass ()
 Get the declared class of this particular object. More...
 
static bool IsClassPresent (const MStdString &name)
 Tells if the given class name is available. More...
 
- Static Public Attributes inherited from MObject
static const MClass s_class
 Class of MObject.
 

Detailed Description

Abstract value to represent a recurrent time, a certain time that happens periodically.

There are several types of recurrent periodic time events, denoted by children of this class.

Constructor & Destructor Documentation

MTimeRecurrent::MTimeRecurrent ( )
inlineprotected

Default constructor.

Creates an empty recurrent time.

MTimeRecurrent::MTimeRecurrent ( const MTimeRecurrent )
inlineprotected

Copy constructor, creates the current timezone from a copy given.

If a copy of the current timezone is made, it will no longer be automatically updated from the computer. Instead, it will stay the same as it was during time the constructor was called.

Member Function Documentation

virtual void MTimeRecurrent::CheckIsValid ( ) const
pure virtual

Checks whether the recurrent date is valid, whether it has a proper range of all its values.

Precondition
An error is thrown if the given recurring date is valid. IsValid() call is used.

Implemented in MTimeRecurrentYearly.

virtual MTime MTimeRecurrent::GetPertinent ( const MTime ) const
pure virtual

Get the event pertinent to a given time period.

The returned time will use a given time as a hint to return the moment, which represents this recurrent event. The time given is expected to be in UTC or Standard, and the the recurring moment will be in the correspondent UTC or standard time.

For example, in case of a yearly recurring event, a given time is used to extract a year, for which the event shall be returned.

Implemented in MTimeRecurrentYearly.

virtual bool MTimeRecurrent::IsNull ( ) const
pure virtual

Returns whether this recurring time is a null time, a special value, which tells that the recurring time is not initialized.

Precondition
The object has to be valid, or an exception is thrown.

Implemented in MTimeRecurrentYearly.

virtual MVariant MTimeRecurrent::NewClone ( ) const
pure virtual

Create a reflection-enabled clone of the recurring date.

Variant returned has a recurring date embedded it it, one which shall not be deleted because it does not allocate memory outside of variant.

Implemented in MTimeRecurrentYearly.

virtual void MTimeRecurrent::SetToNull ( )
pure virtual

Set this recurring time to null value, signifying that there is no recurrence defined.

Implementations in children will differ.

Implemented in MTimeRecurrentYearly.