diff --git a/src/datatypes/organization.h b/src/datatypes/organization.h --- a/src/datatypes/organization.h +++ b/src/datatypes/organization.h @@ -59,9 +59,27 @@ KITINERARY_PROPERTY(QString, iataCode, setIataCode) }; +/** Hotel. + * @see https://schema.org/LodgingBusiness + */ +class KITINERARY_EXPORT LodgingBusiness: public Organization +{ + KITINERARY_GADGET(LodgingBusiness) +}; + +/** Food-related business (such as a restaurant, or a bakery). + * @see https://schema.org/FoodEstablishment + */ +class KITINERARY_EXPORT FoodEstablishment: public Organization +{ + KITINERARY_GADGET(FoodEstablishment) +}; + } // namespace KItinerary Q_DECLARE_METATYPE(KItinerary::Organization) Q_DECLARE_METATYPE(KItinerary::Airline) +Q_DECLARE_METATYPE(KItinerary::FoodEstablishment) +Q_DECLARE_METATYPE(KItinerary::LodgingBusiness) #endif // KITINERARY_ORGANIZATION_H diff --git a/src/datatypes/organization.cpp b/src/datatypes/organization.cpp --- a/src/datatypes/organization.cpp +++ b/src/datatypes/organization.cpp @@ -52,6 +52,18 @@ KITINERARY_MAKE_SUB_CLASS(Airline, Organization) KITINERARY_MAKE_PROPERTY(Airline, QString, iataCode, setIataCode) +class FoodEstablishmentPrivate: public OrganizationPrivate +{ + KITINERARY_PRIVATE_GADGET(FoodEstablishment) +}; +KITINERARY_MAKE_SUB_CLASS(FoodEstablishment, Organization) + +class LodgingBusinessPrivate : public OrganizationPrivate +{ + KITINERARY_PRIVATE_GADGET(LodgingBusiness) +}; +KITINERARY_MAKE_SUB_CLASS(LodgingBusiness, Organization) + } template <> diff --git a/src/datatypes/place.h b/src/datatypes/place.h --- a/src/datatypes/place.h +++ b/src/datatypes/place.h @@ -100,13 +100,6 @@ KITINERARY_GADGET(BusStation) }; -/** Hotel. - * @see https://schema.org/LodgingBusiness - */ -class KITINERARY_EXPORT LodgingBusiness: public Place -{ - KITINERARY_GADGET(LodgingBusiness) -}; /** Tourist attraction (e.g. Museum, sight, etc.). * @see https://schema.org/TouristAttraction @@ -116,23 +109,14 @@ KITINERARY_GADGET(TouristAttraction) }; -/** Food-related business (such as a restaurant, or a bakery). - * @see https://schema.org/FoodEstablishment - */ -class KITINERARY_EXPORT FoodEstablishment: public Place -{ - KITINERARY_GADGET(FoodEstablishment) -}; - } Q_DECLARE_METATYPE(KItinerary::GeoCoordinates) Q_DECLARE_METATYPE(KItinerary::PostalAddress) Q_DECLARE_METATYPE(KItinerary::Airport) Q_DECLARE_METATYPE(KItinerary::TrainStation) Q_DECLARE_METATYPE(KItinerary::BusStation) -Q_DECLARE_METATYPE(KItinerary::LodgingBusiness) Q_DECLARE_METATYPE(KItinerary::TouristAttraction) -Q_DECLARE_METATYPE(KItinerary::FoodEstablishment) + #endif // KITINERARY_PLACE_H diff --git a/src/datatypes/place.cpp b/src/datatypes/place.cpp --- a/src/datatypes/place.cpp +++ b/src/datatypes/place.cpp @@ -93,27 +93,14 @@ KITINERARY_PRIVATE_GADGET(BusStation) }; KITINERARY_MAKE_SUB_CLASS(BusStation, Place) -class LodgingBusinessPrivate : public PlacePrivate -{ - KITINERARY_PRIVATE_GADGET(LodgingBusiness) -}; -KITINERARY_MAKE_SUB_CLASS(LodgingBusiness, Place) - -} class TouristAttractionPrivate: public PlacePrivate { KITINERARY_PRIVATE_GADGET(TouristAttraction) }; KITINERARY_MAKE_SUB_CLASS(TouristAttraction, Place) -class FoodEstablishmentPrivate: public PlacePrivate -{ - KITINERARY_PRIVATE_GADGET(FoodEstablishment) -}; -KITINERARY_MAKE_SUB_CLASS(FoodEstablishment, Place) - - +} template <> KItinerary::PlacePrivate *QExplicitlySharedDataPointer::clone()