Nebula
Loading...
Searching...
No Matches
assign.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
13#include "util/keyvaluepair.h"
14
15//------------------------------------------------------------------------------
16namespace IO
17{
18class Assign : public Util::KeyValuePair<Util::String, Util::String>
19{
20public:
22 Assign();
24 Assign(const Util::String& name, const Util::String& path);
26 const Util::String& GetName() const;
28 const Util::String& GetPath() const;
29};
30
31//------------------------------------------------------------------------------
34inline
36{
37 // empty
38}
39
40//------------------------------------------------------------------------------
43inline
44Assign::Assign(const Util::String& name, const Util::String& path) :
46{
47 n_assert(name.IsValid());
48 n_assert(path.IsValid());
49}
50
51//------------------------------------------------------------------------------
54inline
55const Util::String&
57{
58 n_assert(this->keyData.IsValid());
59 return this->keyData;
60}
61
62//------------------------------------------------------------------------------
65inline
66const Util::String&
68{
69 n_assert(this->valueData.IsValid());
70 return this->valueData;
71}
72
73} // namespace IO
74//------------------------------------------------------------------------------
An assign associates an intuitive name with a real-world filesystem path.
Definition assign.h:19
const Util::String & GetPath() const
get path of assign
Definition assign.h:67
const Util::String & GetName() const
get name of assign
Definition assign.h:56
Assign()
default constructor
Definition assign.h:35
Key/Value pair objects are used by most assiociative container classes, like Dictionary or HashTable.
Definition keyvaluepair.h:19
Util::String keyData
Definition keyvaluepair.h:66
Util::String valueData
Definition keyvaluepair.h:67
#define n_assert(exp)
Definition debug.h:50
Instances of wrapped stream classes.
Definition orientation.cc:10
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
Nebula's universal string class.
Definition string.h:50
bool IsValid() const
return true if string object is not empty
Definition string.h:682