OpenWalnut
1.5.0dev
|
Represents a CSV dataset. More...
#include <WDataSetCSV.h>
Public Types | |
typedef std::vector< std::vector< std::string > > | Content |
represents a vector containing a vector of strings. More... | |
typedef std::shared_ptr< std::vector< std::vector< std::string > > > | ContentSPtr |
represents a pointer to the Content More... | |
typedef std::shared_ptr< std::vector< std::string > > | SeperatedRowSPtr |
represents a pointer to a vector of csv-raw-row as string More... | |
typedef std::vector< std::string > | ContentElem |
represents an element within WDataSetCSV object. More... | |
typedef std::shared_ptr< std::vector< std::string > > | ContentElemSPtr |
represents a shared pointer to a ContentElem object. More... | |
Public Types inherited from WDataSet | |
typedef std::shared_ptr< WDataSet > | SPtr |
Shared pointer abbreviation to a instance of this class. More... | |
typedef std::shared_ptr< const WDataSet > | ConstSPtr |
Shared pointer abbreviation to a const instance of this class. More... | |
Public Member Functions | |
WDataSetCSV (WDataSetCSV::ContentSPtr header, WDataSetCSV::ContentSPtr data) | |
Construct WDataSetCSV object. More... | |
WDataSetCSV () | |
The standard constructor. More... | |
virtual | ~WDataSetCSV () |
Destructs this dataset. More... | |
WDataSetCSV::ContentSPtr | getHeader () |
Getter method to receive csv header. More... | |
WDataSetCSV::ContentSPtr | getData () |
Getter method to receive csv data. More... | |
void | setRawDataSet (WDataSetCSV::SeperatedRowSPtr rawDataSetIn) |
Getter method to receive csv rawdata. More... | |
SeperatedRowSPtr | getRawDataSet () |
Getter method to receive csv data. More... | |
Public Member Functions inherited from WDataSet | |
WDataSet () | |
This constructor should be used if a dataSet does not stem from a file. More... | |
virtual | ~WDataSet () |
Since WDataSet is a base class and thus should be polymorphic we add virtual destructor. More... | |
void | setFilename (const std::string filename) |
Set the name of the file that this data set stems from. More... | |
std::string | getFilename () const |
Get the name of the file that this data set stems from. More... | |
OW_API_DEPRECATED void | setFileName (const std::string filename) |
Set the name of the file that this data set stems from. More... | |
OW_API_DEPRECATED std::string | getFileName () const |
Get the name of the file that this data set stems from. More... | |
virtual bool | isTexture () const |
Determines whether this dataset can be used as a texture. More... | |
virtual std::shared_ptr< WDataSetVector > | isVectorDataSet () |
Checks if this dataset is a vector dataset. More... | |
virtual osg::ref_ptr< WDataTexture3D > | getTexture () const |
Returns the texture- representation of the dataset. More... | |
virtual const std::string | getName () const |
Gets the name of this prototype. More... | |
virtual const std::string | getDescription () const |
Gets the description for this prototype. More... | |
std::shared_ptr< WProperties > | getProperties () const |
Return a pointer to the properties object of the dataset. More... | |
std::shared_ptr< WProperties > | getInformationProperties () const |
Return a pointer to the information properties object of the dataset. More... | |
Public Member Functions inherited from WTransferable | |
WTransferable () | |
Default constructor. More... | |
virtual | ~WTransferable () |
Destructor. More... | |
Public Member Functions inherited from WPrototyped | |
WPrototyped () | |
Default constructor. More... | |
virtual | ~WPrototyped () |
Destructor. More... | |
template<typename T > | |
bool | isA () |
Checks whether the actual prototype has the specified runtime type. More... | |
Private Attributes | |
WDataSetCSV::ContentSPtr | m_header |
Stores the column titles of a loaded CSV file. More... | |
WDataSetCSV::ContentSPtr | m_data |
Stores the data of a loaded CSV file. More... | |
SeperatedRowSPtr | rawDataSet |
Stores the rawdata of a loaded CSV file. More... | |
Friends | |
class | WDataSetCSVTest |
Only test class may be friend. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from WDataSet | |
static std::shared_ptr< WPrototyped > | getPrototype () |
Returns a prototype instantiated with the true type of the deriving class. More... | |
Protected Attributes inherited from WDataSet | |
std::shared_ptr< WProperties > | m_properties |
The property object for the dataset. More... | |
std::shared_ptr< WProperties > | m_infoProperties |
The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". More... | |
Static Protected Attributes inherited from WDataSet | |
static std::shared_ptr< WPrototyped > | m_prototype = std::shared_ptr< WPrototyped >() |
The prototype as singleton. More... | |
Represents a CSV dataset.
Definition at line 37 of file WDataSetCSV.h.
typedef std::vector< std::vector< std::string > > WDataSetCSV::Content |
represents a vector containing a vector of strings.
Definition at line 47 of file WDataSetCSV.h.
typedef std::vector< std::string > WDataSetCSV::ContentElem |
represents an element within WDataSetCSV object.
Definition at line 62 of file WDataSetCSV.h.
typedef std::shared_ptr< std::vector< std::string > > WDataSetCSV::ContentElemSPtr |
represents a shared pointer to a ContentElem object.
Definition at line 67 of file WDataSetCSV.h.
typedef std::shared_ptr< std::vector< std::vector< std::string > > > WDataSetCSV::ContentSPtr |
represents a pointer to the Content
Definition at line 52 of file WDataSetCSV.h.
typedef std::shared_ptr< std::vector< std:: string > > WDataSetCSV::SeperatedRowSPtr |
represents a pointer to a vector of csv-raw-row as string
Definition at line 57 of file WDataSetCSV.h.
|
explicit |
Construct WDataSetCSV object.
header | Column names of the CSV file. |
data | Data content of the CSV file. |
Definition at line 28 of file WDataSetCSV.cpp.
WDataSetCSV::WDataSetCSV | ( | ) |
The standard constructor.
Definition at line 33 of file WDataSetCSV.cpp.
|
virtual |
Destructs this dataset.
Definition at line 37 of file WDataSetCSV.cpp.
WDataSetCSV::ContentSPtr WDataSetCSV::getData | ( | ) |
Getter method to receive csv data.
Definition at line 46 of file WDataSetCSV.cpp.
References m_data.
Referenced by WDataSetCSVTest::testGetData().
WDataSetCSV::ContentSPtr WDataSetCSV::getHeader | ( | ) |
Getter method to receive csv header.
Definition at line 41 of file WDataSetCSV.cpp.
References m_header.
Referenced by WDataSetCSVTest::testGetHeader().
WDataSetCSV::SeperatedRowSPtr WDataSetCSV::getRawDataSet | ( | ) |
Getter method to receive csv data.
Definition at line 51 of file WDataSetCSV.cpp.
References rawDataSet.
void WDataSetCSV::setRawDataSet | ( | WDataSetCSV::SeperatedRowSPtr | rawDataSetIn | ) |
Getter method to receive csv rawdata.
rawDataSetIn | as WDataSetCSV::SeperatedRowSPtr object |
Definition at line 56 of file WDataSetCSV.cpp.
References rawDataSet.
|
friend |
Only test class may be friend.
Definition at line 42 of file WDataSetCSV.h.
|
private |
Stores the data of a loaded CSV file.
Definition at line 124 of file WDataSetCSV.h.
Referenced by getData().
|
private |
Stores the column titles of a loaded CSV file.
Definition at line 119 of file WDataSetCSV.h.
Referenced by getHeader().
|
private |
Stores the rawdata of a loaded CSV file.
Definition at line 129 of file WDataSetCSV.h.
Referenced by getRawDataSet(), and setRawDataSet().