Crossfire Server, Trunk
|
Public Member Functions | |
def | __init__ (self, filename, header) |
def | exist (self, name) |
def | get_keys (self) |
def | get_record (self, name) |
def | put_record (self, record) |
def | remove_record (self, name) |
Data Fields | |
datadb | |
datafile | |
header | |
CFData Object is basically a dictionary parsed from the datafile - serves to pass back and forth a dictionary containing the datafile header and the desired record to the caller - easier to read the
Definition at line 94 of file CFDataFile.py.
def CFDataFile.CFData.__init__ | ( | self, | |
filename, | |||
header | |||
) |
Definition at line 99 of file CFDataFile.py.
def CFDataFile.CFData.exist | ( | self, | |
name | |||
) |
checks if a record exists given the primary key as "name"
Definition at line 122 of file CFDataFile.py.
References CFDataFile.CFData.datadb.
Referenced by CFDataFile.CFData.get_record().
def CFDataFile.CFData.get_keys | ( | self | ) |
returns a sorted list of the primary keys (usually names) in the datafile
Definition at line 150 of file CFDataFile.py.
References CFDataFile.CFData.datadb, hall_of_fame.keys, and guildoracle.list.
def CFDataFile.CFData.get_record | ( | self, | |
name | |||
) |
returns a small dictionary of the header and the record by "name"
Definition at line 129 of file CFDataFile.py.
References CFDataFile.CFData.datadb, CFDataFile.CFData.exist(), and CFDataFile.CFData.header.
def CFDataFile.CFData.put_record | ( | self, | |
record | |||
) |
adds an line entry to the datafile
Definition at line 140 of file CFDataFile.py.
References CFDataFile.CFData.datadb, CFDataFile.CFData.datafile, and CFDataFile.CFData.header.
def CFDataFile.CFData.remove_record | ( | self, | |
name | |||
) |
Definition at line 114 of file CFDataFile.py.
References CFDataFile.CFData.datadb, and CFDataFile.CFData.datafile.
CFDataFile.CFData.datadb |
Definition at line 104 of file CFDataFile.py.
Referenced by CFDataFile.CFData.exist(), CFDataFile.CFData.get_keys(), CFDataFile.CFData.get_record(), CFDataFile.CFData.put_record(), and CFDataFile.CFData.remove_record().
CFDataFile.CFData.datafile |
Definition at line 101 of file CFDataFile.py.
Referenced by CFDataFile.CFData.put_record(), and CFDataFile.CFData.remove_record().
CFDataFile.CFData.header |
Definition at line 100 of file CFDataFile.py.
Referenced by CFDataFile.CFData.get_record(), and CFDataFile.CFData.put_record().