Flag modification methods.
More...
Flag modification methods.
Methods for changing configuration flags after opening.
◆ SetFlags() [1/4]
| void Recognition::Magic::MagicPrivate::SetFlags |
( |
const FlagsContainerT & | flags_container | ) |
|
|
inline |
Set new flags from container (throwing version).
Convenience overload accepting a container of individual Flags. Converts to bitmask and delegates to SetFlags(FlagsMaskT).
- Parameters
-
| [in] | flags_container | Container (vector) of Flags enum values. |
- Exceptions
-
| MagicIsClosed | If instance is not open. |
| MagicSetFlagsError | If magic_setflags() fails. |
- See also
- Magic::SetFlags(const FlagsContainerT&)
◆ SetFlags() [2/4]
| bool Recognition::Magic::MagicPrivate::SetFlags |
( |
const FlagsContainerT & | flags_container, |
|
|
const std::nothrow_t & | tag ) |
|
inlinenodiscardnoexcept |
Set new flags from container (noexcept version).
Non-throwing convenience overload accepting a container of Flags.
- Parameters
-
| [in] | flags_container | Container (vector) of Flags enum values. |
| [in] | tag | Pass std::nothrow to select this overload. |
- Returns
- true on success, false on failure.
- See also
- Magic::SetFlags(const FlagsContainerT&, const std::nothrow_t&)
◆ SetFlags() [3/4]
| void Recognition::Magic::MagicPrivate::SetFlags |
( |
FlagsMaskT | flags_mask | ) |
|
|
inline |
Set new flags for the instance (throwing version).
Changes the configuration flags for this instance by calling magic_setflags(). This affects how subsequent file identifications are performed.
- Parameters
-
| [in] | flags_mask | New configuration flags as a bitmask. |
- Exceptions
-
| MagicIsClosed | If instance is not open. |
| MagicSetFlagsError | If magic_setflags() fails. |
- libmagic Call
CookieT m_cookie
Definition magic.cpp:1920
Converter between C++ flag types and libmagic flag values.
Definition magic.cpp:2105
- Note
- Updates internal m_flags_mask on success.
- See also
- Magic::SetFlags(FlagsMaskT)
-
GetFlags()
◆ SetFlags() [4/4]
| bool Recognition::Magic::MagicPrivate::SetFlags |
( |
FlagsMaskT | flags_mask, |
|
|
const std::nothrow_t & | tag ) |
|
inlinenodiscardnoexcept |
Set new flags for the instance (noexcept version).
Non-throwing variant that returns success/failure status.
- Parameters
-
| [in] | flags_mask | New configuration flags as a bitmask. |
| [in] | tag | Pass std::nothrow to select this overload. |
- Returns
- true on success, false if closed or setflags fails.
- See also
- Magic::SetFlags(FlagsMaskT, const std::nothrow_t&)
-
GetFlags()