Qore Programming Language Reference Manual: lib/ql_misc.dox.h Source File

Qore Programming Language Reference Manual 0.8.11

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
ql_misc.dox.h
1
3 namespace Qore {
8
10
27 nothing remove_signal_handler(softint signal);
28
30
50 nothing set_signal_handler(softint signal, code f);
51
53 };
54
56 namespace Qore {
61
63
85 string backquote(string cmd, *reference rc);
86
88
95 nothing backquote();
96
98
115 any call_builtin_function(string name, ...);
116
118
135 any call_builtin_function_args(string name, *softlist vargs);
136
138
153 any call_function(string name, ...);
154
156
166 any call_function(code f, ...);
167
169
184 any call_function_args(string name, *softlist vargs);
185
187
197 any call_function_args(code f, *softlist vargs);
198
200
216 string decode_url(string url);
217
219
223 nothing decode_url();
224
226
243 string encode_url(string url, softbool encode_all = False);
244
246
258 bool exists( ...);
259
261
273 bool existsFunction(string name);
274
276
285 bool existsFunction(code c);
286
288
292 nothing existsFunction();
293
295
303 *string functionType(string name);
304
306
310 nothing functionType();
311
313
331 *int getByte(string str, softint offset = 0);
332
334
338 nothing getByte();
339
341
359 *int getByte(binary b, softint offset = 0);
360
362
370 string getClassName(object obj);
371
373
377 nothing getClassName();
378
380
390 list getFeatureList();
391
393
414 hash getModuleHash();
415
417
438 list getModuleList();
439
441
460 *int getWord32(string str, softint offset = 0);
461
463
482 *int getWord32(binary b, softint offset = 0);
483
485
489 nothing getWord32();
490
492
508 *int get_byte(string str, softint offset = 0);
509
511
527 *int get_byte(binary b, softint offset = 0);
528
530
537 string get_default_encoding();
538
540
559 string get_ex_pos(hash ex);
560
562
574 int get_parse_options();
575
577
599 hash get_qore_library_info();
600
602
620 hash get_qore_option_hash();
621
623
639 list get_qore_option_list();
640
642
649 *string get_script_dir();
650
652
659 *string get_script_name();
660
662
669 *string get_script_path();
670
672
689 *int get_word_16(string str, softint offset = 0);
690
692
709 *int get_word_16(binary b, softint offset = 0);
710
712
729 *int get_word_16_lsb(string str, softint offset = 0);
730
732
749 *int get_word_16_lsb(binary b, softint offset = 0);
750
752
771 *int get_word_32(string str, softint offset = 0);
772
774
793 *int get_word_32(binary b, softint offset = 0);
794
796
815 *int get_word_32_lsb(string str, softint offset = 0);
816
818
835 *int get_word_32_lsb(binary b, softint offset = 0);
836
838
855 *int get_word_64(string str, softint offset = 0);
856
858
875 *int get_word_64(binary b, softint offset = 0);
876
878
895 *int get_word_64_lsb(string str, softint offset = 0);
896
898
915 *int get_word_64_lsb(binary b, softint offset = 0);
916
918
930 bool has_key(hash h, string key);
931
933
942 bool has_key(object obj, string key);
943
945
961 list hash_values(hash h);
962
964
968 nothing hash_values();
969
971
982 int hextoint(string str);
983
985
989 nothing hextoint();
990
992
1004 string html_decode(string str);
1005
1007
1011 nothing html_decode();
1012
1014
1026 string html_encode(string str);
1027
1029
1033 nothing html_encode();
1034
1036
1056 nothing load_module(string name);
1057
1059
1066 nothing load_module();
1067
1069
1090 string makeBase64String(string str, softint maxlinelen = -1);
1091
1093
1114 string makeBase64String(binary bin, softint maxlinelen = -1);
1115
1117
1121 nothing makeBase64String();
1122
1124
1141 string makeHexString(string str);
1142
1144
1158 string makeHexString(binary bin);
1159
1161
1165 nothing makeHexString();
1166
1168
1193 *hash parse(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label = True);
1194
1196
1203 nothing parse();
1204
1206
1221 binary parseBase64String(string str);
1222
1224
1228 nothing parseBase64String();
1229
1231
1249 string parseBase64StringToString(string str, *string encoding);
1250
1252
1256 nothing parseBase64StringToString();
1257
1259
1273 binary parseHexString(string hexstr);
1274
1276
1280 nothing parseHexString();
1281
1283
1303 *hash parseURL(string url, bool keep_brackets = False);
1304
1306
1310 nothing parseURL();
1311
1313
1335 hash parse_url(string url, bool keep_brackets = False);
1336
1338
1347 string splice(string str);
1348
1350
1364 string splice(string str, softint start);
1365
1367
1383 string splice(string str, softint start, softint len, *string nstr);
1384
1386
1398 list splice(list l, softint start);
1399
1401
1417 list splice(list l, softint start, softint len, *softlist nlist);
1418
1420
1424 nothing splice();
1425
1427
1439 int strtoint(string num, softint base = 10);
1440
1442
1446 nothing strtoint();
1447
1449 };
1450
1452 namespace Qore {
1457
1459 const NameToSignal = (
1460 "SIGABRT": SIGABRT,
1461 "SIGALRM": SIGALRM,
1462 "SIGBUS": SIGBUS,
1463 "SIGCANCEL": SIGCANCEL,
1464 "SIGCHLD": SIGCHLD,
1465 "SIGCLD": SIGCLD,
1466 "SIGCONT": SIGCONT,
1467 "SIGEMT": SIGEMT,
1468 "SIGFPE": SIGFPE,
1469 "SIGFREEZE": SIGFREEZE,
1470 "SIGHUP": SIGHUP,
1471 "SIGILL": SIGILL,
1472 "SIGINFO": SIGINFO,
1473 "SIGINT": SIGINT,
1474 "SIGIO": SIGIO,
1475 "SIGIOT": SIGIOT,
1476 "SIGJVM1": SIGJVM1,
1477 "SIGJVM2": SIGJVM2,
1478 "SIGKILL": SIGKILL,
1479 "SIGLOST": SIGLOST,
1480 "SIGLWP": SIGLWP,
1481 "SIGPIPE": SIGPIPE,
1482 "SIGPOLL": SIGPOLL,
1483 "SIGPROF": SIGPROF,
1484 "SIGPWR": SIGPWR,
1485 "SIGQUIT": SIGQUIT,
1486 "SIGSEGV": SIGSEGV,
1487 "SIGSTKFLT": SIGSTKFLT,
1488 "SIGSTOP": SIGSTOP,
1489 "SIGSYS": SIGSYS,
1490 "SIGTERM": SIGTERM,
1491 "SIGTHAW": SIGTHAW,
1492 "SIGTRAP": SIGTRAP,
1493 "SIGTSTP": SIGTSTP,
1494 "SIGTTIN": SIGTTIN,
1495 "SIGTTOU": SIGTTOU,
1496 "SIGURG": SIGURG,
1497 "SIGUSR1": SIGUSR1,
1498 "SIGUSR2": SIGUSR2,
1499 "SIGVTALRM": SIGVTALRM,
1500 "SIGWAITING": SIGWAITING,
1501 "SIGWINCH": SIGWINCH,
1502 "SIGXCPU": SIGXCPU,
1503 "SIGXFSZ": SIGXFSZ,
1504 "SIGXRES": SIGXRES,
1505 );
1507 const SIGABRT = SIGABRT;
1509 const SIGALRM = SIGALRM;
1511 const SIGBUS = SIGBUS;
1513 const SIGCANCEL = SIGCANCEL;
1515 const SIGCHLD = SIGCHLD;
1517 const SIGCLD = SIGCLD;
1519 const SIGCONT = SIGCONT;
1521 const SIGEMT = SIGEMT;
1523 const SIGFPE = SIGFPE;
1525 const SIGFREEZE = SIGFREEZE;
1527 const SIGHUP = SIGHUP;
1529 const SIGILL = SIGILL;
1531 const SIGINFO = SIGINFO;
1533 const SIGINT = SIGINT;
1535 const SIGIO = SIGIO;
1537 const SIGIOT = SIGIOT;
1539 const SIGJVM1 = SIGJVM1;
1541 const SIGJVM2 = SIGJVM2;
1543 const SIGKILL = SIGKILL;
1545 const SIGLOST = SIGLOST;
1547 const SIGLWP = SIGLWP;
1549 const SIGPIPE = SIGPIPE;
1551 const SIGPOLL = SIGPOLL;
1553 const SIGPROF = SIGPROF;
1555 const SIGPWR = SIGPWR;
1557 const SIGQUIT = SIGQUIT;
1559 const SIGSEGV = SIGSEGV;
1561 const SIGSTKFLT = SIGSTKFLT;
1563 const SIGSTOP = SIGSTOP;
1565 const SIGSYS = SIGSYS;
1567 const SIGTERM = SIGTERM;
1569 const SIGTHAW = SIGTHAW;
1571 const SIGTRAP = SIGTRAP;
1573 const SIGTSTP = SIGTSTP;
1575 const SIGTTIN = SIGTTIN;
1577 const SIGTTOU = SIGTTOU;
1579 const SIGURG = SIGURG;
1581 const SIGUSR1 = SIGUSR1;
1583 const SIGUSR2 = SIGUSR2;
1585 const SIGVTALRM = SIGVTALRM;
1587 const SIGWAITING = SIGWAITING;
1589 const SIGWINCH = SIGWINCH;
1591 const SIGXCPU = SIGXCPU;
1593 const SIGXFSZ = SIGXFSZ;
1595 const SIGXRES = SIGXRES;
1597 const SignalToName = (
1598 SIGABRT: "SIGABRT",
1599 SIGALRM: "SIGALRM",
1600 SIGBUS: "SIGBUS",
1601 SIGCANCEL: "SIGCANCEL",
1602 SIGCHLD: "SIGCHLD",
1603 SIGCONT: "SIGCONT",
1604 SIGEMT: "SIGEMT",
1605 SIGFPE: "SIGFPE",
1606 SIGFREEZE: "SIGFREEZE",
1607 SIGHUP: "SIGHUP",
1608 SIGILL: "SIGILL",
1609 SIGINFO: "SIGINFO",
1610 SIGINT: "SIGINT",
1611 SIGIO: "SIGIO",
1612 SIGIOT: "SIGIOT",
1613 SIGJVM1: "SIGJVM1",
1614 SIGJVM2: "SIGJVM2",
1615 SIGKILL: "SIGKILL",
1616 SIGLOST: "SIGLOST",
1617 SIGLWP: "SIGLWP",
1618 SIGPIPE: "SIGPIPE",
1619 SIGPOLL: "SIGPOLL",
1620 SIGPROF: "SIGPROF",
1621 SIGPWR: "SIGPWR",
1622 SIGQUIT: "SIGQUIT",
1623 SIGSEGV: "SIGSEGV",
1624 SIGSTKSZ: "SIGSTKSZ",
1625 SIGSTOP: "SIGSTOP",
1626 SIGSYS: "SIGSYS",
1627 SIGTERM: "SIGTERM",
1628 SIGTHAW: "SIGTHAW",
1629 SIGTRAP: "SIGTRAP",
1630 SIGTSTP: "SIGTSTP",
1631 SIGTTIN: "SIGTTIN",
1632 SIGTTOU: "SIGTTOU",
1633 SIGURG: "SIGURG",
1634 SIGUSR1: "SIGUSR1",
1635 SIGUSR2: "SIGUSR2",
1636 SIGVTALRM: "SIGVTALRM",
1637 SIGWAITING: "SIGWAITING",
1638 SIGWINCH: "SIGWINCH",
1639 SIGXCPU: "SIGXCPU",
1640 SIGXFSZ: "SIGXFSZ",
1641 SIGXRES: "SIGXRES",
1642 );
1644 };
Qore::SIGKILL
const SIGKILL
SIGKILL.
Definition: ql_misc.dox.h:1543
Qore::get_word_32_lsb
*int get_word_32_lsb(string str, softint offset=0)
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHI...
Qore::get_default_encoding
string get_default_encoding()
Returns the name of the default character encoding.
Qore::SIGSYS
const SIGSYS
SIGSYS.
Definition: ql_misc.dox.h:1565
Qore::SIGINFO
const SIGINFO
SIGINFO.
Definition: ql_misc.dox.h:1531
Qore::get_script_name
*string get_script_name()
Returns the filename of the current script if known or NOTHING if unknown (i.e. no parent script...
Qore::decode_url
string decode_url(string url)
Decodes percent numeric codes in a URL string and returns the decoded string in UTF-8 encoding...
Qore::parseHexString
binary parseHexString(string hexstr)
Parses a hex-encoded string and returns the binary object.
Qore::SIGURG
const SIGURG
SIGURG.
Definition: ql_misc.dox.h:1579
Qore::get_qore_option_hash
hash get_qore_option_hash()
Returns a hash of hashes giving information about Qore library options for the current build...
Qore::call_function
any call_function(string name,...)
Calls a function and returns the return value, passing the remaining arguments after the function nam...
Qore::set_signal_handler
nothing set_signal_handler(softint signal, code f)
Sets or replaces a signal handler according to the signal number and closure or call reference (funct...
Qore::SIGPROF
const SIGPROF
SIGPROF.
Definition: ql_misc.dox.h:1553
Qore::SIGSTKFLT
const SIGSTKFLT
SIGSTKFLT.
Definition: ql_misc.dox.h:1561
Qore::parse
*hash parse(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label=True)
Adds the text passed to the current program's code, tagged with the given label.
Qore::SIGBUS
const SIGBUS
SIGBUS.
Definition: ql_misc.dox.h:1511
Qore::get_script_path
*string get_script_path()
Returns the path (directory and filename) of the current script or NOTHING if unknown (i...
Qore::SIGTTOU
const SIGTTOU
SIGTTOU.
Definition: ql_misc.dox.h:1577
Qore::SIGQUIT
const SIGQUIT
SIGQUIT.
Definition: ql_misc.dox.h:1557
Qore::get_word_32
*int get_word_32(string str, softint offset=0)
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHI...
Qore::SIGWINCH
const SIGWINCH
SIGWINCH.
Definition: ql_misc.dox.h:1589
Qore::SIGPWR
const SIGPWR
SIGPWR.
Definition: ql_misc.dox.h:1555
Qore::True
const True
logical True
Definition: qc_qore.dox.h:94
Qore::SIGIO
const SIGIO
SIGIO.
Definition: ql_misc.dox.h:1535
Qore::SIGCLD
const SIGCLD
SIGCLD.
Definition: ql_misc.dox.h:1517
Qore::SIGUSR2
const SIGUSR2
SIGUSR2.
Definition: ql_misc.dox.h:1583
Qore::get_byte
*int get_byte(string str, softint offset=0)
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the of...
Qore::SIGVTALRM
const SIGVTALRM
SIGVTALRM.
Definition: ql_misc.dox.h:1585
Qore::parseURL
*hash parseURL(string url, bool keep_brackets=False)
Parses a URL string and returns a hash of the components; if the URL cannot be parsed then NOTHING is...
Qore::call_builtin_function
any call_builtin_function(string name,...)
Calls a function and returns the return value, passing the remaining arguments after the function nam...
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
Qore::SIGSTOP
const SIGSTOP
SIGSTOP.
Definition: ql_misc.dox.h:1563
Qore::SIGTERM
const SIGTERM
SIGTERM.
Definition: ql_misc.dox.h:1567
Qore::SIGALRM
const SIGALRM
SIGALRM.
Definition: ql_misc.dox.h:1509
Qore::get_word_16
*int get_word_16(string str, softint offset=0)
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHI...
Qore::parseBase64StringToString
string parseBase64StringToString(string str, *string encoding)
Parses a base64 encoded string and returns a string of the decoded data.
Qore::SIGTRAP
const SIGTRAP
SIGTRAP.
Definition: ql_misc.dox.h:1571
Qore::False
const False
logical False
Definition: qc_qore.dox.h:92
Qore::SIGCONT
const SIGCONT
SIGCONT.
Definition: ql_misc.dox.h:1519
Qore::list
list list(...)
Returns a list of the arguments passed at the top level.
Qore::load_module
nothing load_module(string name)
Loads in a Qore module at run-time.
Qore::SIGLWP
const SIGLWP
SIGLWP.
Definition: ql_misc.dox.h:1547
Qore::SIGTTIN
const SIGTTIN
SIGTTIN.
Definition: ql_misc.dox.h:1575
Qore::html_decode
string html_decode(string str)
Returns a string with any HTML escape codes translated to the original characters.
Qore::hextoint
int hextoint(string str)
Returns an integer for a hexadecimal string value; throws an exception if non-hex digits are found...
Qore::get_script_dir
*string get_script_dir()
Returns the name of the directory from which the current script was executed or NOTHING if unknown (i...
Qore::remove_signal_handler
nothing remove_signal_handler(softint signal)
Removes a signal handler and returns the signal handling state to the default.
Qore::SIGJVM2
const SIGJVM2
SIGJVM2.
Definition: ql_misc.dox.h:1541
Qore::SIGCHLD
const SIGCHLD
SIGCHLD.
Definition: ql_misc.dox.h:1515
Qore::hash_values
list hash_values(hash h)
Returns a list of all the values in the hash argument passed.
Qore::getByte
*int getByte(string str, softint offset=0)
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the of...
Qore::SIGSEGV
const SIGSEGV
SIGSEGV.
Definition: ql_misc.dox.h:1559
Qore::exists
bool exists(...)
A function performing the same role as the exists operator.
Qore::get_parse_options
int get_parse_options()
returns the current parse options for the current Program object
Qore::SIGEMT
const SIGEMT
SIGEMT.
Definition: ql_misc.dox.h:1521
Qore::getFeatureList
list getFeatureList()
Returns a list of strings of the builtin and module-supplied features of Qore.
Qore::SIGABRT
const SIGABRT
SIGABRT.
Definition: ql_misc.dox.h:1507
Qore::splice
string splice(string str)
This function always returns an empty string "".
Qore::SignalToName
const SignalToName
maps signal numbers (as a string key) to the symbolic name for the signal
Definition: ql_misc.dox.h:1597
Qore::functionType
*string functionType(string name)
Returns "builtin" (for a builtin function), "user" (for a user function), or NOTHING (if the function...
Qore::SIGFREEZE
const SIGFREEZE
SIGFREEZE.
Definition: ql_misc.dox.h:1525
Qore::getWord32
*int getWord32(string str, softint offset=0)
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHI...
Qore::getClassName
string getClassName(object obj)
Returns the class name of the object passed.
Qore::SIGPOLL
const SIGPOLL
SIGPOLL.
Definition: ql_misc.dox.h:1551
Qore::SIGXCPU
const SIGXCPU
SIGXCPU.
Definition: ql_misc.dox.h:1591
Qore::html_encode
string html_encode(string str)
Returns a string with characters needing HTML escaping translated to HTML escape codes.
Qore::SIGHUP
const SIGHUP
SIGHUP.
Definition: ql_misc.dox.h:1527
Qore::SIGILL
const SIGILL
SIGILL.
Definition: ql_misc.dox.h:1529
Qore::makeHexString
string makeHexString(string str)
Returns a hex-encoded representation of a string.
Qore::parseBase64String
binary parseBase64String(string str)
Parses a base64 encoded string and returns a binary object of the decoded data.
Qore::parse_url
hash parse_url(string url, bool keep_brackets=False)
Parses a URL string and returns a hash of the components; throws an exception if the string cannot be...
Qore::SIGJVM1
const SIGJVM1
SIGJVM1.
Definition: ql_misc.dox.h:1539
Qore::SIGTSTP
const SIGTSTP
SIGTSTP.
Definition: ql_misc.dox.h:1573
Qore::call_builtin_function_args
any call_builtin_function_args(string name, *softlist vargs)
Calls a function and returns the return value, using the optional second argument as a list of argume...
Qore::SIGFPE
const SIGFPE
SIGFPE.
Definition: ql_misc.dox.h:1523
Qore::get_word_64_lsb
*int get_word_64_lsb(string str, softint offset=0)
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHI...
Qore::SIGUSR1
const SIGUSR1
SIGUSR1.
Definition: ql_misc.dox.h:1581
Qore::strtoint
int strtoint(string num, softint base=10)
parses a string representing a number in a configurable base and returns the integer ...
Qore::SIGWAITING
const SIGWAITING
SIGWAITING.
Definition: ql_misc.dox.h:1587
Qore::call_function_args
any call_function_args(string name, *softlist vargs)
Calls a function and returns the return value, using the optional second argument as a list of argume...
Qore::existsFunction
bool existsFunction(string name)
Returns True if the function exists in the current program's function name space. ...
Qore::backquote
string backquote(string cmd, *reference rc)
Executes a process and returns a string of the output (stdout only)
Qore::encode_url
string encode_url(string url, softbool encode_all=False)
Encodes URLs by substituting '%' characters with '%25', spaces (' ') with '%20', and non-ascii charac...
Qore::SIGINT
const SIGINT
SIGINT.
Definition: ql_misc.dox.h:1533
Qore::get_word_16_lsb
*int get_word_16_lsb(string str, softint offset=0)
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHI...
Qore::get_qore_option_list
list get_qore_option_list()
Returns a list of hashes giving information about Qore library options for the current build...
Qore::NameToSignal
const NameToSignal
maps signal names to signal values
Definition: ql_misc.dox.h:1459
Qore::SIGXFSZ
const SIGXFSZ
SIGXFSZ.
Definition: ql_misc.dox.h:1593
Qore::get_ex_pos
string get_ex_pos(hash ex)
returns a descriptive string for an exception location; the source and offset information will also b...
Qore::getModuleList
list getModuleList()
Returns a list of hashes describing the currently-loaded Qore modules.
Qore::hash
hash hash(object obj)
Returns a hash of an object's members.
Qore::SIGIOT
const SIGIOT
SIGIOT.
Definition: ql_misc.dox.h:1537
Qore::makeBase64String
string makeBase64String(string str, softint maxlinelen=-1)
Returns a base64-encoded representation of a string.
Qore::get_word_64
*int get_word_64(string str, softint offset=0)
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHI...
Qore::has_key
bool has_key(hash h, string key)
Returns True if the given key exists in the hash (does not necessarily have to have a value assigned)...
Qore::SIGPIPE
const SIGPIPE
SIGPIPE.
Definition: ql_misc.dox.h:1549
Qore::SIGCANCEL
const SIGCANCEL
SIGCANCEL.
Definition: ql_misc.dox.h:1513
Qore::getModuleHash
hash getModuleHash()
Returns a hash of hashes describing the currently-loaded Qore modules; the top-level hash keys are th...
Qore::get_qore_library_info
hash get_qore_library_info()
Returns a hash of library build and version info.
Qore::SIGXRES
const SIGXRES
SIGXRES.
Definition: ql_misc.dox.h:1595
Qore::SIGTHAW
const SIGTHAW
SIGTHAW.
Definition: ql_misc.dox.h:1569
Qore::SIGLOST
const SIGLOST
SIGLOST.
Definition: ql_misc.dox.h:1545