Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FConsoleManager Class Reference

#include <ConsoleManager.h>

+ Inheritance diagram for FConsoleManager:
+ Collaboration diagram for FConsoleManager:

Public Member Functions

 FConsoleManager ()
 
 ~FConsoleManager ()
 
IConsoleThreadPropagationGetThreadPropagationCallback ()
 
bool IsThreadPropagationThread ()
 
virtual FString FindConsoleObjectName (const IConsoleObject *Obj) const override
 
void Test ()
 
void OnCVarChanged ()
 
virtual FConsoleVariableMulticastDelegateOnCVarUnregistered () override
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, bool DefaultValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, int32 DefaultValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, float DefaultValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, const TCHAR *DefaultValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, const FString &DefaultValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, bool &RefValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, int32 &RefValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, float &RefValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, FString &RefValue, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleVariableRegisterConsoleVariableBitRef (const TCHAR *CVarName, const TCHAR *FlagName, uint32 BitNumber, uint8 *Force0MaskPtr, uint8 *Force1MaskPtr, const TCHAR *Help, uint32 Flags) override
 
virtual void CallAllConsoleVariableSinks () override
 
virtual FConsoleVariableSinkHandle RegisterConsoleVariableSink_Handle (const FConsoleCommandDelegate &Command) override
 
virtual void UnregisterConsoleVariableSink_Handle (FConsoleVariableSinkHandle Handle) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandDelegate &Command, uint32 Flags) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsDelegate &Command, uint32 Flags) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldDelegate &Command, uint32 Flags) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldAndArgsDelegate &Command, uint32 Flags) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsAndOutputDeviceDelegate &Command, uint32 Flags) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate &Command, uint32 Flags) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithOutputDeviceDelegate &Command, uint32 Flags) override
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, uint32 Flags) override
 
virtual IConsoleObjectFindConsoleObject (const TCHAR *Name, bool bTrackFrequentCalls=true) const override
 
virtual IConsoleVariableFindConsoleVariable (const TCHAR *Name, bool bTrackFrequentCalls=true) const override
 
virtual void ForEachConsoleObjectThatStartsWith (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatStartsWith) const override
 
virtual void ForEachConsoleObjectThatContains (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatContains) const override
 
virtual bool ProcessUserConsoleInput (const TCHAR *InInput, FOutputDevice &Ar, UWorld *InWorld) override
 
virtual void AddConsoleHistoryEntry (const TCHAR *Key, const TCHAR *Input) override
 
virtual void GetConsoleHistory (const TCHAR *Key, TArray< FString > &Out) override
 
virtual bool IsNameRegistered (const TCHAR *Name) const override
 
virtual void RegisterThreadPropagation (uint32 ThreadId, IConsoleThreadPropagation *InCallback) override
 
virtual void UnregisterConsoleObject (IConsoleObject *Object, bool bKeepState) override
 
- Public Member Functions inherited from IConsoleManager
TConsoleVariableData< bool > * FindTConsoleVariableDataBool (const TCHAR *Name) const
 
TConsoleVariableData< int32 > * FindTConsoleVariableDataInt (const TCHAR *Name) const
 
TConsoleVariableData< float > * FindTConsoleVariableDataFloat (const TCHAR *Name) const
 

Private Member Functions

IConsoleObjectAddConsoleObject (const TCHAR *Name, IConsoleObject *Obj)
 
IConsoleObjectFindConsoleObjectUnfiltered (const TCHAR *Name) const
 
void UnregisterConsoleObject (const TCHAR *Name, bool bKeepState)
 
void LoadHistoryIfNeeded ()
 
void SaveHistory ()
 

Static Private Member Functions

static bool MatchPartialName (const TCHAR *Stream, const TCHAR *Pattern)
 
static bool MatchSubstring (const TCHAR *Stream, const TCHAR *Pattern)
 
static FString GetTextSection (const TCHAR *&It)
 

Private Attributes

TMap< FString, IConsoleObject * > ConsoleObjects
 
bool bHistoryWasLoaded
 
