Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
calPeriod Class Reference

#include <calPeriod.h>

Inheritance diagram for calPeriod:
Inheritance graph
[legend]
Collaboration diagram for calPeriod:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 calPeriod ()
 calPeriod (const calPeriod &cpt)
 calPeriod (struct icalperiodtype const *aPeriodPtr)
void makeImmutable ()
 Make this calIPeriod instance immutable.
calIPeriod clone ()
 Clone this calIPeriod instance into a new mutable object.
AUTF8String toString ()
 Return a string representation of this instance.
void toIcalPeriod (in icalperiodtypeptr idt)

Public Attributes

readonly attribute boolean isMutable
 isMutable is true if this instance is modifiable.
attribute calIDateTime start
 The start datetime of this period.
attribute calIDateTime end
 The end datetime of this period.
readonly attribute calIDuration duration
 The duration, equal to end-start.
attribute ACString icalString
 This object as an iCalendar DURATION string.

Protected Member Functions

calPeriod constoperator= (calPeriod const &)
void FromIcalPeriod (struct icalperiodtype const *icalp)

Protected Attributes

PRBool mImmutable
nsCOMPtr< calIDateTimemStart
nsCOMPtr< calIDateTimemEnd

Detailed Description

Definition at line 51 of file calPeriod.h.


Constructor & Destructor Documentation

Definition at line 49 of file calPeriod.cpp.

calPeriod::calPeriod ( const calPeriod cpt) [explicit]

Definition at line 54 of file calPeriod.cpp.

    : mImmutable(PR_FALSE)
{
    if (cpt.mStart)
        cpt.mStart->Clone(getter_AddRefs(mStart));
    if (cpt.mEnd)
        cpt.mEnd->Clone(getter_AddRefs(mEnd));
}

Here is the call graph for this function:

calPeriod::calPeriod ( struct icalperiodtype const aPeriodPtr) [explicit]

Definition at line 63 of file calPeriod.cpp.

    : mImmutable(PR_FALSE)
{
    FromIcalPeriod(aPeriodPtr);
}

Here is the call graph for this function:


Member Function Documentation

calIPeriod calIPeriod::clone ( ) [inherited]

Clone this calIPeriod instance into a new mutable object.

void calPeriod::FromIcalPeriod ( struct icalperiodtype const icalp) [protected]

Definition at line 162 of file calPeriod.cpp.

{
    mStart = new calDateTime(&(icalp->start), nsnull);
    mStart->MakeImmutable();
    mEnd = new calDateTime(&(icalp->end), nsnull);
    mEnd->MakeImmutable();
    return;
}

Here is the caller graph for this function:

Make this calIPeriod instance immutable.

calPeriod const& calPeriod::operator= ( calPeriod const ) [protected]
AUTF8String calIPeriod::toString ( ) [inherited]

Return a string representation of this instance.


Member Data Documentation

The duration, equal to end-start.

Definition at line 79 of file calIPeriod.idl.

The end datetime of this period.

Definition at line 74 of file calIPeriod.idl.

attribute ACString calIPeriod::icalString [inherited]

This object as an iCalendar DURATION string.

Definition at line 92 of file calIPeriod.idl.

readonly attribute boolean calIPeriod::isMutable [inherited]

isMutable is true if this instance is modifiable.

If isMutable is false, any attempts to modify the object will throw NS_ERROR_OBJECT_IS_IMMUTABLE.

Definition at line 53 of file calIPeriod.idl.

Definition at line 71 of file calPeriod.h.

Definition at line 67 of file calPeriod.h.

Definition at line 70 of file calPeriod.h.

The start datetime of this period.

Definition at line 69 of file calIPeriod.idl.


The documentation for this class was generated from the following files: