PCC2ng: Big List Of Objects

Legend

ObjHas notifyListeners() method and/or sig_change signal
ObjHas markChanged() method
ObjPointed-to by shared smart pointer (and thus shareable)
ObjReference to another object
ObjOptional (may not exist, pointer can be null)
ObjDerived instance of class with virtual methods
ObjPlanned but not implemented
[]Container has multiple objects of this type

This document lists the (planned and existing) object structure of PCC2ng in an abstract, high-level format.

Game

The game::Session is the root of anything that is done with game data. All accesses to game::Session happen in a single thread. This is either the only thread (console programs), or a background thread (GUI programs). The game::Session also includes the interpreter::World.

game::Session
Root : game::Root
GameDir : afl::io::Directory Local game directory
SpecLoader : game::SpecificationLoader Virtual object to load a ShipList
Actions : game::Root::Actions_t Permitted actions on this game
HostVersion : game::HostVersion
RegKey : game::RegistrationKey
HostConfig : game::config::HostConfiguration
UserConfig : game::config::UserConfigurationIncludes directory configuration such as charset, editability
PlayerList : game::PlayerList Players including race names, nicks, etc.
Player : game::Player[]
TurnLoader : game::TurnLoader Virtual object to load a game turn
StringVerifier : game::StringVerifier Virtual object to define rules for string properties (e.g. permitted characters in friendly codes)
Charset : afl::charset::Charset Virtual object to describe the character set of files in GameDir
ShipList : game::spec::ShipList
Beams : game::spec::ComponentVector
Beam : game::spec::Beam[]
Engines : game::spec::ComponentVector
Engine : game::spec::Engine[]
Launchers : game::spec::ComponentVector
Launcher : game::spec::TorpedoLauncher[]
Hulls : game::spec::ComponentVector
Hull : game::spec::Hull[]
BasicHullFunctions : game::spec::BasicHullFunctionList Definition of basic functions such as "Cloak" (hullfunc.cc)
Functions : game::spec::BasicHullFunction[]
DefaultAssignment : (int,int)[]
ModifiedHullFunctions : game::spec::ModifiedHullFunctionList Definition of modified hull functions such as "Cloak at experience level 3"
ModifiedFunction : game::spec::HullFunction[]
RacialAbilities : game::spec::HullFunctionAssignmentList
HullAssignments : game::spec::HullAssignmentList
ComponentNamer : game::spec::ComponentNameProvider
FriendlyCodes : game::spec::FriendlyCodeList
FriendlyCode : game::spec::FriendlyCode[]
Missions : game::spec::MissionList
Mission : game::spec::Mission[]
Torpedoes
Fighters
Game : game::Game
PlanetScoreDef, ShipScoreDef : game::UnitScoreDefinitionList
Viewpoint : int
TurnScores : game::TurnScoreList
Markings : game::map::Markings
Teams : game::TeamSettings
Cursors : game::map::Cursors
CurrentShip/Planet/Base, etc... : game::map::SimpleObjectCursor
Location: game::map::Location
HistoryTurnList : game::HistoryTurnList
MessageConfiguration : game::msg::Configuration
Turn : game::Turn
Inbox : game::msg::Inbox
Outbox : game::msg::Outbox
Battles : game::vcr::Database
Battle : game::vcr::Battle[]
Unit : game::vcr::Object[]
Allies
Extra : game::ExtraContainer
Commands : game::v3::CommandContainer
Command : game::v3::Command[]
Gen
DataSet
TurnNumber : int
TimeStamp : game::Timestamp
DatabaseTurn : int
Universe : game::map::Universe
Ships : game::map::ObjectVector
Ship : game::map::Ship[]
Planets : game::map::ObjectVector
Planet : game::map::Planet[]
Config : game::map::Configuration
Storms : game::map::ObjectVector
Storm : game::map::IonStorm[]
Minefields : game::map::ObjectVector
Minefield : game::map::Minefield[]
Ufos : game::map::ObjectVector
Ufo : game::map::Ufo[]
Explosions : game::map::ObjectVector
Explosion : game::map::Explosion[]
Drawings : game::map::DrawingContainer
Drawing : game::map::Drawing[]
Reverter : game::map::Reverter
Extra
ScriptSide : client::si::ScriptSide
SimState
Setup : game::sim::Setup
Ship : game::sim::Ship[]
Planet : game::sim::Planet
Config : game::sim::Configuration
Log : afl::sys::Log
RandomNumberGenerator : util::RandomNumberGenerator
InterpreterInterface : game::InterpreterInterface
UserInterfacePropertyAccessor : game::interface::UserInterfacePropertyAccessor[]
EditableAreas : AreaSet_tRead-only/read-write status for database and turn data
Translator : afl::string::Translator
World : interpreterinterface::World Interpreter core with little VGAP interdependencies
GlobalPropertyNames, ShipPropertyNames, PlanetPropertyNames : afl::data::NameMap
GlobalPropertyValues : afl::data::Segment
ShipPropertyValues, PlanetPropertyValues : interpreter::ObjectPropertyVector
Specials : interpreter::SpecialCommand[]
Keymaps : util::KeymapTable
Keymap : util::Keymap[]
Atoms : util::AtomTable
Plugins : util::plugin::Manager
Plugin : util::plugin::Plugin[]
ProcessList : interpreter::ProcessList
Process : interpreter::Process[]
GlobalContexts : interpreter::Context[]
LogListener : afl::sys::LogListener
MutexList : interpreter::MutexList
FileTable : interpreter::FileTable
SystemLoadDir, LocalLoadDir : afl::io::Directory
FileSystem : afl::io::FileSystem

