'Initialize a CPIndex.
- target_type is the tuple of expected type for the target CPInfo
(if None, then there will be no type check)
- target_text_handler is a string transformation function used for
pretty printing the target str() result
- allow_zero states whether null index is allowed (sometimes, constant
pool index is optionnal)'

def __init__(self, parent, name, description=None, target_types=None, target_text_handler=(lambda x: x), allow_zero=False):

    UInt16.__init__(self, parent, name, description)
    if isinstance(target_types, str):
        self.target_types = (target_types,)
    else:
        self.target_types = target_types
    self.allow_zero = allow_zero
    self.target_text_handler = target_text_handler
    self.getOriginalDisplay = (lambda : self.value)
