Atlas  0.7.0
Networking protocol for the Worldforge system.
atlas.codecs.parse_xml.AtlasParser Class Reference
Inheritance diagram for atlas.codecs.parse_xml.AtlasParser:
Collaboration diagram for atlas.codecs.parse_xml.AtlasParser:

Public Member Functions

def __init__ (self)
 
def setup (self, stream_flag=None)
 
def set_stream_mode (self, mode=1)
 
def parse_init (self)
 
def eos (self)
 def parse_stream(self, msg): """parse incoming data and return all complete messages""" #print msg self.msg=msg self.feed(msg) #inherited from XMLParser if self.stream_flag: res=apply(atlas.Messages,tuple(self.msgList)) self.msgList=[] return res else: if self.msgList: res = self.msgList.pop(0) else: res = None return res call=parse_stream #this makes possible to call instance like #it was function More...
 
def unknown_starttag (self, tag, attributes)
 
def characters (self, data)
 
def startElement (self, tag, attributes)
 
def endElement (self, tag)
 
def start_atlas (self)
 
def end_atlas (self)
 
def start_value (self, attributes)
 
def end_value (self, value)
 
def push_value (self, attributes, initial_value)
 
def pop_value (self)
 
def start_int (self, attributes)
 
def end_int (self)
 
def start_float (self, attributes)
 
def end_float (self)
 
def start_string (self, attributes)
 
def end_string (self)
 
def start_list (self, attributes)
 
def end_list (self)
 
def start_map (self, attributes)
 
def end_map (self)
 
def parse_stream (self, msg)
 

Public Attributes

 data
 
 root_obj
 
 name_stack
 
 obj_stack
 
 seen_atlas_tag
 
 msgList
 
 stream_flag
 
 msg
 

Detailed Description

Definition at line 42 of file parse_xml.py.

Member Function Documentation

◆ characters()

def atlas.codecs.parse_xml.AtlasParser.characters (   self,
  data 
)

◆ end_value()

◆ eos()

def atlas.codecs.parse_xml.AtlasParser.eos (   self)

def parse_stream(self, msg): """parse incoming data and return all complete messages""" #print msg self.msg=msg self.feed(msg) #inherited from XMLParser if self.stream_flag: res=apply(atlas.Messages,tuple(self.msgList)) self.msgList=[] return res else: if self.msgList: res = self.msgList.pop(0) else: res = None return res call=parse_stream #this makes possible to call instance like #it was function

end of stream

Definition at line 91 of file parse_xml.py.

References atlas.codecs.decoder.BaseDecoder.data, atlas.codecs.packed.PackedParser.data, atlas.codecs.parse_xml.AtlasParser.data, atlas.codecs.packed.PackedParser.obj_stack, and atlas.codecs.parse_xml.AtlasParser.obj_stack.

◆ pop_value()

◆ push_value()

◆ setup()

◆ start_value()


The documentation for this class was generated from the following file: