Home | History | Annotate | Download | only in Common
      1 // HandlerOut.h
      2 
      3 #ifndef __HANDLER_OUT_H
      4 #define __HANDLER_OUT_H
      5 
      6 #include "../../Common/MethodProps.h"
      7 
      8 namespace NArchive {
      9 
     10 class CMultiMethodProps
     11 {
     12   UInt32 _level;
     13 public:
     14   #ifndef _7ZIP_ST
     15   UInt32 _numThreads;
     16   UInt32 _numProcessors;
     17   #endif
     18 
     19   UInt32 _crcSize;
     20   CObjectVector<COneMethodInfo> _methods;
     21   COneMethodInfo _filterMethod;
     22   bool _autoFilter;
     23 
     24   void SetGlobalLevelAndThreads(COneMethodInfo &oneMethodInfo
     25       #ifndef _7ZIP_ST
     26       , UInt32 numThreads
     27       #endif
     28       );
     29 
     30   unsigned GetNumEmptyMethods() const
     31   {
     32     unsigned i;
     33     for (i = 0; i < _methods.Size(); i++)
     34       if (!_methods[i].IsEmpty())
     35         break;
     36     return i;
     37   }
     38 
     39   int GetLevel() const { return _level == (UInt32)(Int32)-1 ? 5 : (int)_level; }
     40 
     41   void Init();
     42 
     43   CMultiMethodProps() { Init(); }
     44   HRESULT SetProperty(const wchar_t *name, const PROPVARIANT &value);
     45 };
     46 
     47 class CSingleMethodProps: public COneMethodInfo
     48 {
     49   UInt32 _level;
     50 
     51 public:
     52   #ifndef _7ZIP_ST
     53   UInt32 _numThreads;
     54   UInt32 _numProcessors;
     55   #endif
     56 
     57   void Init();
     58   CSingleMethodProps() { Init(); }
     59   int GetLevel() const { return _level == (UInt32)(Int32)-1 ? 5 : (int)_level; }
     60   HRESULT SetProperties(const wchar_t **names, const PROPVARIANT *values, UInt32 numProps);
     61 };
     62 
     63 }
     64 
     65 #endif
     66