Qore Qorize Module Reference 0.0.9

- Main Page
- Modules
- Namespaces

All Classes Namespaces Functions Variables Groups Pages
Qorize.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
2 // @file Mime.qm Mime module definition
3
4 /* Mime.qm Copyright 2013 Qore Technologies s r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24
25
26
27 /* Version History
28
29 * 2013-08-15 v 0.0.9: Petr Vanek <petr@yarpen.cz>
30 + initial version
31
32 */
33
34
64
65 namespace Qorize {
66
67
71
73
88 string qorize(bool val, string name = "var", bool newstyle=False);
89
90
92
107 string qorize(string val, string name = "var", bool newstyle=False);
108
109
111
126 string qorize(int val, string name = "var", bool newstyle=False);
127
128
130
145 string qorize(float val, string name = "var", bool newstyle=False);
146
147
149
164 string qorize(number val, string name = "var", bool newstyle=False);
165
166
168
190 string qorize(date val, string name = "var", bool newstyle=False);
191
192
194
212 string qorize(binary val, string name = "var", bool newstyle=False);
213
214
216
236 string qorize(list val, string name = "var", bool newstyle=False);
237
238
240
286 string qorize(hash val, string name = "var", bool newstyle=False);
287
288
290
324 string qorizeNamed(hash val, string name = "var", bool newstyle=False);
325
326
328
343 string qorize(any val, string name = "var", bool newstyle=False);
344
346
347
348 // a helper class holding all logic
349 class QorizeHelper {
350
351 public:
352
353 private :
354 any container;
355 int type;
356 string code;
357 int level = 1;
358 list inlineLevel = ();
359 bool newstyle;
360
361 public:
362
363 static string checkVariableName(string name, any val, bool newstyle);
364
365 static string escape(bool val);
366
367 static string escape(string val);
368
369 static string escape(int val);
370
371 static string escape(float val);
372
373 static string escape(number val);
374
375 static string escape(date val);
376
377 static string escape(binary val);
378
379 static string escape(any val);
380
381 constructor(any container, bool newstyle);
382
383
384 string list();
385
386
387 string hash();
388
389
390 string hashNamed(string name);
391
392
393
394 private:
395 processNamed(hash node, string name);
396 public:
397
398
399
400 private:
401 process(list val);
402 public:
403
404
405
406 private:
407 process(hash val);
408 public:
409
410
411
412 private:
413 process(binary val);
414 public:
415
416
417
418 private:
419 process(string val);
420 public:
421
422
423
424 private:
425 process(bool val);
426 public:
427
428
429
430 private:
431 process(date val);
432 public:
433
434
435
436 private:
437 process(int val);
438 public:
439
440
441
442 private:
443 process(float val);
444 public:
445
446
447
448 private:
449 process(any val);
450 public:
451
452
453 }; // class QorizeHelper
454
455 }; // namespace Qorize
456