Qore Programming Language Reference Manual 0.8.8

- 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
212 string decode_url(string url);
213
215
219 nothing decode_url();
220
222
234 bool exists( ...);
235
237
249 bool existsFunction(string name);
250
252
261 bool existsFunction(code c);
262
264
268 nothing existsFunction();
269
271
279 *string functionType(string name);
280
282
286 nothing functionType();
287
289
307 *int getByte(string str, softint offset = 0);
308
310
314 nothing getByte();
315
317
335 *int getByte(binary b, softint offset = 0);
336
338
346 string getClassName(object obj);
347
349
353 nothing getClassName();
354
356
366 list getFeatureList();
367
369
389 hash getModuleHash();
390
392
412 list getModuleList();
413
415
434 *int getWord32(string str, softint offset = 0);
435
437
456 *int getWord32(binary b, softint offset = 0);
457
459
463 nothing getWord32();
464
466
482 *int get_byte(string str, softint offset = 0);
483
485
501 *int get_byte(binary b, softint offset = 0);
502
504
511 string get_default_encoding();
512
514
533 string get_ex_pos(hash ex);
534
536
548 int get_parse_options();
549
551
573 hash get_qore_library_info();
574
576
594 hash get_qore_option_hash();
595
597
613 list get_qore_option_list();
614
616
623 *string get_script_dir();
624
626
633 *string get_script_name();
634
636
643 *string get_script_path();
644
646
663 *int get_word_16(string str, softint offset = 0);
664
666
683 *int get_word_16(binary b, softint offset = 0);
684
686
703 *int get_word_16_lsb(string str, softint offset = 0);
704
706
723 *int get_word_16_lsb(binary b, softint offset = 0);
724
726
745 *int get_word_32(string str, softint offset = 0);
746
748
767 *int get_word_32(binary b, softint offset = 0);
768
770
789 *int get_word_32_lsb(string str, softint offset = 0);
790
792
809 *int get_word_32_lsb(binary b, softint offset = 0);
810
812
829 *int get_word_64(string str, softint offset = 0);
830
832
849 *int get_word_64(binary b, softint offset = 0);
850
852
869 *int get_word_64_lsb(string str, softint offset = 0);
870
872
889 *int get_word_64_lsb(binary b, softint offset = 0);
890
892
904 bool has_key(hash h, string key);
905
907
916 bool has_key(object obj, string key);
917
919
935 list hash_values(hash h);
936
938
942 nothing hash_values();
943
945
956 int hextoint(string str);
957
959
963 nothing hextoint();
964
966
978 string html_decode(string str);
979
981
985 nothing html_decode();
986
988
1000 string html_encode(string str);
1001
1003
1007 nothing html_encode();
1008
1010
1030 nothing load_module(string name);
1031
1033
1040 nothing load_module();
1041
1043
1064 string makeBase64String(string str, softint maxlinelen = -1);
1065
1067
1088 string makeBase64String(binary bin, softint maxlinelen = -1);
1089
1091
1095 nothing makeBase64String();
1096
1098
1115 string makeHexString(string str);
1116
1118
1132 string makeHexString(binary bin);
1133
1135
1139 nothing makeHexString();
1140
1142
1167 *hash parse(string code, string label, *softint warning_mask, *string source, *softint offset, softbool format_label = True);
1168
1170
1177 nothing parse();
1178
1180
1195 binary parseBase64String(string str);
1196
1198
1202 nothing parseBase64String();
1203
1205
1223 string parseBase64StringToString(string str, *string encoding);
1224
1226
1230 nothing parseBase64StringToString();
1231
1233
1247 binary parseHexString(string hexstr);
1248
1250
1254 nothing parseHexString();
1255
1257
1275 *hash parseURL(string url, bool keep_brackets = False);
1276
1278
1282 nothing parseURL();
1283
1285
1305 hash parse_url(string url, bool keep_brackets = False);
1306
1308
1317 string splice(string str);
1318
1320
1334 string splice(string str, softint start);
1335
1337
1353 string splice(string str, softint start, softint len, *string nstr);
1354
1356
1368 list splice(list l, softint start);
1369
1371
1387 list splice(list l, softint start, softint len, *softlist nlist);
1388
1390
1394 nothing splice();
1395
1397
1409 int strtoint(string num, softint base = 10);
1410
1412
1416 nothing strtoint();
1417
1419 };
1420
1422 namespace Qore {
1427
1429 const NameToSignal = (
1430 "SIGABRT": SIGABRT,
1431 "SIGALRM": SIGALRM,
1432 "SIGBUS": SIGBUS,
1433 "SIGCANCEL": SIGCANCEL,
1434 "SIGCHLD": SIGCHLD,
1435 "SIGCLD": SIGCLD,
1436 "SIGCONT": SIGCONT,
1437 "SIGEMT": SIGEMT,
1438 "SIGFPE": SIGFPE,
1439 "SIGFREEZE": SIGFREEZE,
1440 "SIGHUP": SIGHUP,
1441 "SIGILL": SIGILL,
1442 "SIGINFO": SIGINFO,
1443 "SIGINT": SIGINT,
1444 "SIGIO": SIGIO,
1445 "SIGIOT": SIGIOT,
1446 "SIGJVM1": SIGJVM1,
1447 "SIGJVM2": SIGJVM2,
1448 "SIGKILL": SIGKILL,
1449 "SIGLOST": SIGLOST,
1450 "SIGLWP": SIGLWP,
1451 "SIGPIPE": SIGPIPE,
1452 "SIGPOLL": SIGPOLL,
1453 "SIGPROF": SIGPROF,
1454 "SIGPWR": SIGPWR,
1455 "SIGQUIT": SIGQUIT,
1456 "SIGSEGV": SIGSEGV,
1457 "SIGSTKFLT": SIGSTKFLT,
1458 "SIGSTOP": SIGSTOP,
1459 "SIGSYS": SIGSYS,
1460 "SIGTERM": SIGTERM,
1461 "SIGTHAW": SIGTHAW,
1462 "SIGTRAP": SIGTRAP,
1463 "SIGTSTP": SIGTSTP,
1464 "SIGTTIN": SIGTTIN,
1465 "SIGTTOU": SIGTTOU,
1466 "SIGURG": SIGURG,
1467 "SIGUSR1": SIGUSR1,
1468 "SIGUSR2": SIGUSR2,
1469 "SIGVTALRM": SIGVTALRM,
1470 "SIGWAITING": SIGWAITING,
1471 "SIGWINCH": SIGWINCH,
1472 "SIGXCPU": SIGXCPU,
1473 "SIGXFSZ": SIGXFSZ,
1474 "SIGXRES": SIGXRES,
1475 );
1477 const SIGABRT = SIGABRT;
1479 const SIGALRM = SIGALRM;
1481 const SIGBUS = SIGBUS;
1483 const SIGCANCEL = SIGCANCEL;
1485 const SIGCHLD = SIGCHLD;
1487 const SIGCLD = SIGCLD;
1489 const SIGCONT = SIGCONT;
1491 const SIGEMT = SIGEMT;
1493 const SIGFPE = SIGFPE;
1495 const SIGFREEZE = SIGFREEZE;
1497 const SIGHUP = SIGHUP;
1499 const SIGILL = SIGILL;
1501 const SIGINFO = SIGINFO;
1503 const SIGINT = SIGINT;
1505 const SIGIO = SIGIO;
1507 const SIGIOT = SIGIOT;
1509 const SIGJVM1 = SIGJVM1;
1511 const SIGJVM2 = SIGJVM2;
1513 const SIGKILL = SIGKILL;
1515 const SIGLOST = SIGLOST;
1517 const SIGLWP = SIGLWP;
1519 const SIGPIPE = SIGPIPE;
1521 const SIGPOLL = SIGPOLL;
1523 const SIGPROF = SIGPROF;
1525 const SIGPWR = SIGPWR;
1527 const SIGQUIT = SIGQUIT;
1529 const SIGSEGV = SIGSEGV;
1531 const SIGSTKFLT = SIGSTKFLT;
1533 const SIGSTOP = SIGSTOP;
1535 const SIGSYS = SIGSYS;
1537 const SIGTERM = SIGTERM;
1539 const SIGTHAW = SIGTHAW;
1541 const SIGTRAP = SIGTRAP;
1543 const SIGTSTP = SIGTSTP;
1545 const SIGTTIN = SIGTTIN;
1547 const SIGTTOU = SIGTTOU;
1549 const SIGURG = SIGURG;
1551 const SIGUSR1 = SIGUSR1;
1553 const SIGUSR2 = SIGUSR2;
1555 const SIGVTALRM = SIGVTALRM;
1557 const SIGWAITING = SIGWAITING;
1559 const SIGWINCH = SIGWINCH;
1561 const SIGXCPU = SIGXCPU;
1563 const SIGXFSZ = SIGXFSZ;
1565 const SIGXRES = SIGXRES;
1567 const SignalToName = (
1568 SIGABRT: "SIGABRT",
1569 SIGALRM: "SIGALRM",
1570 SIGBUS: "SIGBUS",
1571 SIGCANCEL: "SIGCANCEL",
1572 SIGCHLD: "SIGCHLD",
1573 SIGCONT: "SIGCONT",
1574 SIGEMT: "SIGEMT",
1575 SIGFPE: "SIGFPE",
1576 SIGFREEZE: "SIGFREEZE",
1577 SIGHUP: "SIGHUP",
1578 SIGILL: "SIGILL",
1579 SIGINFO: "SIGINFO",
1580 SIGINT: "SIGINT",
1581 SIGIO: "SIGIO",
1582 SIGIOT: "SIGIOT",
1583 SIGJVM1: "SIGJVM1",
1584 SIGJVM2: "SIGJVM2",
1585 SIGKILL: "SIGKILL",
1586 SIGLOST: "SIGLOST",
1587 SIGLWP: "SIGLWP",
1588 SIGPIPE: "SIGPIPE",
1589 SIGPOLL: "SIGPOLL",
1590 SIGPROF: "SIGPROF",
1591 SIGPWR: "SIGPWR",
1592 SIGQUIT: "SIGQUIT",
1593 SIGSEGV: "SIGSEGV",
1594 SIGSTKSZ: "SIGSTKSZ",
1595 SIGSTOP: "SIGSTOP",
1596 SIGSYS: "SIGSYS",
1597 SIGTERM: "SIGTERM",
1598 SIGTHAW: "SIGTHAW",
1599 SIGTRAP: "SIGTRAP",
1600 SIGTSTP: "SIGTSTP",
1601 SIGTTIN: "SIGTTIN",
1602 SIGTTOU: "SIGTTOU",
1603 SIGURG: "SIGURG",
1604 SIGUSR1: "SIGUSR1",
1605 SIGUSR2: "SIGUSR2",
1606 SIGVTALRM: "SIGVTALRM",
1607 SIGWAITING: "SIGWAITING",
1608 SIGWINCH: "SIGWINCH",
1609 SIGXCPU: "SIGXCPU",
1610 SIGXFSZ: "SIGXFSZ",
1611 SIGXRES: "SIGXRES",
1612 );
1614 };
Qore::SIGKILL
const SIGKILL
SIGKILL.
Definition: ql_misc.dox.h:1513
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:1535
Qore::SIGINFO
const SIGINFO
SIGINFO.
Definition: ql_misc.dox.h:1501
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.
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:1549
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:1523
Qore::SIGSTKFLT
const SIGSTKFLT
SIGSTKFLT.
Definition: ql_misc.dox.h:1531
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&#39;s code, tagged with the given label.
Qore::SIGBUS
const SIGBUS
SIGBUS.
Definition: ql_misc.dox.h:1481
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:1547
Qore::SIGQUIT
const SIGQUIT
SIGQUIT.
Definition: ql_misc.dox.h:1527
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:1559
Qore::SIGPWR
const SIGPWR
SIGPWR.
Definition: ql_misc.dox.h:1525
Qore::True
const True
logical True
Definition: qc_qore.dox.h:94
Qore::SIGIO
const SIGIO
SIGIO.
Definition: ql_misc.dox.h:1505
Qore::SIGCLD
const SIGCLD
SIGCLD.
Definition: ql_misc.dox.h:1487
Qore::SIGUSR2
const SIGUSR2
SIGUSR2.
Definition: ql_misc.dox.h:1553
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:1555
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:1533
Qore::SIGTERM
const SIGTERM
SIGTERM.
Definition: ql_misc.dox.h:1537
Qore::SIGALRM
const SIGALRM
SIGALRM.
Definition: ql_misc.dox.h:1479
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:1541
Qore::False
const False
logical False
Definition: qc_qore.dox.h:92
Qore::SIGCONT
const SIGCONT
SIGCONT.
Definition: ql_misc.dox.h:1489
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:1517
Qore::SIGTTIN
const SIGTTIN
SIGTTIN.
Definition: ql_misc.dox.h:1545
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:1511
Qore::SIGCHLD
const SIGCHLD
SIGCHLD.
Definition: ql_misc.dox.h:1485
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:1529
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:1491
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:1477
Qore::splice
string splice(string str)
This function always returns an empty string &quot;&quot;.
Qore::SignalToName
const SignalToName
maps signal numbers (as a string key) to the symbolic name for the signal
Definition: ql_misc.dox.h:1567
Qore::functionType
*string functionType(string name)
Returns &quot;builtin&quot; (for a builtin function), &quot;user&quot; (for a user function), or NOTHING (if the function...
Qore::SIGFREEZE
const SIGFREEZE
SIGFREEZE.
Definition: ql_misc.dox.h:1495
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:1521
Qore::SIGXCPU
const SIGXCPU
SIGXCPU.
Definition: ql_misc.dox.h:1561
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:1497
Qore::SIGILL
const SIGILL
SIGILL.
Definition: ql_misc.dox.h:1499
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:1509
Qore::SIGTSTP
const SIGTSTP
SIGTSTP.
Definition: ql_misc.dox.h:1543
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:1493
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:1551
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:1557
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&#39;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::SIGINT
const SIGINT
SIGINT.
Definition: ql_misc.dox.h:1503
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:1429
Qore::SIGXFSZ
const SIGXFSZ
SIGXFSZ.
Definition: ql_misc.dox.h:1563
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&#39;s members.
Qore::SIGIOT
const SIGIOT
SIGIOT.
Definition: ql_misc.dox.h:1507
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:1519
Qore::SIGCANCEL
const SIGCANCEL
SIGCANCEL.
Definition: ql_misc.dox.h:1483
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:1565
Qore::SIGTHAW
const SIGTHAW
SIGTHAW.
Definition: ql_misc.dox.h:1539
Qore::SIGLOST
const SIGLOST
SIGLOST.
Definition: ql_misc.dox.h:1515