00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __RECURRENCE_H__
00025 #define __RECURRENCE_H__
00026
00027
00028 #include<vector>
00029 #include <string>
00030 using std::string;
00031 using std::vector;
00032
00033 #include "CRecurrenceRule.h"
00034
00040 class CRecurrence {
00041
00042 public:
00043
00051 bool setRecurrenceRule(vector < CRecurrenceRule * >VRRuleList);
00052
00060 vector < CRecurrenceRule * >getRecurrenceRule();
00061
00070 vector < string > getErule();
00071
00081 vector < string > getRrule();
00082
00087 CRecurrence(CRecurrence & ref);
00088
00097 bool setRrule(vector < string > vRRuleList);
00098
00108 bool setErule(vector < string > vERuleList);
00109
00119 bool setRDays(vector < string > vRecRuleList);
00120
00130 vector < string > getRDays();
00131
00140 bool setEDays(vector < string > vExceptionDateList);
00141
00151 vector < string > getEDays();
00152
00161 bool setRecurId(int iRId);
00162
00171 int getRecurId();
00184 bool setRtype(int iRType);
00197 int getRtype();
00198
00207 CRecurrence(vector < string > vRRuleList, int iRId);
00218 vector < time_t > generateInstanceTimes(time_t iViewBegin,
00219 time_t iViewEnd,
00220 time_t iDateStart,
00221 int eventSpan,
00222 int is_day,
00223 string sTzid);
00224
00235 void generateInstanceTimes(time_t iViewBegin,
00236 time_t iViewEnd,
00237 time_t iDateStart,
00238 int eventSpan,
00239 int is_day,
00240 string sTzid,
00241 vector<time_t> &instance_times,
00242 bool sort_times = true);
00252 bool checkInstances(time_t iViewBegin,
00253 time_t iViewEnd,
00254 time_t iDateStart,
00255 int eventSpan,
00256 int is_day,
00257 string sTzid);
00258
00265 CRecurrence();
00266
00267
00268
00269 CRecurrence & operator=(const CRecurrence & right);
00270
00277 ~CRecurrence();
00281 string toString();
00282
00283
00284 private:
00285
00286 vector < CRecurrenceRule * >vRecrRuleList;
00288 vector < string > vExceptionDateList;
00290 vector < string > vRecRuleList;
00292 int iRType;
00294 int iRecurId;
00297 };
00298
00299 #endif