From e97543f0c6d67d8121916da27814b5519cd3451e Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Tue, 29 Jun 2021 14:30:14 +0200 Subject: [PATCH] added getter to Event --- ical/Event.cpp | 20 ++++++++++++++++++++ ical/Event.h | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ical/Event.cpp b/ical/Event.cpp index 71694b1..7eda438 100644 --- a/ical/Event.cpp +++ b/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 get_alarms() const { + return alarms; + } + std::string Event::print() const { std::string s = ""; s += "UID: " + uid + "\n"; diff --git a/ical/Event.h b/ical/Event.h index 5659883..634ad4f 100644 --- a/ical/Event.h +++ b/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 get_alarms() const; std::string print() const; private: