00001
00018 #ifndef __RECURRENCE_H__
00019 #define __RECURRENCE_H__
00020
00021
00022 #include<vector>
00023 #include <string>
00024 using std::string;
00025 using std::vector;
00026
00027 #include "CRecurrenceRule.h"
00028
00034 class CRecurrence {
00035
00036 public:
00037
00045 bool setRecurrenceRule(vector < CRecurrenceRule * >VRRuleList);
00046
00054 vector < CRecurrenceRule * >getRecurrenceRule();
00055
00064 vector < string > getErule();
00065
00075 vector < string > getRrule();
00076
00081 CRecurrence(CRecurrence & ref);
00082
00091 bool setRrule(vector < string > vRRuleList);
00092
00102 bool setErule(vector < string > vERuleList);
00103
00113 bool setRDays(vector < string > vRecRuleList);
00114
00124 vector < string > getRDays();
00125
00134 bool setEDays(vector < string > vExceptionDateList);
00135
00145 vector < string > getEDays();
00146
00155 bool setRecurId(int iRId);
00156
00165 int getRecurId();
00178 bool setRtype(int iRType);
00191 int getRtype();
00192
00201 CRecurrence(vector < string > vRRuleList, int iRId);
00211 vector < time_t > generateInstanceTimes(time_t iViewBegin,
00212 time_t iViewEnd,
00213 time_t iDateStart,
00214 int eventSpan,
00215 int is_day,
00216 string sTzid);
00226 bool checkInstances(time_t iViewBegin,
00227 time_t iViewEnd,
00228 time_t iDateStart,
00229 int eventSpan,
00230 int is_day,
00231 string sTzid);
00232
00239 CRecurrence();
00240
00241
00242
00243 CRecurrence & operator=(const CRecurrence & right);
00244
00251 ~CRecurrence();
00255 string toString();
00256
00257
00258 private:
00259
00260 vector < CRecurrenceRule * >vRecrRuleList;
00262 vector < string > vExceptionDateList;
00264 vector < string > vRecRuleList;
00266 int iRType;
00268 int iRecurId;
00271 };
00272
00273 #endif