# -*- coding: utf-8 -*-
from Mapa_PU.swdl.model.swdl.geom import GeomInterface
from Mapa_PU.swdl.model.swdl.basic_object_geom import BasicObjectGeom
from Mapa_PU.swdl.model.swdl.line_geom import LineGeom

class ForestMapNoSF():
    @property
    def county_layer(self):
        return self.__county_layer
    @county_layer.setter
    def county_layer(self,CountyLayer): 
        """Warstwa oddziałów"""
        self.__county_layer=CountyLayer
        
    @property
    def basic_objects_layer(self):
        """Warstwa obiektów podstawowych"""
        return self.__basic_objects_layer
    @basic_objects_layer.setter
    def basic_objects_layer(self,BasicObjectLayer):
        self.__basic_objects_layer=BasicObjectLayer
        
    @property
    def subarea_labels_layer(self):
        #Opisy wydzileń
        return self.__subarea_labels_layer
    @subarea_labels_layer.setter
    def subarea_labels_layer(self,LabelsLayer):
        self.__subarea_labels_layer=LabelsLayer
    
    @property
    def county_labels_layer(self):
        #Opisy oddziałów
        return self.__county_labels_layer
    @county_labels_layer.setter
    def county_labels_layer(self,LabelsLayer):
        self.__county_labels_layer=LabelsLayer
    @property
    def line_layer(self):
        #Linie
        return self.__line_layer
    @line_layer.setter
    def line_layer(self,LineLayer):
        self.__line_layer=LineLayer

    

class CountyLayer():
    """Warstwa oddziałów"""
    def __init__(self):
        self.__geoms=[]
        
    def add(self,geom: GeomInterface):
        """Dodanie obiektu geometrii"""
        self.__geoms.append(geom)
        
    def __iter__(self)->GeomInterface:
        return self.__geoms.__iter__()

class BasicObjectLayer():
    """Warstwa obiektów podstawowych"""
    def __init__(self):
        self.__b_o_g=[]
    def add(self,b_o_g: BasicObjectGeom):
        self.__b_o_g.append(b_o_g)
    def __iter__(self):
        return self.__b_o_g.__iter__()

class LabelsLayer():
    """Warstwa opisów"""
    def __init__(self):
        self.__labels=[]
    def add(self,label):
        self.__labels.append(label)
    def __iter__(self):
        return self.__labels.__iter__()

class LineLayer():
    """Opisy lini"""
    def __init__(self):
        self.__lines=[]
    def add(self,line: LineGeom):
        self.__lines.append(line)
    def __iter__(self):
        return self.__lines.__iter__()