All Classes Namespaces Functions Variables Groups Pages
Qorize.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// @file Mime.qm Mime module definition
/* Mime.qm Copyright 2013 Qore Technologies s r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
/* Version History
* 2013-08-15 v 0.0.9: Petr Vanek <petr@yarpen.cz>
+ initial version
*/
namespace Qorize {
string qorize(bool val, string name = "var", bool newstyle=False);
string qorize(string val, string name = "var", bool newstyle=False);
string qorize(int val, string name = "var", bool newstyle=False);
string qorize(float val, string name = "var", bool newstyle=False);
string qorize(number val, string name = "var", bool newstyle=False);
string qorize(date val, string name = "var", bool newstyle=False);
string qorize(binary val, string name = "var", bool newstyle=False);
string qorize(list val, string name = "var", bool newstyle=False);
string qorize(hash val, string name = "var", bool newstyle=False);
string qorizeNamed(hash val, string name = "var", bool newstyle=False);
string qorize(any val, string name = "var", bool newstyle=False);
// a helper class holding all logic
class QorizeHelper {
public:
private :
any container;
int type;
string code;
int level = 1;
list inlineLevel = ();
bool newstyle;
public:
static string checkVariableName(string name, any val, bool newstyle);
static string escape(bool val);
static string escape(string val);
static string escape(int val);
static string escape(float val);
static string escape(number val);
static string escape(date val);
static string escape(binary val);
static string escape(any val);
constructor(any container, bool newstyle);
string list();
string hash();
string hashNamed(string name);
private processNamed(hash node, string name);
private process(list val);
private process(hash val);
private process(binary val);
private process(string val);
private process(bool val);
private process(date val);
private process(int val);
private process(float val);
private process(any val);
}; // class QorizeHelper
}; // namespace Qorize
date
date date(date dt)
number
number number(softnumber n)
binary
binary binary()
False
const False
list
list list(...)
Qorize::qorizeNamed
string qorizeNamed(hash val, string name="var", bool newstyle=False)
create code from the hash value - with one value per one line
Qorize::qorize
string qorize(bool val, string name="var", bool newstyle=False)
create code from the boolean value
type
string type(any arg)
hash
hash hash(object obj)