TMap< FString, TArray< FString > > HistoryEntriesMap
 
TArray< FConsoleCommandDelegateConsoleVariableChangeSinks
 
FConsoleVariableMulticastDelegate ConsoleVariableUnregisteredDelegate
 
IConsoleThreadPropagationThreadPropagationCallback
 
bool bCallAllConsoleVariableSinks
 
FCriticalSection ConsoleObjectsSynchronizationObject
 

Additional Inherited Members

- Static Public Member Functions inherited from IConsoleManager
static FORCEINLINE IConsoleManagerGet ()
 
- Protected Member Functions inherited from IConsoleManager
virtual ~IConsoleManager ()
 

Detailed Description

Definition at line 15 of file ConsoleManager.h.

Constructor & Destructor Documentation

◆ FConsoleManager()

FConsoleManager::FConsoleManager ( )
inline

constructor

Definition at line 19 of file ConsoleManager.h.

◆ ~FConsoleManager()

FConsoleManager::~FConsoleManager ( )
inline

destructor

Definition at line 27 of file ConsoleManager.h.

Member Function Documentation

◆ AddConsoleHistoryEntry()

virtual void FConsoleManager::AddConsoleHistoryEntry ( const TCHAR * Key,
const TCHAR * Input )
overridevirtual
Parameters
Input- must not be 0

Implements IConsoleManager.

◆ AddConsoleObject()

IConsoleObject * FConsoleManager::AddConsoleObject ( const TCHAR * Name,
IConsoleObject * Obj )
private
Parameters
Namemust not be 0, must not be empty
Objmust not be 0
Returns
0 if the name was already in use

◆ CallAllConsoleVariableSinks()

virtual void FConsoleManager::CallAllConsoleVariableSinks ( )
overridevirtual

The sinks are only called if a change has been done since the last time Should be called in very few points:

  • after ini file loading
  • after user console input
  • user initiated a console variable change (it needs to be clear to user that a cvar can change e.g. game options menu)
  • beginning of Tick (to catch stray Set() calls, which are usually bad)

Implements IConsoleManager.

◆ FindConsoleObject()

virtual IConsoleObject * FConsoleManager::FindConsoleObject ( const TCHAR * Name,
bool bTrackFrequentCalls = true ) const
overridevirtual

Find a console variable or command

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Implements IConsoleManager.

◆ FindConsoleObjectName()

virtual FString FConsoleManager::FindConsoleObjectName ( const IConsoleObject * Obj) const
overridevirtual
Parameters
InVarmust not be 0

Implements IConsoleManager.

◆ FindConsoleObjectUnfiltered()

IConsoleObject * FConsoleManager::FindConsoleObjectUnfiltered ( const TCHAR * Name) const
private

same as FindConsoleObject() but ECVF_CreatedFromIni are not filtered out (for internal use)

◆ FindConsoleVariable()

virtual IConsoleVariable * FConsoleManager::FindConsoleVariable ( const TCHAR * Name,
bool bTrackFrequentCalls = true ) const
overridevirtual

Find a console variable

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Implements IConsoleManager.

◆ ForEachConsoleObjectThatContains()

virtual void FConsoleManager::ForEachConsoleObjectThatContains ( const FConsoleObjectVisitor & Visitor,
const TCHAR * ThatContains ) const
overridevirtual

Not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop

Parameters
Visitormust not be 0
ThatContainsmust not be 0

Implements IConsoleManager.

◆ ForEachConsoleObjectThatStartsWith()

virtual void FConsoleManager::ForEachConsoleObjectThatStartsWith ( const FConsoleObjectVisitor & Visitor,
const TCHAR * ThatStartsWith ) const
overridevirtual

Iterate in O(n), not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop

Parameters
Visitormust not be 0
ThatStartsWithmust not be 0

Implements IConsoleManager.

◆ GetConsoleHistory()

virtual void FConsoleManager::GetConsoleHistory ( const TCHAR * Key,
TArray< FString > & Out )
overridevirtual

Implements IConsoleManager.

◆ GetTextSection()

static FString FConsoleManager::GetTextSection ( const TCHAR *& It)
staticprivate

