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)
 

Public Attributes

 data
 
 root_obj
 
 name_stack
 
 obj_stack
 
 seen_atlas_tag
 
 msgList
 

Detailed Description

Definition at line 42 of file parse_xml.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 44 of file parse_xml.py.

Member Function Documentation

◆ characters()

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

◆ end_atlas()

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

Definition at line 134 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ end_float()

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

◆ end_int()

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

◆ end_list()

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

Definition at line 201 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ end_map()

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

Definition at line 207 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ end_string()

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

◆ end_value()

◆ endElement()

def atlas.codecs.parse_xml.AtlasParser.endElement (   self,
  tag 
)

Definition at line 116 of file parse_xml.py.

◆ 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.

◆ parse_init()

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

Reimplemented from atlas.codecs.decoder.BaseDecoder.

Definition at line 69 of file parse_xml.py.

◆ pop_value()

◆ push_value()

◆ set_stream_mode()

def atlas.codecs.parse_xml.AtlasParser.set_stream_mode (   self,
  mode = 1 
)

Reimplemented from atlas.codecs.decoder.BaseDecoder.

Definition at line 65 of file parse_xml.py.

◆ setup()

◆ start_atlas()

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

Definition at line 131 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ start_float()

def atlas.codecs.parse_xml.AtlasParser.start_float (   self,
  attributes 
)

Definition at line 186 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ start_int()

def atlas.codecs.parse_xml.AtlasParser.start_int (   self,
  attributes 
)

Definition at line 176 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ start_list()

def atlas.codecs.parse_xml.AtlasParser.start_list (   self,
  attributes 
)

Definition at line 198 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ start_map()

def atlas.codecs.parse_xml.AtlasParser.start_map (   self,
  attributes 
)

Definition at line 204 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ start_string()

def atlas.codecs.parse_xml.AtlasParser.start_string (   self,
  attributes 
)

Definition at line 192 of file parse_xml.py.

Referenced by atlas.codecs.parse_xml.AtlasParser.characters().

◆ start_value()

◆ startElement()

def atlas.codecs.parse_xml.AtlasParser.startElement (   self,
  tag,
  attributes 
)

Definition at line 102 of file parse_xml.py.

◆ unknown_starttag()

def atlas.codecs.parse_xml.AtlasParser.unknown_starttag (   self,
  tag,
  attributes 
)

Definition at line 95 of file parse_xml.py.

Member Data Documentation

◆ data

◆ msgList

◆ name_stack

◆ obj_stack

◆ root_obj

atlas.codecs.parse_xml.AtlasParser.root_obj

◆ seen_atlas_tag

atlas.codecs.parse_xml.AtlasParser.seen_atlas_tag

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