Atlas
0.7.0
Networking protocol for the Worldforge system.
|
Public Member Functions | |
def | unknown_starttag (self, tag, attributes) |
def | unknown_endtag (self, tag) |
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 | 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 | |
|
inherited |
#PCDATA (actual string,int,float,uri content)
Definition at line 98 of file parse_xml.py.
References atlas.codecs.decoder.BaseDecoder.data, atlas.codecs.parse_xml.AtlasParser.end_atlas(), atlas.codecs.parse_xml.AtlasParser.end_float(), atlas.codecs.packed.PackedParser.end_float(), atlas.codecs.parse_xml.AtlasParser.end_int(), atlas.codecs.packed.PackedParser.end_int(), atlas.codecs.packed.PackedParser.end_list(), atlas.codecs.parse_xml.AtlasParser.end_list(), Atlas::Funky::Tokens.end_list, atlas.codecs.packed.PackedParser.end_map(), atlas.codecs.parse_xml.AtlasParser.end_map(), Atlas::Funky::Tokens.end_map, atlas.codecs.gen_xml.Encoder.end_string, atlas.codecs.bach.Encoder.end_string, atlas.codecs.packed.Encoder.end_string, atlas.codecs.parse_xml.AtlasParser.end_string(), atlas.codecs.packed.PackedParser.end_string(), atlas.codecs.parse_xml.AtlasParser.seen_atlas_tag, atlas.codecs.parse_xml.AtlasParser.start_atlas(), atlas.codecs.parse_xml.AtlasParser.start_float(), atlas.codecs.packed.PackedParser.start_float(), atlas.codecs.parse_xml.AtlasParser.start_int(), atlas.codecs.packed.PackedParser.start_int(), atlas.codecs.packed.PackedParser.start_list(), atlas.codecs.parse_xml.AtlasParser.start_list(), atlas.codecs.packed.PackedParser.start_map(), atlas.codecs.parse_xml.AtlasParser.start_map(), atlas.codecs.parse_xml.AtlasParser.start_string(), and atlas.codecs.packed.PackedParser.start_string().
|
inherited |
put value into mapping/list
Definition at line 142 of file parse_xml.py.
References atlas.codecs.decoder.BaseDecoder.data, atlas.codecs.parse_xml.AtlasParser.name_stack, atlas.codecs.packed.PackedParser.name_stack, atlas.codecs.parse_xml.AtlasParser.obj_stack, and atlas.codecs.packed.PackedParser.obj_stack.
Referenced by atlas.codecs.parse_xml.AtlasParser.pop_value().
|
inherited |
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.parse_xml.AtlasParser.obj_stack, and atlas.codecs.packed.PackedParser.obj_stack.
|
inherited |
for list/map: remove from stack
Definition at line 163 of file parse_xml.py.
References atlas.codecs.decoder.BaseDecoder.data, atlas.codecs.packed.PackedParser.end_value(), atlas.codecs.parse_xml.AtlasParser.end_value(), atlas.codecs.decoder.BaseDecoder.msgList, atlas.codecs.binary1.Binary1Parser.msgList, atlas.codecs.parse_xml.AtlasParser.obj_stack, atlas.codecs.packed.PackedParser.obj_stack, atlas.codecs.packed.PackedParser.pop_value(), atlas.codecs.parse_xml.AtlasParser.pop_value(), atlas.codecs.packed.PackedParser.push_value(), atlas.codecs.parse_xml.AtlasParser.push_value(), atlas.codecs.packed.PackedParser.start_value(), atlas.codecs.parse_xml.AtlasParser.start_value(), and atlas.codecs.binary1.Binary1Parser.start_value().
Referenced by atlas.codecs.parse_xml.AtlasParser.pop_value().
|
inherited |
for list/map: add to stack
Definition at line 158 of file parse_xml.py.
References atlas.codecs.parse_xml.AtlasParser.obj_stack, atlas.codecs.packed.PackedParser.obj_stack, atlas.codecs.packed.PackedParser.start_value(), atlas.codecs.parse_xml.AtlasParser.start_value(), and atlas.codecs.binary1.Binary1Parser.start_value().
Referenced by atlas.codecs.parse_xml.AtlasParser.pop_value().
|
inherited |
uses tree that start from root_obj, current route to leave is kept in obj_stack
Reimplemented from atlas.codecs.decoder.BaseDecoder.
Definition at line 53 of file parse_xml.py.
References atlas.codecs.bach.BachParser.feed(), atlas.codecs.packed.PackedParser.feed(), atlas.codecs.binary1.Binary1Parser.feed(), atlas.codecs.parse_xml.AtlasParser.name_stack, atlas.codecs.packed.PackedParser.name_stack, atlas.codecs.parse_xml.AtlasParser.obj_stack, atlas.codecs.packed.PackedParser.obj_stack, atlas.codecs.parse_xml.AtlasParser.root_obj, atlas.codecs.packed.PackedParser.root_obj, atlas.codecs.parse_xml.AtlasParser.seen_atlas_tag, and atlas.codecs.decoder.BaseDecoder.stream_flag.
|
inherited |
for int/float/string: save name if have one
Definition at line 137 of file parse_xml.py.
References atlas.codecs.decoder.BaseDecoder.data, atlas.codecs.parse_xml.AtlasParser.name_stack, and atlas.codecs.packed.PackedParser.name_stack.
Referenced by atlas.codecs.parse_xml.AtlasParser.pop_value(), and atlas.codecs.parse_xml.AtlasParser.push_value().