|
PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
|
#include <ScaleManager.h>
Classes | |
| struct | LooseOSDEntry |
| struct | ScaleMetadata |
Public Member Functions | |
| ScaleManager (const std::string &batteryPath, const std::string &workspacePath="") | |
| ~ScaleManager () | |
| std::vector< std::string > | GetAvailableScales () |
| std::shared_ptr< ScaleDefinition > | CreateScale (const std::string &code) |
| std::shared_ptr< ScaleDefinition > | LoadScale (const std::string &code) |
| bool | SaveScale (std::shared_ptr< ScaleDefinition > scale) |
| bool | DeleteScale (const std::string &code) |
| bool | ExportToBattery (std::shared_ptr< ScaleDefinition > scale) |
| std::shared_ptr< ScaleDefinition > | ImportFromFile (const std::string &filePath) |
| std::vector< LooseOSDEntry > | GetLooseOSDEntries () const |
| std::shared_ptr< ScaleDefinition > | InstallLooseOSD (const std::string &osdPath) |
| std::string | GetDefinitionPath (const std::string &code) const |
| std::string | GetOSDPath (const std::string &code) const |
| std::string | GetTranslationPath (const std::string &code, const std::string &lang) const |
| std::string | GetBatteryPath () const |
| std::string | GetWorkspacePath () const |
| std::string | GetBatteryScalesPath () const |
| std::string | GetWorkspaceScalesPath () const |
| std::string | GetScalesPath () const |
| std::string | GetDefinitionsPath () const |
| bool | ScaleExists (const std::string &code) const |
| ScaleMetadata | GetScaleMetadata (const std::string &code) const |
| bool | CreateStudyFromScale (std::shared_ptr< ScaleDefinition > scale, const std::string &workspaceStudiesPath, const std::string &studyName="") |
| bool | AddScaleToStudy (std::shared_ptr< ScaleDefinition > scale, const std::string &studyPath) |
Definition at line 14 of file ScaleManager.h.
| ScaleManager::ScaleManager | ( | const std::string & | batteryPath, |
| const std::string & | workspacePath = "" |
||
| ) |
Definition at line 24 of file ScaleManager.cpp.
| ScaleManager::~ScaleManager | ( | ) |
Definition at line 41 of file ScaleManager.cpp.
| bool ScaleManager::AddScaleToStudy | ( | std::shared_ptr< ScaleDefinition > | scale, |
| const std::string & | studyPath | ||
| ) |
Definition at line 617 of file ScaleManager.cpp.
References Test::displayName, Test::included, Study::LoadFromDirectory(), Test::testName, and Test::testPath.
| std::shared_ptr< ScaleDefinition > ScaleManager::CreateScale | ( | const std::string & | code | ) |
Definition at line 97 of file ScaleManager.cpp.
References ScaleDefinition::CreateNew().
| bool ScaleManager::CreateStudyFromScale | ( | std::shared_ptr< ScaleDefinition > | scale, |
| const std::string & | workspaceStudiesPath, | ||
| const std::string & | studyName = "" |
||
| ) |
Definition at line 440 of file ScaleManager.cpp.
References Study::CreateNew(), Chain::CreateNew(), Test::displayName, Test::included, ChainItem::language, ChainItem::paramVariant, ChainItem::randomGroup, Test, ChainItem::testName, Test::testName, and Test::testPath.
| bool ScaleManager::DeleteScale | ( | const std::string & | code | ) |
Definition at line 140 of file ScaleManager.cpp.
References GetDefinitionPath().
| bool ScaleManager::ExportToBattery | ( | std::shared_ptr< ScaleDefinition > | scale | ) |
Definition at line 163 of file ScaleManager.cpp.
References SaveScale().
| std::vector< std::string > ScaleManager::GetAvailableScales | ( | ) |
Definition at line 59 of file ScaleManager.cpp.
|
inline |
Definition at line 57 of file ScaleManager.h.
|
inline |
Definition at line 59 of file ScaleManager.h.
| std::string ScaleManager::GetDefinitionPath | ( | const std::string & | code | ) | const |
Definition at line 244 of file ScaleManager.cpp.
Referenced by DeleteScale(), GetScaleMetadata(), and ScaleExists().
|
inline |
Definition at line 64 of file ScaleManager.h.
| std::vector< ScaleManager::LooseOSDEntry > ScaleManager::GetLooseOSDEntries | ( | ) | const |
Definition at line 173 of file ScaleManager.cpp.
References ScaleManager::LooseOSDEntry::code, ScaleManager::LooseOSDEntry::name, and ScaleManager::LooseOSDEntry::path.
| std::string ScaleManager::GetOSDPath | ( | const std::string & | code | ) | const |
Definition at line 260 of file ScaleManager.cpp.
Referenced by GetScaleMetadata().
| ScaleManager::ScaleMetadata ScaleManager::GetScaleMetadata | ( | const std::string & | code | ) | const |
Definition at line 357 of file ScaleManager.cpp.
References ScaleManager::ScaleMetadata::author, ScaleManager::ScaleMetadata::availableLanguages, ScaleManager::ScaleMetadata::code, ScaleManager::ScaleMetadata::description, GetDefinitionPath(), GetOSDPath(), ScaleManager::ScaleMetadata::name, and ScaleManager::ScaleMetadata::questionCount.
|
inline |
Definition at line 63 of file ScaleManager.h.
Referenced by SaveScale().
| std::string ScaleManager::GetTranslationPath | ( | const std::string & | code, |
| const std::string & | lang | ||
| ) | const |
Definition at line 275 of file ScaleManager.cpp.
|
inline |
Definition at line 58 of file ScaleManager.h.
|
inline |
Definition at line 60 of file ScaleManager.h.
| std::shared_ptr< ScaleDefinition > ScaleManager::ImportFromFile | ( | const std::string & | filePath | ) |
Definition at line 168 of file ScaleManager.cpp.
References ScaleDefinition::LoadFromFile().
| std::shared_ptr< ScaleDefinition > ScaleManager::InstallLooseOSD | ( | const std::string & | osdPath | ) |
Definition at line 214 of file ScaleManager.cpp.
References ScaleDefinition::LoadFromOSDFile().
| std::shared_ptr< ScaleDefinition > ScaleManager::LoadScale | ( | const std::string & | code | ) |
Definition at line 102 of file ScaleManager.cpp.
| bool ScaleManager::SaveScale | ( | std::shared_ptr< ScaleDefinition > | scale | ) |
Definition at line 121 of file ScaleManager.cpp.
References GetScalesPath().
Referenced by ExportToBattery().
| bool ScaleManager::ScaleExists | ( | const std::string & | code | ) | const |
Definition at line 295 of file ScaleManager.cpp.
References GetDefinitionPath().