Browse Source

added getter to Event

main
Stefan Pranger 3 years ago
parent
commit
e97543f0c6
  1. 20
      ical/Event.cpp
  2. 6
      ical/Event.h

20
ical/Event.cpp

@ -24,6 +24,26 @@ namespace ical {
}
}
std::string get_uid() const {
return uid;
}
std::string get_summary() const {
return summary;
}
icaltimetype get_dtstart() const {
return dtstart;
}
icaltimetype get_dtend() const {
return dtend;
}
std::vector<Alarm> get_alarms() const {
return alarms;
}
std::string Event::print() const {
std::string s = "";
s += "UID: " + uid + "\n";

6
ical/Event.h

@ -16,7 +16,11 @@ namespace ical {
void parse(icalcomponent* event);
void parse_alarms(icalcomponent* event_component);
std::string
std::string get_uid() const;
std::string get_summary() const;
icaltimetype get_dtstart() const;
icaltimetype get_dtend() const;
std::vector<Alarm> get_alarms() const;
std::string print() const;
private:

Loading…
Cancel
Save