Daraja HTTP Framework 3.0.7-SNAPSHOT
HTTP server framework for Object Pascal
Loading...
Searching...
No Matches
TdjAbstractConfig Class Reference

Generic configuration class for managing initialization parameters and context. More...

Inheritance diagram for TdjAbstractConfig:
IWriteableConfig IContextConfig TdjWebComponentConfig TdjWebFilterConfig

Public Member Functions

 TdjAbstractConfig ()
 Constructor.
 ~TdjAbstractConfig ()
 Destructor.
IContext GetContext ()
 Get the current context.

Protected Member Functions

 Add (const string Key, const string Value)
 Adds a key-value pair to configuration.
string GetInitParameter (const string Key)
 Gets an initialization parameter.
TdjStrings GetInitParameterNames ()
 SetContext (const IContext Context)
 Sets the context for this configuration.

Detailed Description

Generic configuration class for managing initialization parameters and context.

This class implements the IWriteableConfig interface and provides methods to add parameters, retrieve them, and manage the application context.

Constructor & Destructor Documentation

◆ TdjAbstractConfig()

TdjAbstractConfig::TdjAbstractConfig ( )

Constructor.

Initializes the configuration object and allocates resources for parameters.

References TdjAbstractConfig().

Referenced by TdjAbstractConfig(), and GetContext().

◆ ~TdjAbstractConfig()

TdjAbstractConfig::~TdjAbstractConfig ( )

Destructor.

Frees allocated resources and cleans up the configuration object.

Member Function Documentation

◆ Add()

TdjAbstractConfig::Add ( const string Key,
const string Value )
protected

Adds a key-value pair to configuration.

Parameters
KeyParameter name
ValueParameter value

Implements IWriteableConfig.

◆ GetContext()

IContext TdjAbstractConfig::GetContext ( )

Get the current context.

Returns
The context associated with this configuration.

References TdjAbstractConfig().

◆ GetInitParameter()

string TdjAbstractConfig::GetInitParameter ( const string Key)
protected

Gets an initialization parameter.

Parameters
KeyParameter name
Returns
Parameter value or empty string if not found

Implements IContextConfig.

◆ GetInitParameterNames()

TdjStrings TdjAbstractConfig::GetInitParameterNames ( )
protected
Returns
Names of all initialization parameters

Implements IContextConfig.

◆ SetContext()

TdjAbstractConfig::SetContext ( const IContext Context)
protected

Sets the context for this configuration.

Parameters
ContextContext to set
Exceptions
EWebComponentExceptionif the context is nil or if the context is already set and differs from the new context.

Implements IWriteableConfig.