Class BitInOutFormat

Synopsis

#include <include/bitformat.hpp>

class BitInOutFormat : public BitInFormat

Description

The BitInOutFormat class specifies a format available for creating new archives and extract old ones.

Note
Usually, the user of the library should not create new formats and, instead, use the ones provided by the BitFormat namespace

Inheritance

Ancestors: BitInFormat

Methods

BitInOutFormatConstructs a BitInOutFormat object with a id value, an extension and a set of supported features.
defaultMethodReturn the default compression method of the archive format.
extensionReturn the default file estension of the archive format
featuresReturn the bitset of the features supported by the format
hasFeatureChecks if the format has a specific feature (see FormatFeatures enum)

Source

Lines 103-144 in include/bitformat.hpp.

class BitInOutFormat : public BitInFormat {
    public:
        /**
         * @brief Constructs a BitInOutFormat object with a id value, an extension and a set of supported features
         *
         * @param value         the value of the format in the 7z SDK
         * @param ext           the default file extension of the archive format
         * @param defaultMethod the default compression method of the archive format.
         * @param features      the set of features supported by the archive format
         */
        BitInOutFormat( unsigned char value,
                        const wstring& ext,
                        BitCompressionMethod defaultMethod,
                        FeaturesSet features );
        /**
         * @return the default file estension of the archive format
         */
        const wstring& extension() const;
        /**
         * @return the bitset of the features supported by the format
         */
        const FeaturesSet features() const;
        /**
         * @brief Checks if the format has a specific feature (see FormatFeatures enum)
         * @param feature   feature to be checked
         * @return true if the format has the feature, false otherwise
         */
        bool hasFeature( FormatFeatures feature ) const;
        /**
         * @return the default compression method of the archive format.
         */
        BitCompressionMethod defaultMethod() const;
    private:
        const wstring mExtension;
        const BitCompressionMethod mDefaultMethod;
        const FeaturesSet mFeatures;
};





Add Discussion as Guest

Log in