Skip to content

Data structures: Access to data, links between objects

Jack Dodds edited this page Oct 4, 2019 · 4 revisions

Much of Mailpile's internal data is available through links between class instances. This is a partial list.

Instances of class mailpile.ui.Session(typically called session):

  • have attribute config which is an instance of class mailpile.config.manager.ConfigManager.

Instances of class mailpile.config.manager.ConfigManager (typically called config or cfg):

  • contain configuration data including the internal representation of the contents of the mailpile.cfg file;
  • have attribute index which is an instance of class mailpile.search.MailIndex.

The GlobalPostingList class achieves data access differently from the Session and ConfigManager classes:

  • instances of the class are not linked from other classes; instead,
  • a global mailpile.postinglist.GLOBAL_GPL is used to hold the data that is used and maintained by by the class;
  • classmethods are used to perform most functions of the class so that all that is needed is to import GlobalPostingList in order to make the data and methods available.
Clone this wiki locally