Browser

The role of a browser is to obtain a game::Root that can be used to bootstrap a game::Session. It is separate from game::Session to allow programs that use only one of them. All accesses to game::browser::Session happen in a single thread, which is the same one as the thread that accesses the game::Session.

The browser will eventually provide a game::Root. The game::Root will contain a SpecificationLoader and a TurnLoader, presence of which determines what you can do with the game. It will also contain a set of actions that can be applied to the directory associated with it.

game::browser::Session
AccountManager : game::browser::AccountManager
Account : game::browser::Account[]
UserCallback : game::browser::UserCallback
Favorites
Browser : game::browser::Browser
HandlerList : game::browser::HandlerList
Handler : game::browser::Handler[]
Path : game::browser::Folder[]
Content : game::browser::Folder[]
Origin : game::browser::Folder
ChildRoot : game::Root

User Interface

A GUI program can be built starting with a ui::Root. A GUI program that operates on VGAP data uses a client::Session which implements the proper thread separation (UserSide / ScriptSide).

client::Session
Root : ui::Root
Engine : gfx::Engine
Dispatcher : util::RequestDispatcher
Timer
Canvas : gfx::Canvas
ResourceProvider : gfx::ResourceProvider (ui::DefaultResourceProvider)
Manager : ui::res::Manager
ImageLoader : ui::res::ImageLoader[]
ResourceProvider : ui::res::Provider[]
ScreenSize : gfx::Point
ImageCache : gfx::Canvas[]
FontList : gfx::Font[]
ColorScheme : ui::ColorScheme
EventQueue : afl::base::Runnable[]
Window : ui::Widget...
ChildWidget : ui::Widget[]...
UserSide : client::si::UserSide
GameSender : util::RequestSender
ScriptSideSender : util::SlaveRequestSender
Console : util::MessageCollector
Log : afl::sys::Log
Control : client::si::Control
Root : ui::Root
UserSide : client::si::UserSide
Translator : afl::string::Translator
Translator : afl::string::Translator

File Server

Structure of the file server root. Each command is processed using a shared root and a per-session state.

server::file::Root
RootDirectory : server::file::DirectoryItem Root directory (provides access to children)
Handler : server::file::DirectoryHandler Defines how data is actually stored (direct, internal, CA, ...)
DefaultSpecDirectory : afl::io::Directory Default specification directory
DefaultCharset : afl::charset::CodepageCharset
DefaultRaceNames : server::file::RaceNames_t
Scanner : game::v3::DirectoryScanner

Host Server

Structure of the host server root. Each command is processed using a shared root and a per-session state.

server::host::Root
Database : afl::net::CommandHandler
HostFile : afl::net::CommandHandler
UserFile : afl::net::CommandHandler
MailQueue : server::interface::MailQueue
CheckturnRunner : util::ProcessRunner
FileSystem : afl::io::FileSystem
Cron : server::host::Cron
TalkListener : server::host::TalkListener
Router : server::interface::SessionRouter
Arbiter : server::host::GameArbiter
RNG : util::RandomNumberGenerator