Bridges-C++  3.4.2
Bridges(C++ API)
DataStructure.h
Go to the documentation of this file.
1 #ifndef DATA_STRUCTURE_H
2 #define DATA_STRUCTURE_H
3 
40 #include <string> //string
41 using namespace std;
42 
43 namespace bridges {
44  class Bridges; //forward declaration
45 
46  // string constants for use in constructing JSON
47  // representation of the data structure
48  const string
49  QUOTE = "\"",
50  COMMA = ",",
51  COLON = ":",
52  OPEN_CURLY = "{",
53  CLOSE_CURLY = "}",
54  OPEN_BOX = "[",
55  CLOSE_BOX = "]",
56  OPEN_PARENS = "(",
57  CLOSE_PARENS = ")";
58  namespace datastructure {
59 
60  // Maximum number of elements that can be visualized
61  constexpr int MAX_ELEMENTS_ALLOWED = 5000;
62 
73  class DataStructure {
74  // Used for access to getDataStructureRepresentation()
75  friend class bridges::Bridges;
76  // friend void Bridges::visualize();
77 
78  public:
82  virtual ~DataStructure() = default;
83 
87  virtual const string getDStype() const = 0;
88 
97  private:
103  virtual const string getDataStructureRepresentation() const = 0;
104 
105  }; //end of DataStructure class
106  }
107 } //end of bridges namespace
108 #endif
This class contains methods to connect and transmit a user's data structure representation to the Bri...
Definition: Bridges.h:42
This is the superclass of all data structure types in BRIDGES.
Definition: DataStructure.h:73
virtual const string getDStype() const =0
constexpr int MAX_ELEMENTS_ALLOWED
Definition: DataStructure.h:61
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4
const string COLON
Definition: DataStructure.h:51
const string OPEN_BOX
Definition: DataStructure.h:54
const string COMMA
Definition: DataStructure.h:50
const string OPEN_CURLY
Definition: DataStructure.h:52
const string CLOSE_BOX
Definition: DataStructure.h:55
const string CLOSE_CURLY
Definition: DataStructure.h:53
const string QUOTE
Definition: DataStructure.h:49
const string OPEN_PARENS
Definition: DataStructure.h:56
const string CLOSE_PARENS
Definition: DataStructure.h:57