city_retrofit/city_model_structure/city_objects_cluster.py
2021-06-03 11:23:09 -04:00

37 lines
825 B
Python

"""
CityObjectsCluster module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from abc import ABC
class CityObjectsCluster(ABC):
"""
CityObjectsCluster(ABC) class
"""
def __init__(self, name, cluster_type, city_objects):
self._name = name
self._cluster_type = cluster_type
self._city_objects = city_objects
@property
def name(self):
return self._name
@property
def type(self):
raise NotImplementedError
@property
def city_objects(self):
raise NotImplementedError
def add_city_object(self, city_object):
if self._city_objects is None:
self._city_objects = [city_object]
else:
self._city_objects.append(city_object)
return self._city_objects