Portability Libraries  2015.2.0.0
Common Methods and Objects for Platform Independance.
ValueURI.hpp
Go to the documentation of this file.
1 //
2 // BEGIN_DOUGLAS_MARK_ROYER_COPYRIGHT
3 //
4 // Copyright (C) 2015-2016 Douglas Mark Royer, All Rights Reserved.
5 //
6 // NOTICE:
7 //
8 // THIS SOURCE CODE BELONGS TO DOUGLAS MARK ROYER THIS CODE IS CONSIDERED A
9 // TRADE SECRET AND IS NOT TO BE DIVULGED OR USED BY PARTIES WHO HAVE
10 // NOT RECEIVED WRITTEN AUTHORIZATION FROM THE OWNER.
11 //
12 // THIS SOFTWARE AND MANUAL ARE BOTH PROTECTED BY UNITED STATES
13 // COPYRIGHT LAW (TITLE 17 UNITED STATES CODE). UNAUTHORIZED REPRODUCTION
14 // AND/OR SALE MAY RESULT IN IMPRISONMENT OF UP TO ONE YEAR AND FINES
15 // OF UP TO $100,000 (17 USC 506). COPYRIGHT INFRINGERS MAY ALSO
16 // BE SUBJECT TO CIVIL LIABILITY.
17 //
18 // THIS NOTICE AND THE ABOVE COPYRIGHT NOTICE MUST REMAIN IN ALL
19 // COPIES AND ANY DERIVED WORK.
20 //
21 // ALL OF THIS CODE IS ORIGINAL WORK BY THE COPYRIGHT HOLDER.
22 //
23 // THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN IS
24 // PROVIDED ON AN "AS IS" BASIS AND DOUGLAS MARK ROYER
25 // DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
26 // NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
27 // HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
28 // WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
29 // PURPOSE.
30 //
31 // END_DOUGLAS_MARK_ROYER_COPYRIGHT//
32 
33 #ifndef _DOUGLAS_MARK_ROYER_LIBRARY_MATHML_VALUE_URI_HPP_
34 #define _DOUGLAS_MARK_ROYER_LIBRARY_MATHML_VALUE_URI_HPP_
35 
36 #ifdef WIN32
37 #ifdef BUILDING_LIBSASMATHML
38 #ifdef EXPORT_LIBSASMATHML
39 #undef EXPORT_LIBSASMATHML
40 #endif //EXPORT_LIBSASMATHML
41 #define EXPORT_LIBSASMATHML EXPORT_OUT
42 #else // !BUILDING_LIBSASMATHML
43 #define EXPORT_LIBSASMATHML EXPORT_IN
44 #endif // BUILDING_LIBSASMATHML
45 #else // !WIN32
46 #define EXPORT_LIBSASMATHML
47 #endif // WIN32
48 
49 #include <SaS/RfcBasic/Uri.hpp>
50 
52 namespace SoftwareAndServices
53 {
54  namespace Library
55  {
56  namespace Math
57  {
58 
59  /**
60  * Any URI Value.
61  */
62  class ValueURI
63  {
64 
65  public:
66 
67  /**
68  * ValueURI - Default Constructor.
69  */
70  ValueURI();
71 
72  /**
73  * ValueURI - Constructor.
74  *
75  * @param TheValue The value ("true" or "false").
76  */
77  ValueURI(const char * TheValue);
78 
79  /**
80  * ValueURI - Constructor.
81  *
82  * @param TheValue The value ("true" or "false").
83  */
84  ValueURI(const String & TheValue);
85 
86  /**
87  * ValueURI - Constructor.
88  *
89  * @param TheValue The value ("true" or "false").
90  */
91  ValueURI(const std::string & TheValue);
92 
93  /**
94  * ValueURI - Destructor.
95  */
96  virtual ~ValueURI();
97 
98  /**
99  * Get the value.
100  *
101  * @param[OUT] TheValue Where to put the value.
102  *
103  * @return true when the value was set and TheValue updated.
104  */
105  bool GetValue(Uri * & TheValue) const;
106 
107  /**
108  * Get the value.
109  *
110  * @param[OUT] TheValue Where to put the value.
111  *
112  * @return true when the value was set and TheValue updated.
113  */
114  bool GetValue(const char * & TheValue) const;
115 
116  /**
117  * Set the value.
118  *
119  * @param TheValue The value to use.
120  *
121  * @return true when the value was set.
122  */
123  bool SetValue(const Uri & TheValue);
124 
125  /**
126  * Set the value.
127  *
128  * @param TheValue The value to use.
129  *
130  * @return true when the value was set.
131  */
132  bool SetValue(const char * TheValue);
133 
134  /**
135  * Set the value.
136  *
137  * @param TheValue The value to use.
138  *
139  * @return true when the value was set.
140  */
141  bool SetValue(const String & TheValue);
142 
143  /**
144  * Set the value.
145  *
146  * @param TheValue The value to use.
147  *
148  * @return true when the value was set.
149  */
150  bool SetValue(const std::string & TheValue);
151 
152  private:
153 
154  /**
155  * Value.
156  */
157  Uri * _Value;
158  };
159 
160  }
161  }
162 }
163 
164 #endif // _DOUGLAS_MARK_ROYER_LIBRARY_MATHML_VALUE_URI_HPP_