46 const std::string& subjectID)
const;
66 static std::shared_ptr<Chain>
LoadFromFile(
const std::string& path);
72 static std::shared_ptr<Chain>
CreateNew(
const std::string& path,
73 const std::string& name,
74 const std::string& description =
"");
77 const std::string&
GetName()
const {
return mName; }
80 const std::vector<ChainItem>&
GetItems()
const {
return mItems; }
81 int GetItemCount()
const {
return static_cast<int>(mItems.size()); }
88 void SetName(
const std::string& name) { mName = name; }
102 bool MoveItem(
int fromIndex,
int toIndex);
112 ValidationResult
Validate(
const class Study* study =
nullptr)
const;
115 bool LoadFromJSON(
const std::string& jsonPath);
116 bool SaveToJSON(
const std::string& jsonPath);
118 std::string mFilePath;
120 std::string mDescription;
121 int mParticipantCounter;
122 std::vector<ChainItem> mItems;
129 std::string mLSLStreamName;
std::string ItemTypeToString(ItemType type)
ItemType StringToItemType(const std::string &str)
bool GetUploadEnabled() const
void AddItem(const ChainItem &item)
const std::vector< ChainItem > & GetItems() const
void SetLSLEnabled(bool enabled)
void SetUploadEnabled(bool enabled)
void SetLSLStreamName(const std::string &name)
const std::string & GetLSLStreamName() const
ValidationResult Validate(const class Study *study=nullptr) const
void SetParticipantCounter(int counter)
void IncrementParticipantCounter()
int GetParticipantCounter() const
bool GetLSLEnabled() const
const std::string & GetFilePath() const
const std::string & GetName() const
const std::string & GetDescription() const
static std::shared_ptr< Chain > LoadFromFile(const std::string &path)
ChainItem * GetItem(int index)
static std::shared_ptr< Chain > CreateNew(const std::string &path, const std::string &name, const std::string &description="")
bool RemoveItem(int index)
void SetDescription(const std::string &desc)
bool MoveItem(int fromIndex, int toIndex)
void SetName(const std::string &name)
void InsertItem(int index, const ChainItem &item)
std::string CreateChainPageConfig(const std::string &tempDir) const
std::string GetDisplayName() const
std::string BuildTestCommand(const std::string &studyPath, const std::string &subjectID) const
std::vector< std::string > warnings
std::vector< std::string > errors