Glib::Flags - Online Linux Manual PageSection : 3pm
Updated : 2020-11-08
Source : perl v5.32.0
Note : User Contributed Perl Documentation

NAMEGlib::Flags − methods and overloaded operators for flags

HIERARCHY​ Glib::Flags

DESCRIPTIONGlib 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)• $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)• $b (scalar) • $swap (scalar)

aref = $f>as_arrayrefReturn 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>boolReturn 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)• $b (scalar) • $swap (integer)

integer = $a>ge ($b, $swap)• $b (scalar) • $swap (integer)

scalar = $a>intersect ($b, $swap)• $b (scalar) • $swap (scalar)

integer = $a>ne ($b, $swap)• $b (scalar) • $swap (integer)

scalar = $a>sub ($b, $swap)• $b (scalar) • $swap (scalar)

scalar = $a>union ($b, $swap)• $b (scalar) • $swap (scalar)

scalar = $a>xor ($b, $swap)• $b (scalar) • $swap (scalar)

SEE ALSOGlib

COPYRIGHTCopyright (C) 2003−2011 by the gtk2−perl team. This software is licensed under the LGPL. See Glib for a full notice.
0
Johanes Gumabo
Data Size   :   18,664 byte
man-Glib::Flags.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 165,889
Visitor ID   :     :  
Visitor IP   :   3.139.69.138   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Glib::Flags.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Glib::Flags.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Glib::Flags.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|149|Glib::Flags.3pm|43|'br══─}─══ |'br══─}─══ )