XmpOptions
XmpOptions Public class
Description
The base class for a collection of 32 flag bits. Individual flags are defined as enum value bit masks. Inheriting classes add convenience accessor methods.
@since 24.01.2006
Diagram
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph iTextSharp.xmp.options
iTextSharp.xmp.options.XmpOptions[[XmpOptions]]
class iTextSharp.xmp.options.XmpOptions abstractStyle;
end
Members
Properties
Public properties
| Type | Name | Methods |
|---|---|---|
uint | OptionsIs friendly to access it during the tests. | get, set |
string | OptionsStringCreates a human readable string from the set options. Note: This method is quite expensive and should only be used within tests or as | get |
Protected internal properties
| Type | Name | Methods |
|---|---|---|
uint | ValidOptionsTo be implemeted by inheritants. | get |
Methods
Public methods
| Returns | Name |
|---|---|
void | Clear()Resets the options. |
bool | ContainsAllOptions(uint optionBits) |
bool | ContainsOneOf(uint optionBits) |
bool | Equals(object obj) |
int | GetHashCode() |
bool | IsExactly(uint optionBits) |
void | SetOption(uint optionBits, bool value) |
string | ToString() |
Protected internal methods
| Returns | Name |
|---|---|
void | AssertConsistency(uint options)The inheriting option class can do additional checks on the options. Note: For performance reasons this method is only called when setting bitmasks directly. When get- and set-methods are used, this method must be called manually, normally only when the Options-object has been created from a client (it has to be made public therefore). |
string | DefineOptionName(uint option)To be implemeted by inheritants. |
bool | GetOption(uint optionBit) |
Details
Summary
The base class for a collection of 32 flag bits. Individual flags are defined as enum value bit masks. Inheriting classes add convenience accessor methods.
@since 24.01.2006
Constructors
XmpOptions [1/2]
Source codeprotected XmpOptions()
Summary
The default constructor.
XmpOptions [2/2]
Source codepublic XmpOptions(uint options)
Arguments
| Type | Name | Description |
|---|---|---|
uint | options | the options bit mask |
Summary
Constructor with the options bit mask.
Exceptions
| Name | Description |
|---|---|
| XmpException | If the options are not correct |
Methods
Clear
Source codepublic virtual void Clear()
Summary
Resets the options.
IsExactly
Source codepublic virtual bool IsExactly(uint optionBits)
Arguments
| Type | Name | Description |
|---|---|---|
uint | optionBits | an option bitmask |
Returns
Returns true, if this object is equal to the given options.
ContainsAllOptions
Source codepublic virtual bool ContainsAllOptions(uint optionBits)
Arguments
| Type | Name | Description |
|---|---|---|
uint | optionBits | an option bitmask |
Returns
Returns true, if this object contains all given options.
ContainsOneOf
Source codepublic virtual bool ContainsOneOf(uint optionBits)
Arguments
| Type | Name | Description |
|---|---|---|
uint | optionBits | an option bitmask |
Returns
Returns true, if this object contain at least one of the given options.
GetOption
Source codeprotected internal virtual bool GetOption(uint optionBit)
Arguments
| Type | Name | Description |
|---|---|---|
uint | optionBit | the binary bit or bits that are requested |
Returns
Returns if all of the requested bits are set or not.
SetOption
Source codepublic virtual void SetOption(uint optionBits, bool value)
Arguments
| Type | Name | Description |
|---|---|---|
uint | optionBits | the binary bit or bits that shall be set to the given value |
bool | value | the boolean value to set |
Equals
Source codepublic override bool Equals(object obj)
Arguments
| Type | Name | Description |
|---|---|---|
object | obj |
GetHashCode
Source codepublic override int GetHashCode()
ToString
Source codepublic override string ToString()
Returns
Returns the options as hex bitmask.
DefineOptionName
protected internal abstract string DefineOptionName(uint option)
Arguments
| Type | Name | Description |
|---|---|---|
uint | option | a single, valid option bit. |
Summary
To be implemeted by inheritants.
Returns
Returns a human readable name for an option bit.
AssertConsistency
Source codeprotected internal virtual void AssertConsistency(uint options)
Arguments
| Type | Name | Description |
|---|---|---|
uint | options | the bitmask to check. |
Summary
The inheriting option class can do additional checks on the options. Note: For performance reasons this method is only called when setting bitmasks directly. When get- and set-methods are used, this method must be called manually, normally only when the Options-object has been created from a client (it has to be made public therefore).
Exceptions
| Name | Description |
|---|---|
| XmpException | Thrown if the options are not consistent. |
Properties
Options
public virtual uint Options { get; set; }
Summary
Is friendly to access it during the tests.
OptionsString
public virtual string OptionsString { get; }
Summary
Creates a human readable string from the set options. Note: This method is quite expensive and should only be used within tests or as
ValidOptions
protected internal abstract uint ValidOptions { get; }
Summary
To be implemeted by inheritants.
Generated with ModularDoc