API Documentation
Loading...
Searching...
No Matches
DatasetManager.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Dictionary.h>
4#include <NDEVR/String.h>
5#include <NDEVR/TranslatedString.h>
6namespace NDEVR
7{
8 class Model;
9 /**--------------------------------------------------------------------------------------------------
10 \brief A dataset is a basic grouping of data (DEPRECIATED)
11 *-----------------------------------------------------------------------------------------------**/
12 class Dataset
13 {
14 public:
15 virtual ~Dataset(){}
16 virtual String name() const = 0;
17 virtual String icon() const { return String(); }
18 virtual TranslatedString title() const { return TranslatedString(); }
19 virtual TranslatedString description() const { return TranslatedString(); }
21 virtual bool setupModel(Model&) { return false; };
23 virtual Dataset* child(const String&) { return nullptr; };
24 virtual uint04 childCount() const { return 0; };
25 };
26
27 /**--------------------------------------------------------------------------------------------------
28 \brief Used to group datasets (DEPRECIATED)
29 *-----------------------------------------------------------------------------------------------**/
31 {
32 public:
33 void addSource(Dataset* source)
34 {
35 m_sources.add(source->name(), source);
36 };
37 Dataset* source(const String& name)
38 {
39 auto iter = m_sources.find(name);
40 if(iter != m_sources.end())
41 return iter.value();
42 return nullptr;
43 };
44 bool hasSource(const String& name) const
45 {
46 return m_sources.hasKey(name);
47 }
50 };
51
52
53 constexpr const char* ZIP_CODE_DATASET = "Zip Codes";
54 constexpr const char* US_STATE_DATASET = "US States";
55}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:77
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:52
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
A dataset is a basic grouping of data (DEPRECIATED)
Definition DatasetManager.h:13
virtual TranslatedString title() const
Definition DatasetManager.h:18
virtual Buffer< Dataset * > children()
Definition DatasetManager.h:22
virtual bool setupModel(Model &)
Definition DatasetManager.h:21
virtual String icon() const
Definition DatasetManager.h:17
virtual Bounds< 3, fltp08 > bounds() const
Definition DatasetManager.h:20
virtual ~Dataset()
Definition DatasetManager.h:15
virtual Dataset * child(const String &)
Definition DatasetManager.h:23
virtual TranslatedString description() const
Definition DatasetManager.h:19
virtual uint04 childCount() const
Definition DatasetManager.h:24
virtual String name() const =0
Used to group datasets (DEPRECIATED)
Definition DatasetManager.h:31
static DatasetManager & DefaultManager()
Dataset * source(const String &name)
Definition DatasetManager.h:37
void addSource(Dataset *source)
Definition DatasetManager.h:33
bool hasSource(const String &name) const
Definition DatasetManager.h:44
Dictionary< String, Dataset * > m_sources
Definition DatasetManager.h:49
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:59
A core class that represents a node on model heirarchy. This node may contain a Geometry or.
Definition Model.h:58
The core String class for the software.
Definition String.h:47
Any text displayed to the user should be defined as a TranslatedString which allows the.
Definition TranslatedString.h:13
Definition ACIColor.h:37
constexpr const char * ZIP_CODE_DATASET
Definition DatasetManager.h:53
constexpr const char * US_STATE_DATASET
Definition DatasetManager.h:54
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:94
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved.
Definition BaseValues.hpp:230