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   int _analysisLevel;
     14 public:
     15   #ifndef _7ZIP_ST
     16   UInt32 _numThreads;
     17   UInt32 _numProcessors;
     18   #endif
     19 
     20   UInt32 _crcSize;
     21   CObjectVector<COneMethodInfo> _methods;
     22   COneMethodInfo _filterMethod;
     23   bool _autoFilter;
     24 
     25   void SetGlobalLevelAndThreads(COneMethodInfo &oneMethodInfo
     26       #ifndef _7ZIP_ST
     27       , UInt32 numThreads
     28       #endif
     29       );
     30 
     31   unsigned GetNumEmptyMethods() const
     32   {
     33     unsigned i;
     34     for (i = 0; i < _methods.Size(); i++)
     35       if (!_methods[i].IsEmpty())
     36         break;
     37     return i;
     38   }
     39 
     40   int GetLevel() const { return _level == (UInt32)(Int32)-1 ? 5 : (int)_level; }
     41   int GetAnalysisLevel() const { return _analysisLevel; }
     42 
     43   void Init();
     44 
     45   CMultiMethodProps() { Init(); }
     46   HRESULT SetProperty(const wchar_t *name, const PROPVARIANT &value);
     47 };
     48 
     49 class CSingleMethodProps: public COneMethodInfo
     50 {
     51   UInt32 _level;
     52 
     53 public:
     54   #ifndef _7ZIP_ST
     55   UInt32 _numThreads;
     56   UInt32 _numProcessors;
     57   #endif
     58 
     59   void Init();
     60   CSingleMethodProps() { Init(); }
     61   int GetLevel() const { return _level == (UInt32)(Int32)-1 ? 5 : (int)_level; }
     62   HRESULT SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps);
     63 };
     64 
     65 }
     66 
     67 #endif
     68