Conscience Core
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
conscience_core::bridging::commands::CommandStorageFileDownload Class Reference

#include <CommandStorageFileDownload.h>

Inheritance diagram for conscience_core::bridging::commands::CommandStorageFileDownload:
conscience_core::bridging::commands::CscCommand

Public Member Functions

 CommandStorageFileDownload (ptr< CscEntityReflexion > entityReflexion, const string &storageRelativePath)
 
- Public Member Functions inherited from conscience_core::bridging::commands::CscCommand
template<class TResult = CscCommandExecutionResult>
const TResult * execute (CscEnvironmentSimulator &environmentSimulator)
 
const CommandTypeIdgetTypeId () const
 
virtual ~CscCommand ()
 
void setOriginalCommandString (string command)
 

Public Attributes

optional< function< void(float progress)> > onDownloadProgress = {}
 

Static Public Attributes

static const CommandTypeId COMMAND_ID = "STORAGE_FILE_DOWNLOAD"
 

Protected Member Functions

const CscCommandExecutionResultFiledoExecute (CscEnvironmentSimulator &environmentSimulator) override
 
ptr< CscEntityReflexiongetEntityReflexion () const override
 
- Protected Member Functions inherited from conscience_core::bridging::commands::CscCommand
 CscCommand (const CommandTypeId &typeId)
 
const CscCommandExecutionResultNoneresultNone ()
 
const CscCommandExecutionResultSequenceresultSequence (CscSequence *sequence, const string &entitySerialNumber, bool doNotPlay=false)
 
const CscCommandExecutionResultFileresultFile (const fs::path &resultingFilePath)
 
template<class TResult >
const CscCommandExecutionResultObject< TResult > * resultObject (TResult *result)
 
const CscWorldElementId getEntityId () const
 

Protected Attributes

ptr< CscEntityReflexionentityReflexion
 
const string storageRelativePath
 
std::unique_ptr< CscLoggerlogger = CscLogger::getForCategory("CommandStorageFileDownload")
 
- Protected Attributes inherited from conscience_core::bridging::commands::CscCommand
const CommandTypeId typeId
 
optional< string > originalCommandString = {}
 

Additional Inherited Members

- Public Types inherited from conscience_core::bridging::commands::CscCommand
typedef function< void(CscCommand *command)> CommandExecutedListener
 
- Static Public Member Functions inherited from conscience_core::bridging::commands::CscCommand
static void addCommandExecutedListener (CommandExecutedListener listener)
 

Detailed Description

Download a file from storage of given entity. If entity is simulated -> does nothing When called from cpp -> use onDownloadProgress field to listen progress

Constructor & Destructor Documentation

◆ CommandStorageFileDownload()

conscience_core::bridging::commands::CommandStorageFileDownload::CommandStorageFileDownload ( ptr< CscEntityReflexion entityReflexion,
const string &  storageRelativePath 
)
Parameters
entityReflexionthe entity from which download the file
storageRelativePathfile relative path on entity storage

Member Function Documentation

◆ doExecute()

const CscCommandExecutionResultFile * conscience_core::bridging::commands::CommandStorageFileDownload::doExecute ( CscEnvironmentSimulator environmentSimulator)
overrideprotectedvirtual

◆ getEntityReflexion()

ptr< CscEntityReflexion > conscience_core::bridging::commands::CommandStorageFileDownload::getEntityReflexion ( ) const
overrideprotectedvirtual

return entity reflexion if this command applies on an entityReflexion, otherwise return nullptr

Implements conscience_core::bridging::commands::CscCommand.

Member Data Documentation

◆ COMMAND_ID

const CommandTypeId conscience_core::bridging::commands::CommandStorageFileDownload::COMMAND_ID = "STORAGE_FILE_DOWNLOAD"
inlinestatic

◆ entityReflexion

ptr<CscEntityReflexion> conscience_core::bridging::commands::CommandStorageFileDownload::entityReflexion
protected

◆ logger

std::unique_ptr<CscLogger> conscience_core::bridging::commands::CommandStorageFileDownload::logger = CscLogger::getForCategory("CommandStorageFileDownload")
protected

◆ onDownloadProgress

optional<function<void(float progress)> > conscience_core::bridging::commands::CommandStorageFileDownload::onDownloadProgress = {}

◆ storageRelativePath

const string conscience_core::bridging::commands::CommandStorageFileDownload::storageRelativePath
protected

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