Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Types | Public Member Functions | Properties | List of all members
FlightLog Class Reference

Class used for flight and kerbal career logging More...

Classes

class  Entry
 Flight log entry More...
 

Public Types

enum  EntryType {
  EntryType.Land, EntryType.Flight, EntryType.Flyby, EntryType.Orbit,
  EntryType.Suborbit, EntryType.Escape, EntryType.Launch, EntryType.ExitVessel,
  EntryType.BoardVessel, EntryType.PlantFlag, EntryType.Recover, EntryType.Die,
  EntryType.Spawn, EntryType.Training1, EntryType.Training2, EntryType.Training3,
  EntryType.Training4, EntryType.Training5
}
 

Public Member Functions

void AddEntry (Entry entry)
 Add entry via entry copy More...
 
void AddEntry (EntryType type, string target=null)
 Standard add entry method More...
 
void AddEntry (string type, string target=null)
 Standard add entry method More...
 
void AddEntryUnique (Entry entry)
 Adds a unique entry method. If entry already exists then do nothing More...
 
void AddEntryUnique (EntryType type, string target=null)
 Adds a unique entry method. If entry already exists then do nothing More...
 
void AddFlight ()
 
void Clear ()
 Clears the flight log More...
 
FlightLog CreateCopy ()
 Create copy of this FlightLog More...
 
List< string > GetDistinctTargets (EntryType type)
 Gets array of distinct target strings for a matching type More...
 
List< string > GetDistinctTargets (string type)
 Gets array of distinct target strings for a matching type More...
 
List< string > GetDistinctTargets ()
 Gets array of distinct target strings for a matching type More...
 
List< string > GetDistinctTypes ()
 Gets array of distinct type strings More...
 
List< string > GetDistinctTypes (string target)
 Gets array of distinct type strings for a matching target More...
 
Entry[] GetEntries (EntryType type, string target)
 Gets all entries that meet the type requirement sorted by their time More...
 
Entry[] GetEntries (EntryType type)
 Gets all entries that meet the type requirement sorted by their time More...
 
Entry[] GetEntries (string type)
 Gets all entries that meet the type requirement sorted by their time More...
 
Entry[] GetEntries (string type, string target)
 Gets all entries that meet the type requirement sorted by their time More...
 
List< FlightLogGetFlights ()
 
bool HasEntry (EntryType type)
 Test log for a given entry type More...
 
bool HasEntry (EntryType type, string target)
 Test log for a given entry type and target More...
 
bool HasEntry (string type)
 Test log for a given entry type More...
 
bool HasEntry (string type, string target)
 Test log for a given entry type and target More...
 
Entry Last ()
 Get reference to last entry in log More...
 
void Load (ConfigNode node)
 Load from given ConfigNode More...
 
void MergeWith (FlightLog log)
 Merges the referenced log into this one More...
 
void Save (ConfigNode node)
 Save to given ConfigNode More...
 

Properties

int Count [get]
 Count of entries More...
 
List< EntryEntries [get]
 Flight Log More...
 
int Flight [get]
 
Entry this[int index] [get]
 

Detailed Description

Class used for flight and kerbal career logging

Member Enumeration Documentation

Enumerator
Land 
Flight 
Flyby 
Orbit 
Suborbit 
Escape 
Launch 
ExitVessel 
BoardVessel 
PlantFlag 
Recover 
Die 
Spawn 
Training1 
Training2 
Training3 
Training4 
Training5 

Member Function Documentation

void FlightLog.AddEntry ( Entry  entry)
inline

Add entry via entry copy

Parameters
entryEntry to copy
void FlightLog.AddEntry ( EntryType  type,
string  target = null 
)
inline

Standard add entry method

Parameters
timeTime at which this entry occurred
typeEntry type name
targetEntry target
void FlightLog.AddEntry ( string  type,
string  target = null 
)
inline

Standard add entry method

Parameters
timeTime at which this entry occurred
typeEntry type name
targetEntry target
void FlightLog.AddEntryUnique ( Entry  entry)
inline

Adds a unique entry method. If entry already exists then do nothing

Parameters
entryEntry to copy
void FlightLog.AddEntryUnique ( EntryType  type,
string  target = null 
)
inline

Adds a unique entry method. If entry already exists then do nothing

Parameters
timeTime at which this entry occurred
typeEntry type name
targetEntry target
void FlightLog.AddFlight ( )
inline
void FlightLog.Clear ( )
inline

Clears the flight log

FlightLog FlightLog.CreateCopy ( )
inline

Create copy of this FlightLog

Returns
Copy of flight log
List<string> FlightLog.GetDistinctTargets ( EntryType  type)
inline

Gets array of distinct target strings for a matching type

Returns
Array of distinct target strings
List<string> FlightLog.GetDistinctTargets ( string  type)
inline

Gets array of distinct target strings for a matching type

Returns
Array of distinct target strings
List<string> FlightLog.GetDistinctTargets ( )
inline

Gets array of distinct target strings for a matching type

Returns
Array of distinct target strings
List<string> FlightLog.GetDistinctTypes ( )
inline

Gets array of distinct type strings

Returns
Array of distinct type strings
List<string> FlightLog.GetDistinctTypes ( string  target)
inline

Gets array of distinct type strings for a matching target

Returns
Array of distinct type strings
Entry [] FlightLog.GetEntries ( EntryType  type,
string  target 
)
inline

Gets all entries that meet the type requirement sorted by their time

Parameters
typeType to test
targetTarget to test
Returns
Array of matching entries
Entry [] FlightLog.GetEntries ( EntryType  type)
inline

Gets all entries that meet the type requirement sorted by their time

Parameters
typeType to test
Returns
Entry [] FlightLog.GetEntries ( string  type)
inline

Gets all entries that meet the type requirement sorted by their time

Parameters
typeType to test
Returns
Entry [] FlightLog.GetEntries ( string  type,
string  target 
)
inline

Gets all entries that meet the type requirement sorted by their time

Parameters
typeType to test
targetTarget to test
Returns
Array of matching entries
List<FlightLog> FlightLog.GetFlights ( )
inline
bool FlightLog.HasEntry ( EntryType  type)
inline

Test log for a given entry type

Parameters
typeType required for test
Returns
true/false
bool FlightLog.HasEntry ( EntryType  type,
string  target 
)
inline

Test log for a given entry type and target

Parameters
typeType required for test
targetTarget required for test
Returns
true/false
bool FlightLog.HasEntry ( string  type)
inline

Test log for a given entry type

Parameters
typeType required for test
Returns
true/false
bool FlightLog.HasEntry ( string  type,
string  target 
)
inline

Test log for a given entry type and target

Parameters
typeType required for test
targetTarget required for test
Returns
true/false
Entry FlightLog.Last ( )
inline

Get reference to last entry in log

Returns
Last entry
void FlightLog.Load ( ConfigNode  node)
inline

Load from given ConfigNode

Parameters
nodeConfigNode to load from
void FlightLog.MergeWith ( FlightLog  log)
inline

Merges the referenced log into this one

Parameters
logLog to merge
void FlightLog.Save ( ConfigNode  node)
inline

Save to given ConfigNode

Parameters
nodeConfigNode to save to

Property Documentation

int FlightLog.Count
get

Count of entries

List<Entry> FlightLog.Entries
get

Flight Log

int FlightLog.Flight
get
Entry FlightLog.this[int index]
get

The documentation for this class was generated from the following file: