You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
508 B

  1. #include <ical/IcalObject.h>
  2. namespace ical {
  3. void IcalObject::add_event(ical::Event* event) {
  4. events.push_back(event);
  5. }
  6. std::vector<ical::Event*> IcalObject::get_events() const {
  7. return events;
  8. }
  9. bool IcalObject::empty() const {
  10. return events.size() == 0;
  11. }
  12. std::ostream& operator<<(std::ostream &os, ical::IcalObject const &obj) {
  13. os << "Object:" << std::endl;
  14. for(auto const& e : obj.events) {
  15. os << e->print();
  16. }
  17. os << std::endl;
  18. return os;
  19. }
  20. }