Get string till whitespace, jump over whitespace inefficient but this code is not performance critical

◆ GetThreadPropagationCallback()

IConsoleThreadPropagation * FConsoleManager::GetThreadPropagationCallback ( )

◆ IsNameRegistered()

virtual bool FConsoleManager::IsNameRegistered ( const TCHAR * Name) const
overridevirtual

Check if a name (command or variable) has been registered with the console manager

Parameters
Name- Name to check. Must not be 0

Implements IConsoleManager.

◆ IsThreadPropagationThread()

bool FConsoleManager::IsThreadPropagationThread ( )

◆ LoadHistoryIfNeeded()

void FConsoleManager::LoadHistoryIfNeeded ( )
private

◆ MatchPartialName()

static bool FConsoleManager::MatchPartialName ( const TCHAR * Stream,
const TCHAR * Pattern )
staticprivate
Parameters
Streammust not be 0
Patternmust not be 0

◆ MatchSubstring()

static bool FConsoleManager::MatchSubstring ( const TCHAR * Stream,
const TCHAR * Pattern )
staticprivate

Returns true if Pattern is found in Stream, case insensitive.

◆ OnCVarChanged()

void FConsoleManager::OnCVarChanged ( )

◆ OnCVarUnregistered()

virtual FConsoleVariableMulticastDelegate & FConsoleManager::OnCVarUnregistered ( )
overridevirtual

Implements IConsoleManager.

◆ ProcessUserConsoleInput()

virtual bool FConsoleManager::ProcessUserConsoleInput ( const TCHAR * Input,
FOutputDevice & Ar,
UWorld * InWorld )
overridevirtual

Process user input e.g. "MyCVar" to get the current value of the console variable "MyCVar -5.2" to set the value to -5.2 "MyCVar ?" to get the help text

Parameters
Inputmust not be 0
Ararchive
InWorldworld context
Returns
true if the command was recognized

Implements IConsoleManager.

◆ RegisterConsoleCommand() [1/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandDelegate & Command,
uint32 Flags )
overridevirtual

Register a console command that takes no arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleCommand() [2/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithArgsAndOutputDeviceDelegate & Command,
uint32 Flags )
overridevirtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleCommand() [3/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithArgsDelegate & Command,
uint32 Flags )
overridevirtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleCommand() [4/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithOutputDeviceDelegate & Command,
uint32 Flags )
overridevirtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleCommand() [5/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithWorldAndArgsDelegate & Command,
uint32 Flags )
overridevirtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleCommand() [6/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate & Command,
uint32 Flags )
overridevirtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleCommand() [7/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithWorldDelegate & Command,
uint32 Flags )
overridevirtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleCommand() [8/8]

virtual IConsoleCommand * FConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Register a console command that is handles by an Exec functions (for auto completion)

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
FlagsOptional flags bitmask

Implements IConsoleManager.

◆ RegisterConsoleVariable() [1/5]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
bool DefaultValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a bool console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariable() [2/5]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
const FString & DefaultValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariable() [3/5]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
const TCHAR * DefaultValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariable() [4/5]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
float DefaultValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a float console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariable() [5/5]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
int32 DefaultValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a int console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariableBitRef()

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariableBitRef ( const TCHAR * CVarName,
const TCHAR * FlagName,
uint32 BitNumber,
uint8 * Force0MaskPtr,
uint8 * Force1MaskPtr,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a reference to a show flag variable

Parameters
CVarNamemust not be 0, e.g. "Show.PostProcessing"
FlagNamemust not be 0, e.g. "PostProcessing"
BitNumberin the memory defined by Force0MaskPtr and Force1MaskPtr
Force0MaskPtrmemory that contains the bits that should be forced to 0
Force1MaskPtrmemory that contains the bits that should be forced to 1
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariableRef() [1/4]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
bool & RefValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a reference to a bool console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariableRef() [2/4]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
float & RefValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a reference to a float console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariableRef() [3/4]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
FString & RefValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a reference to a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariableRef() [4/4]

virtual IConsoleVariable * FConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
int32 & RefValue,
const TCHAR * Help,
uint32 Flags )
overridevirtual

