Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
TokenValue.hpp
Go to the documentation of this file.
1 //
2 // BEGIN_DOUGLAS_MARK_ROYER_COPYRIGHT
3 //
4 // Copyright (C) 2012 Douglas Mark Royer, All Rights Reserved.
5 //
6 // NOTICE:
7 //
8 // THIS SOURCE CODE BELONGS TO DOUGLAS MARK ROYER
9 // THIS CODE IS CONSIDERED A TRADE SECRET AND IS NOT
10 // TO BE DIVULGED OR USED BY PARTIES WHO HAVE
11 // NOT RECEIVED WRITTEN AUTHORIZATION FROM THE OWNER.
12 //
13 //
14 // THIS SOFTWARE AND MANUAL ARE BOTH PROTECTED BY UNITED STATES
15 // COPYRIGHT LAW (TITLE 17 UNITED STATES CODE). UNAUTHORIZED REPRODUCTION
16 // AND/OR SALE MAY RESULT IN IMPRISONMENT OF UP TO ONE YEAR AND FINES
17 // OF UP TO $100,000 (17 USC 506). COPYRIGHT INFRINGERS MAY ALSO
18 // BE SUBJECT TO CIVIL LIABILITY.
19 //
20 // THIS NOTICE AND THE ABOVE COPYRIGHT NOTICE MUST REMAIN IN ALL
21 // COPIES AND ANY DERIVED WORK.
22 //
23 // ALL OF THIS CODE IS ORIGINAL WORK BY THE COPYRIGHT HOLDER.
24 //
25 // THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN IS
26 // PROVIDED ON AN "AS IS" BASIS AND INET-CONSULTING.COM, INC.
27 // DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
28 // NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
29 // HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
30 // WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
31 // PURPOSE. ANY SERVICE CONTRACT WILL BE UNDER A SEPARATE
32 // LICENSE.
33 //
34 // END_DOUGLAS_MARK_ROYER_COPYRIGHT
35 //
36 
37 #ifndef __DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_TOKENVALUE_HPP__
38 #define __DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_TOKENVALUE_HPP__
39 
40 #ifndef EXPORT_ICALENDAR
41 #ifdef BUILDING_LIBRARY_ICALENDAR
42 #define EXPORT_ICALENDAR EXPORT_OUT
43 #else
44 #define EXPORT_ICALENDAR EXPORT_IN
45 #endif
46 #endif
47 
55 #ifdef BUILDING_LIBRARY_ICALENDAR
56 #include "iCalendar.hpp"
57 #include "BaseValueType.hpp"
58 #else
59 #include <SaS/iCalendar/iCalendar.hpp>
60 #include <SaS/iCalendar/BaseValueType.hpp>
61 #endif
62 
63 using namespace std;
64 
66 
67 namespace SoftwareAndServices
68 {
69  namespace Library
70  {
71  namespace iCalendar
72  {
73 
78  class EXPORT_ICALENDAR TokenValue
79  : public BaseValueType
80  {
81 
82  public:
83 
87  TokenValue();
88 
94  TokenValue(const TokenValue * aValue);
95 
106  TokenValue(const char * aString, size_t Length = 0);
107 
115  TokenValue(String * aString);
116 
122  TokenValue(Tokens_t TheToken);
123 
127  virtual ~TokenValue();
128 
134  Tokens_t get() const;
135 
142  virtual bool sprint(String * Results) const;
143 
156  bool parse(Parse & in, component * errors);
157 
170  bool parse(const char * in, component * errors);
171 
178  TokenValue & operator=(const TokenValue & Other);
179 
187  bool operator==(const TokenValue & Other);
188 
189  private:
190 
194  Tokens_t _Value;
195  };
196 
200  typedef vector<TokenValue*> TokenValueVec;
201 
202  }
203  }
204 }
205 
206 
207 #endif /*__DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_TOKENVALUE_HPP__*/
STL namespace.
Copyright Douglas Mark Royer DouglasRoyer@gmail.com.
Definition: Base.hpp:98
The base class for calendar objects.
Definition: iCalendar.hpp:434
All (almost all) values are derived from this base class.
This class represents any iCalendar value that can be represented as a Tokens_t.
Definition: TokenValue.hpp:78
Base class for all RFC-iCalendar components.
Definition: component.hpp:98