# Path: core/ezdxf/tools/c23.py
# PY3 = sys.version_info.major > 2
# def isstring(s):
# 
# Path: core/ezdxf/lldxf/types.py
# def strtag(tag):
#     return TAG_STRING_FORMAT % tag
# 
# Path: core/ezdxf/lldxf/tags.py
# COMMENT_CODE = 999
# def write_tags(stream, tags):
# def text2tags(text):
#     def __init__(self):
#     def DWGCODEPAGE(self, value):
#     def ACADVER(self, value):
#     def HANDSEED(self, value):
# def dxf_info(stream):
#     def write(self, stream):
#     def from_text(cls, text):
#     def __copy__(self):
#     def get_handle(self):
#     def replace_handle(self, new_handle):
#     def dxftype(self):
#     def has_tag(self, code):
#     def find_first(self, code, default=ValueError):
#     def get_first_tag(self, code, default=ValueError):
#     def find_all(self, code):
#     def tag_index(self, code, start=0, end=None):
#     def update(self, code, value):
#     def set_first(self, code, value):
#     def remove_tags(self, codes):
#     def collect_consecutive_tags(self, codes, start=0, end=None):
#     def __init__(self, tags, splitcode=0):
#     def _build_groups(self, tags, splitcode):
#         def append(tag):  # first do nothing, skip tags in front of the first split tag
#     def get_name(self, index):
#     def from_text(cls, text, splitcode=0):
# def strip_tags(tags, codes):
#     def __init__(self, code, tags):
#     def __getitem__(self, item):
#     def decompress(self):
#     def write(self, stream):
# class DXFInfo(object):
# class Tags(list):
# class TagGroups(list):
# class CompressedTags(object):


from collections import OrderedDict
from ..tools.c23 import ustr
from ..lldxf.types import strtag
from ..lldxf.tags import TagGroups, Tags, DXFStructureError
  9
$HANDSEED
  5
FF
  0
ENDSEC
"""


class CustomVars():
    """ Custom Properties are stored as string tuples ('CustomTag', 'CustomValue') in a list object.

    Multiple occurrence of the same 'CustomTag' is allowed, but not well supported by the interface.
    """
    def __init__(self):
        self.properties = list()

    def __len__(self):
        return len(self.properties)

    def __iter__(self):
        return iter(self.properties)

    def clear(self):
        """ Remove all custom properties.
        """
        self.properties.clear()

    def append(self, tag, value):
        # custom properties always stored as strings

# Path: core/ezdxf/tools/c23.py
# PY3 = sys.version_info.major > 2
# def isstring(s):
# 
# Path: core/ezdxf/lldxf/types.py
# def strtag(tag):
#     return TAG_STRING_FORMAT % tag
# 
# Path: core/ezdxf/lldxf/tags.py
# COMMENT_CODE = 999
# def write_tags(stream, tags):
# def text2tags(text):
#     def __init__(self):
#     def DWGCODEPAGE(self, value):
#     def ACADVER(self, value):
#     def HANDSEED(self, value):
# def dxf_info(stream):
#     def write(self, stream):
#     def from_text(cls, text):
#     def __copy__(self):
#     def get_handle(self):
#     def replace_handle(self, new_handle):
#     def dxftype(self):
#     def has_tag(self, code):
#     def find_first(self, code, default=ValueError):
#     def get_first_tag(self, code, default=ValueError):
#     def find_all(self, code):
#     def tag_index(self, code, start=0, end=None):
#     def update(self, code, value):
#     def set_first(self, code, value):
#     def remove_tags(self, codes):
#     def collect_consecutive_tags(self, codes, start=0, end=None):
#     def __init__(self, tags, splitcode=0):
#     def _build_groups(self, tags, splitcode):
#         def append(tag):  # first do nothing, skip tags in front of the first split tag
#     def get_name(self, index):
#     def from_text(cls, text, splitcode=0):
# def strip_tags(tags, codes):
#     def __init__(self, code, tags):
#     def __getitem__(self, item):
#     def decompress(self):
#     def write(self, stream):
# class DXFInfo(object):
# class Tags(list):
# class TagGroups(list):
# class CompressedTags(object):


# Path: core/ezdxf/sections/header.py
from collections import OrderedDict
from ..tools.c23 import ustr
from ..lldxf.types import strtag
from ..lldxf.tags import TagGroups, Tags, DXFStructureError

  9
$HANDSEED
  5
FF
  0
ENDSEC
"""


class CustomVars():
    """ Custom Properties are stored as string tuples ('CustomTag', 'CustomValue') in a list object.

    Multiple occurrence of the same 'CustomTag' is allowed, but not well supported by the interface.
    """
    def __init__(self):
        self.properties = list()

    def __len__(self):
        return len(self.properties)

    def __iter__(self):
        return iter(self.properties)

    def clear(self):
        """ Remove all custom properties.
        """
        self.properties.clear()

    def append(self, tag, value):
        # custom properties always stored as strings

        self.properties.append((tag, ustr(value)))