Create a reference to a int console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implements IConsoleManager.

◆ RegisterConsoleVariableSink_Handle()

virtual FConsoleVariableSinkHandle FConsoleManager::RegisterConsoleVariableSink_Handle ( const FConsoleCommandDelegate & Command)
overridevirtual

The registered command is executed at few defined points (see CallAllConsoleVariableSinks)

Parameters
Command

Implements IConsoleManager.

◆ RegisterThreadPropagation()

virtual void FConsoleManager::RegisterThreadPropagation ( uint32 ThreadId,
IConsoleThreadPropagation * InCallback )
overridevirtual

Implements IConsoleManager.

◆ SaveHistory()

void FConsoleManager::SaveHistory ( )
private

◆ Test()

void FConsoleManager::Test ( )

Can be moved out into some automated testing system

◆ UnregisterConsoleObject() [1/2]

void FConsoleManager::UnregisterConsoleObject ( const TCHAR * Name,
bool bKeepState )
privatevirtual

Unregisters a console variable or command, if that object was registered. For console variables, this will actually only "deactivate" the variable so if it becomes registered again the state may persist (unless bKeepState is false).

Parameters
NameName of the console object to remove (not case sensitive)
bKeepStateif the current state is kept in memory until a cvar with the same name is registered

Implements IConsoleManager.

◆ UnregisterConsoleObject() [2/2]

virtual void FConsoleManager::UnregisterConsoleObject ( IConsoleObject * ConsoleObject,
bool bKeepState )
overridevirtual

Unregisters a console object, if that object was registered. O(n), n is the console object count

Parameters
ConsoleObject- object to remove
bKeepStateif the current state is kept in memory until a cvar with the same name is registered

Implements IConsoleManager.

◆ UnregisterConsoleVariableSink_Handle()

virtual void FConsoleManager::UnregisterConsoleVariableSink_Handle ( FConsoleVariableSinkHandle Handle)
overridevirtual

The registered command is executed at few defined points (see CallAllConsoleVariableSinks)

Parameters
Command

Implements IConsoleManager.

Member Data Documentation

◆ bCallAllConsoleVariableSinks

bool FConsoleManager::bCallAllConsoleVariableSinks
private

Definition at line 105 of file ConsoleManager.h.

◆ bHistoryWasLoaded

bool FConsoleManager::bHistoryWasLoaded
private

Definition at line 96 of file ConsoleManager.h.

◆ ConsoleObjects

TMap<FString, IConsoleObject*> FConsoleManager::ConsoleObjects
private

Map of console variables and commands, indexed by the name of that command or variable

Definition at line 94 of file ConsoleManager.h.

◆ ConsoleObjectsSynchronizationObject

FCriticalSection FConsoleManager::ConsoleObjectsSynchronizationObject
mutableprivate

Used to prevent concurrent access to ConsoleObjects. We don't aim to solve all concurrency problems (for example registering and unregistering a cvar on different threads, or reading a cvar from one thread while writing it from a different thread). Rather we just ensure that operations on a cvar from one thread will not conflict with operations on another cvar from another thread.

Definition at line 112 of file ConsoleManager.h.

◆ ConsoleVariableChangeSinks

TArray<FConsoleCommandDelegate> FConsoleManager::ConsoleVariableChangeSinks
private

Definition at line 98 of file ConsoleManager.h.

◆ ConsoleVariableUnregisteredDelegate

FConsoleVariableMulticastDelegate FConsoleManager::ConsoleVariableUnregisteredDelegate
private

Definition at line 100 of file ConsoleManager.h.

◆ HistoryEntriesMap

TMap<FString, TArray<FString> > FConsoleManager::HistoryEntriesMap
private

Definition at line 97 of file ConsoleManager.h.

◆ ThreadPropagationCallback

IConsoleThreadPropagation* FConsoleManager::ThreadPropagationCallback
private

Definition at line 102 of file ConsoleManager.h.


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