Unix and Linux Discussions Tagged with swap |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
12 |
14,702 |
Linux |
|
|
|
2 |
5,078 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
8,566 |
Solaris |
|
|
|
5 |
3,634 |
Solaris |
|
|
|
23 |
17,591 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
5,193 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
1,932 |
Shell Programming and Scripting |
|
|
|
2 |
2,712 |
Red Hat |
|
|
|
11 |
25,676 |
Solaris |
|
|
|
6 |
2,712 |
Solaris |
|
|
|
0 |
4,341 |
UNIX for Advanced & Expert Users |
|
|
|
8 |
12,138 |
Solaris |
|
|
|
3 |
2,589 |
Shell Programming and Scripting |
|
|
|
8 |
7,668 |
Red Hat |
|
|
|
9 |
10,334 |
Solaris |
|
|
|
9 |
5,000 |
Solaris |
|
|
|
1 |
3,119 |
Linux |
|
|
|
1 |
2,193 |
Shell Programming and Scripting |
|
|
|
4 |
5,799 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
6,187 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
11,971 |
Solaris |
|
|
|
2 |
7,821 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
34,931 |
HP-UX |
|
|
|
38 |
47,418 |
Shell Programming and Scripting |
|
|
|
1 |
5,576 |
Solaris |
|
|
|
4 |
4,000 |
Solaris |
|
|
|
33 |
17,339 |
HP-UX |
|
|
|
2 |
7,609 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
22,685 |
SCO |
|
|
|
2 |
11,009 |
Linux |
|
|
|
2 |
7,661 |
Filesystems, Disks and Memory |
|
|
|
6 |
9,190 |
Red Hat |
|
|
|
7 |
41,179 |
UNIX for Advanced & Expert Users |
|
|
|
27 |
22,980 |
Solaris |
|
|
|
1 |
11,370 |
HP-UX |
|
|
|
8 |
5,500 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
4,419 |
UNIX for Dummies Questions & Answers |
|
|
|
39 |
22,214 |
Solaris |
|
|
|
1 |
5,354 |
Solaris |
|
|
|
1 |
3,388 |
UNIX for Advanced & Expert Users |
Glib::Flags(3pm) User Contributed Perl Documentation Glib::Flags(3pm)
NAME
Glib::Flags - Overloaded operators representing GLib flags
HIERARCHY
Glib::Flags
DESCRIPTION
Glib maps flag and enum values to the nicknames strings provided by the underlying C libraries. Representing flags this way in Perl is an
interesting problem, which Glib solves by using some cool overloaded operators.
The functions described here actually do the work of those overloaded operators. See the description of the flags operators in the "This
Is Now That" section of Glib for more info.
METHODS
scalar = $class->new ($a)
o $a (scalar)
Create a new flags object with given bits. This is for use from a subclass, it's not possible to create a "Glib::Flags" object as such.
For example,
my $f1 = Glib::ParamFlags->new ('readable');
my $f2 = Glib::ParamFlags->new (['readable','writable']);
An object like this can then be used with the overloaded operators.
scalar = $a->all ($b, $swap)
o $b (scalar)
o $swap (scalar)
aref = $f->as_arrayref
Return the bits of $f as a reference to an array of strings, like ['flagbit1','flagbit2']. This is the overload function for "@{}", ie.
arrayizing $f. You can call it directly as a method too.
Note that @$f gives the bits as a list, but as_arrayref gives an arrayref. If an arrayref is what you want then the method style
somefunc()->as_arrayref can be more readable than [@{somefunc()}].
bool = $f->bool
Return 1 if any bits are set in $f, or 0 if none are set. This is the overload for $f in boolean context (like "if", etc). You can call
it as a method to get a true/false directly too.
integer = $a->eq ($b, $swap)
o $b (scalar)
o $swap (integer)
integer = $a->ge ($b, $swap)
o $b (scalar)
o $swap (integer)
scalar = $a->intersect ($b, $swap)
o $b (scalar)
o $swap (scalar)
integer = $a->ne ($b, $swap)
o $b (scalar)
o $swap (integer)
scalar = $a->sub ($b, $swap)
o $b (scalar)
o $swap (scalar)
scalar = $a->union ($b, $swap)
o $b (scalar)
o $swap (scalar)
scalar = $a->xor ($b, $swap)
o $b (scalar)
o $swap (scalar)
SEE ALSO
Glib
COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Glib for a full notice.
perl v5.14.2 2012-05-24 Glib::Flags(3pm)