Twitch SDK (Internal)
experimenttypes.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * Twitch Broadcasting SDK
3 *
4 * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
5 * may not be copied or used except in accordance with the terms of that agreement
6 * Copyright (c) 2012-2017 Twitch Interactive, Inc.
7 *********************************************************************************************/
8 
9 #pragma once
10 
13 
14 #include <map>
15 
16 namespace ttv
17 {
18  namespace experiment
19  {
20  struct Group
21  {
22  std::string value; // The name of the group used to identify the variation used.
23  uint32_t weight; // The weight assigned to this group.
24  };
25 
26  struct Experiment
27  {
28  std::string guid; // The unique ID of the experiment.
29  std::string name; // The human-readable name of the experiment.
30  std::vector<Group> groups; // The available groups in the experiment.
31  };
32 
34  {
35  std::map<std::string, Experiment> experiments; // The available experiments, mapping GUID to experiment.
36  std::string serialized; // The raw experiment JSON for use in persisting the experiments across applications runs.
37  };
38  }
39 }
std::map< std::string, Experiment > experiments
Definition: experimenttypes.h:35
Definition: experimenttypes.h:20
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
std::string serialized
Definition: experimenttypes.h:36
std::string value
Definition: experimenttypes.h:22
std::string guid
Definition: experimenttypes.h:28
std::vector< Group > groups
Definition: experimenttypes.h:30
std::string name
Definition: experimenttypes.h:29
Definition: experimenttypes.h:33
Definition: experimenttypes.h:26
uint32_t weight
Definition: experimenttypes.h:23