Bridges-C++  3.4.5-dev1-6-g935685a
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 #include <rapidjson/document.h>
42 using namespace std;
43 
44 namespace bridges {
45  class Bridges; //forward declaration
46 
47  // string constants for use in constructing JSON
48  // representation of the data structure
49  const string
50  QUOTE = "\"",
51  COMMA = ",",
52  COLON = ":",
53  OPEN_CURLY = "{",
54  CLOSE_CURLY = "}",
55  OPEN_BOX = "[",
56  CLOSE_BOX = "]",
57  OPEN_PARENS = "(",
58  CLOSE_PARENS = ")";
59  namespace datastructure {
60 
61  // Maximum number of elements that can be visualized
62  constexpr int MAX_ELEMENTS_ALLOWED = 5000;
63 
74  class DataStructure {
75  // Used for access to getDataStructureRepresentation()
76  friend class bridges::Bridges;
77  // friend void Bridges::visualize();
78 
79  public:
83  virtual ~DataStructure() = default;
84 
88  virtual const string getDStype() const = 0;
89 
98  private:
104  virtual const string getDataStructureRepresentation() const = 0;
105  // virtual void getDataStructureRepresentation(rapidjson::Document& d) const = 0;
106 
107  }; //end of DataStructure class
108  }
109 } //end of bridges namespace
110 #endif
This class contains methods to connect and transmit a user's data structure representation to the Bri...
Definition: Bridges.h:50
This is the superclass of all data structure types in BRIDGES.
Definition: DataStructure.h:74
virtual const string getDStype() const =0
constexpr int MAX_ELEMENTS_ALLOWED
Definition: DataStructure.h:62
Support for drawing Bar charts.
Definition: alltypes.h:4
const string COLON
Definition: DataStructure.h:52
const string OPEN_BOX
Definition: DataStructure.h:55
const string COMMA
Definition: DataStructure.h:51
const string OPEN_CURLY
Definition: DataStructure.h:53
const string CLOSE_BOX
Definition: DataStructure.h:56
const string CLOSE_CURLY
Definition: DataStructure.h:54
const string QUOTE
Definition: DataStructure.h:50
const string OPEN_PARENS
Definition: DataStructure.h:57
const string CLOSE_PARENS
Definition: DataStructure.h:58