PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
Chain.h File Reference
#include <string>
#include <vector>
#include <memory>

Go to the source code of this file.

Classes

struct  ChainItem
 
class  Chain
 
struct  Chain::ValidationResult
 

Enumerations

enum class  ItemType { Instruction , Consent , Completion , Test }
 

Functions

std::string ItemTypeToString (ItemType type)
 
ItemType StringToItemType (const std::string &str)
 

Enumeration Type Documentation

◆ ItemType

enum class ItemType
strong
Enumerator
Instruction 
Consent 
Completion 
Test 

Definition at line 13 of file Chain.h.

13 {
15 Consent,
17 Test
18};
Definition Study.h:24

Function Documentation

◆ ItemTypeToString()

std::string ItemTypeToString ( ItemType  type)

Definition at line 20 of file Chain.cpp.

20 {
21 switch (type) {
23 return "instruction";
25 return "consent";
27 return "completion";
28 case ItemType::Test:
29 return "test";
30 default:
31 return "unknown";
32 }
33}

References Completion, Consent, Instruction, and Test.

Referenced by ChainItem::CreateChainPageConfig(), and ChainItem::GetDisplayName().

◆ StringToItemType()

ItemType StringToItemType ( const std::string &  str)

Definition at line 35 of file Chain.cpp.

35 {
36 if (str == "instruction") return ItemType::Instruction;
37 if (str == "consent") return ItemType::Consent;
38 if (str == "completion") return ItemType::Completion;
39 if (str == "test") return ItemType::Test;
40 return ItemType::Instruction; // Default fallback
41}

References Completion, Consent, Instruction, and Test.