Package spoon :: Package ber :: Module tag :: Class Tag
[hide private]
[frames] | no frames]

Class Tag

source code

object --+
         |
        Tag

Representation of the header of an ASN.1 object. This includes the class (universal, application, context, or private), the type tag (any integer), and size.

Instance Methods [hide private]
  __init__(self, tag_class=0, tag=UNIVERSAL, size=None, container=False, _bytes_read=0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __repr__(self)
repr(x)
  __cmp__(self, other)
  __hash__(self)
hash(x)
  is_terminator(self)
Return True if this tag is the special type used to terminate indefinite-length sequences (type 0, length 0).
  __len__(self)
  write(self, fd)

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__


Static Methods [hide private]
  make_terminator()
Return a tag that can be used to terminate indefinite-length sequences.
  from_tag(t, size=None)
  from_stream(fd)

Class Variables [hide private]
  tag_class = property(lambda self: self._tag_class, None, None)
  tag = property(lambda self: self._tag, None, None)
  size = property(lambda self: self._size, None, None)
  container = property(lambda self: self._container, None, None)

Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, tag_class=0, tag=UNIVERSAL, size=None, container=False, _bytes_read=0)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

__cmp__(self, other)
(Comparison operator)

source code 
None

__hash__(self)
(Hashing function)

source code 
hash(x)
Overrides: object.__hash__
(inherited documentation)

is_terminator(self)

source code 
Return True if this tag is the special type used to terminate indefinite-length sequences (type 0, length 0).

make_terminator()
Static Method

source code 
Return a tag that can be used to terminate indefinite-length sequences.
Decorators:

from_tag(t, size=None)
Static Method

source code 
None
Decorators:

from_stream(fd)
Static Method

source code 
None
Decorators:

__len__(self)
(Length operator)

source code 
None

write(self, fd)

source code 
None

Class Variable Details [hide private]

tag_class

None
Value:
property(lambda self: self._tag_class, None, None)                     
      

tag

None
Value:
property(lambda self: self._tag, None, None)                           
      

size

None
Value:
property(lambda self: self._size, None, None)                          
      

container

None
Value:
property(lambda self: self._container, None, None)