CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
cacheconfigParser.cacheconfigParser Class Reference
Inheritance diagram for cacheconfigParser.cacheconfigParser:

Public Member Functions

def __init__
 
def handleFrontierConnect
 
def parameterdict
 
def parse
 
def parseString
 
def proxylist
 
def serverlist
 

Private Attributes

 __configfile
 
 __configstr
 
 __parameterDict
 parse result More...
 

Detailed Description

Definition at line 3 of file cacheconfigParser.py.

Constructor & Destructor Documentation

def cacheconfigParser.cacheconfigParser.__init__ (   self)

Member Function Documentation

def cacheconfigParser.cacheconfigParser.handleFrontierConnect (   self,
  dom 
)

Definition at line 9 of file cacheconfigParser.py.

References python.cacheconfigParser.cacheconfigParser.__parameterDict, cacheconfigParser.cacheconfigParser.__parameterDict, and python.multivaluedict.append().

Referenced by cacheconfigParser.cacheconfigParser.parse(), and cacheconfigParser.cacheconfigParser.parseString().

9 
10  def handleFrontierConnect(self,dom):
11  #print 'handleFrontierConnect'
12  nodelist=dom.getElementsByTagName('frontier-connect')[0].childNodes
13  #print nodelist
14  for node in nodelist:
15  if node.nodeType!=Node.TEXT_NODE and node.nodeType!=Node.COMMENT_NODE:
16  tagname=node.tagName
17  attrs=node.attributes
18  for attrName in attrs.keys():
19  attrNode=attrs.get(attrName)
20  attrValue=attrNode.nodeValue
21  if self.__parameterDict.has_key(tagname):
22  self.__parameterDict[tagname].append((attrName,attrValue))
23  else:
24  valuelist=[]
25  valuelist.append((attrName,attrValue))
self.__parameterDict[tagname]=valuelist
def cacheconfigParser.cacheconfigParser.parameterdict (   self)

Definition at line 41 of file cacheconfigParser.py.

References python.cacheconfigParser.cacheconfigParser.__parameterDict, and cacheconfigParser.cacheconfigParser.__parameterDict.

41 
42  def parameterdict(self):
return self.__parameterDict
def cacheconfigParser.cacheconfigParser.parse (   self,
  filename 
)
Parse an XML file by name

Definition at line 26 of file cacheconfigParser.py.

References python.cacheconfigParser.cacheconfigParser.handleFrontierConnect(), and cacheconfigParser.cacheconfigParser.handleFrontierConnect().

26 
27  def parse(self,filename):
28  """
29  Parse an XML file by name
30  """
31  dom=parse(filename)
32  self.handleFrontierConnect(dom)
dom.unlink()
def cacheconfigParser.cacheconfigParser.parseString (   self,
  strbuff 
)

Definition at line 33 of file cacheconfigParser.py.

References python.cacheconfigParser.cacheconfigParser.handleFrontierConnect(), and cacheconfigParser.cacheconfigParser.handleFrontierConnect().

33 
34  def parseString(self,strbuff):
35  dom=parseString(strbuff)
36  self.handleFrontierConnect(dom)
dom.unlink()
def cacheconfigParser.cacheconfigParser.proxylist (   self)

Definition at line 37 of file cacheconfigParser.py.

References python.cacheconfigParser.cacheconfigParser.__parameterDict, and cacheconfigParser.cacheconfigParser.__parameterDict.

37 
38  def proxylist(self):
return self.__parameterDict['proxy']
def cacheconfigParser.cacheconfigParser.serverlist (   self)

Definition at line 39 of file cacheconfigParser.py.

References python.cacheconfigParser.cacheconfigParser.__parameterDict, and cacheconfigParser.cacheconfigParser.__parameterDict.

39 
40  def serverlist(self):
return self.__parameterDict['server']

Member Data Documentation

cacheconfigParser.cacheconfigParser.__configfile
private

Definition at line 6 of file cacheconfigParser.py.

cacheconfigParser.cacheconfigParser.__configstr
private

Definition at line 5 of file cacheconfigParser.py.

cacheconfigParser.cacheconfigParser.__parameterDict
private

parse result

Definition at line 8 of file cacheconfigParser.py.

Referenced by cacheconfigParser.cacheconfigParser.handleFrontierConnect(), cacheconfigParser.cacheconfigParser.parameterdict(), cacheconfigParser.cacheconfigParser.proxylist(), and cacheconfigParser.cacheconfigParser.serverlist().