1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>to_s (Fam::Event)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/*
* Return a human-readable string-representation of a Fam::Event object.
*
* Examples:
* puts 'event: ' << ev.to_s
*
*/
static VALUE fam_ev_to_s(VALUE self)
{
FAMEvent *ev;
char str[1024];
static char *ev_code_list[] = {
"Unknown",
"Changed",
"Deleted",
"StartExecuting",
"StopExecuting",
"Created",
"Moved",
"Acknowledge",
"Exists",
"EndExists",
};
Data_Get_Struct(self, FAMEvent, ev);
snprintf(str, 1024, "%s \"%s\" (%d)",
ev_code_list[ev->code],
ev->filename,
FAMREQUEST_GETREQNUM(&(ev->fr)));
return rb_str_new2(str);
}</pre>
</body>
</html>
|