libadblockplus
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Types | Public Member Functions | List of all members
AdblockPlus::DefaultPlatformBuilder Class Reference

A helper class allowing to construct a default Platform and to obtain the Scheduler used by Platform before the latter is constructed. More...

#include <Platform.h>

Inheritance diagram for AdblockPlus::DefaultPlatformBuilder:
Inheritance graph
[legend]
Collaboration diagram for AdblockPlus::DefaultPlatformBuilder:
Collaboration graph
[legend]

Public Types

typedef std::shared_ptr
< OptionalAsyncExecutor
AsyncExecutorPtr
 Private.
 

Public Member Functions

Scheduler GetDefaultAsyncExecutor ()
 Constructs a default executor for asynchronous tasks. More...
 
void CreateDefaultTimer ()
 Constructs default implementation of ITimer.
 
void CreateDefaultFileSystem (const std::string &basePath=std::string())
 Constructs default implementation of IFileSystem. More...
 
void CreateDefaultWebRequest (WebRequestSyncPtr webRequest=nullptr)
 Constructs default implementation of IWebRequest.
 
void CreateDefaultLogSystem ()
 Constructs default implementation of LogSystem.
 
std::unique_ptr< PlatformCreatePlatform ()
 Constructs Platform with default implementations of platform interfaces when a corresponding field is nullptr and with a default Scheduler.
 

Additional Inherited Members

- Public Attributes inherited from AdblockPlus::Platform::CreationParameters
LogSystemPtr logSystem
 
TimerPtr timer
 
WebRequestPtr webRequest
 
FileSystemPtr fileSystem
 

Detailed Description

A helper class allowing to construct a default Platform and to obtain the Scheduler used by Platform before the latter is constructed.

Member Function Documentation

void AdblockPlus::DefaultPlatformBuilder::CreateDefaultFileSystem ( const std::string &  basePath = std::string())

Constructs default implementation of IFileSystem.

Parameters
basePathA working directory for file system operations.
Scheduler AdblockPlus::DefaultPlatformBuilder::GetDefaultAsyncExecutor ( )

Constructs a default executor for asynchronous tasks.

When Platform is being destroyed it starts to ignore new tasks and waits for finishing of already running tasks.

Returns
Scheduler allowing to execute tasks asynchronously.

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