libRDataFrame  0.815
A library with R style datatypes and associated utilities
 All Classes Files Functions Variables Pages
node.hpp
1 #ifndef NODE_HPP_INCLUDED
2 #define NODE_HPP_INCLUDED
3 
4 
5 #include <cstdio>
6 #include <cstdlib>
7 #include <cctype>
8 #include <iostream>
9 #include <ostream>
10 #include <fstream>
11 #include <sstream>
12 #include <string>
13 #include <vector>
14 #include <map>
15 #include <tuple>
16 #include <algorithm>
17 #include <typeinfo>
18 #include <cxxabi.h>
19 #include <array>
20 #include <initializer_list>
21 #include <boost/any.hpp>
22 
23 
24 
25 class node {
26 protected:
27  int nrows = 0;
28  std::string varName = "";
29  std::string varType = "";
30  int varNumber = 0;
31  void* ptrData = nullptr;
32  void* retPtr = nullptr;
33  std::vector<int>* ipData = nullptr;
34  std::vector<double>* dpData= nullptr;
35  std::vector<std::string>* spData= nullptr;
36  std::vector<int>* cpData = nullptr;
37  std::map<int, std::string> categorySet;
38  std::vector<int> catVarData;
39 public:
40  node();
41  node(int r, std::string vName, std::string vType, int vNumber);
42  node(void* pvData);
43  node(int r, std::string vName, std::string vType, int vNumber, std::map<int, std::string> catSet);
44  node(int r, std::string vName, std::string vType, int vNumber, void* pvData);
45  void* getVarDataRange(int start, int ending);
46  void* getPtrData();
47  void* getVarData();
48  std::string getVarName();
49  std::string getVarType();
50  int getVarNumber();
51  int getNRows();
52  std::vector<int> getNodeIntData ();
53  std::vector<int> getNodeIntData (void* pData);
54  std::vector<double> getNodeDblData ();
55  std::vector<double> getNodeDblData (void* pData);
56  std::vector<std::string> getNodeStrData ();
57  std::vector<std::string> getNodeStrData (void* pData);
58  std::vector<int> getNodeCatData ();
59  std::vector<int> getNodeCatData (void* pData);
60  void setNodeContent(int r, std::string vName, std::string vType, int vNumber, void* pvData);
61  void setVarDataRows(int r);
62  void setVarData(void* pvData);
63  void setVarName(std::string vName);
64  void setVarType(std::string vType);
65  void setVarNumber(int vNumber);
66  void displayNode();
67  void displayName_Type();
68  std::string toString();
69 };
70 
71 #endif // NODE_HPP_INCLUDED
void * getVarDataRange(int start, int ending)
Definition: node.cpp:141
int getVarNumber()
Definition: node.cpp:247
int getNRows()
Definition: node.cpp:255
void setVarName(std::string vName)
Definition: node.cpp:346
std::string getVarName()
Definition: node.cpp:230
void * getVarData()
Definition: node.cpp:202
Definition: node.hpp:25
void * getPtrData()
Definition: node.cpp:193
std::vector< int > getNodeCatData()
Definition: node.cpp:302
void setVarNumber(int vNumber)
Definition: node.cpp:500
std::vector< std::string > getNodeStrData()
Definition: node.cpp:289
std::vector< double > getNodeDblData()
Definition: node.cpp:276
void setVarData(void *pvData)
Definition: node.cpp:338
std::string toString()
Definition: node.cpp:562
std::string getVarType()
Definition: node.cpp:238
void setVarType(std::string vType)
Definition: node.cpp:355
void displayName_Type()
Definition: node.cpp:553
std::vector< int > getNodeIntData()
Definition: node.cpp:263
node()
Definition: node.cpp:57
void displayNode()
Definition: node.cpp:509
void setNodeContent(int r, std::string vName, std::string vType, int vNumber, void *pvData)
Definition: node.cpp:318
void setVarDataRows(int r)
Definition: node.cpp:330