Browse Source

cleaned up some debug output

main
Stefan Pranger 4 years ago
parent
commit
a3da4f3811
  1. 2
      ical/Alarm.cpp
  2. 2
      ical/Alarm.h
  3. 9
      ical/Event.cpp
  4. 2
      ical/Event.h

2
ical/Alarm.cpp

@ -35,7 +35,7 @@ namespace ical {
}
}
std::string Alarm::print() {
std::string Alarm::print() const {
std::string s = "";
s += "DESCRIPTION: " + description + "\n";
s += trigger == ical::trigger_type::ABSOLUTE ? "ABSOLUTE: " : "RELATIVE: ";

2
ical/Alarm.h

@ -22,7 +22,7 @@ namespace ical {
void parse_description(icalcomponent* alarm_component);
void parse_trigger(icalcomponent* alarm_component);
std::string print();
std::string print() const;
private:
action a;
trigger_type trigger;

9
ical/Event.cpp

@ -12,9 +12,6 @@ namespace ical {
summary = std::string(icalcomponent_get_summary(event_component));
parse_alarms(event_component);
DEBUG << "\n" << print();
for(auto& a : alarms) {
DEBUG << "\n" << a.print();
}
object->events.push_back(this);
}
@ -28,11 +25,15 @@ namespace ical {
}
}
std::string Event::print() {
std::string Event::print() const {
std::string s = "";
s += "DTSTART: " + std::string(icaltime_as_ical_string(dtstart)) + "\n";
s += "DTEND: " + std::string(icaltime_as_ical_string(dtend)) + "\n";
s += "SUMMARY: " + summary + "\n";
s += "ALARMS:\n";
for(auto const& a : alarms) {
s += a.print();
}
return s;
}
}

2
ical/Event.h

@ -13,7 +13,7 @@ namespace ical {
void parse(ical::ical_object* object, icalcomponent* event);
void parse_alarms(icalcomponent* event_component);
std::string print();
std::string print() const;
private:
std::string summary;
icaltimetype dtstart;

Loading…
Cancel
Save