source: nscp/modules/CheckDisk/file_info.hpp @ 83c2453

0.4.00.4.10.4.2
Last change on this file since 83c2453 was e11d494, checked in by Michael Medin <michael@…>, 2 years ago

2011-07-25

  • merged in all 0.3.9 changes into 0.4.0
  • refactored where filter to be "non template" to drastically reduce compile time (as well as potentially size if I ever go dll instead of static link)
  • streamlined checkeventlog toi be same as "the other" where filters as well as dropped support of "old" syntax.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1#pragma once
2/*
3#include <file_helpers.hpp>
4#include <checkHelpers.hpp>
5#include <filter_framework.hpp>
6
7
8namespace file_filter {
9        struct filter_obj;
10}
11namespace file_finder {
12
13        typedef checkHolders::CheckContainer<checkHolders::MaxMinBoundsDiscSize> PathContainer;
14
15
16
17        struct filter {
18
19                static const int filter_plus = 1;
20                static const int filter_minus = 2;
21                static const int filter_normal = 3;
22
23
24                filters::filter_all_numeric<unsigned long long, checkHolders::disk_size_handler<checkHolders::disk_size_type> > size;
25                filters::filter_all_times creation;
26                filters::filter_all_times accessed;
27                filters::filter_all_times written;
28                filters::filter_all_strings version;
29                filters::filter_all_num_ul line_count;
30
31                inline bool hasFilter() {
32                        return size.hasFilter() || creation.hasFilter() ||
33                                accessed.hasFilter() || written.hasFilter();
34                }
35                bool matchFilter(file_filter::filter_obj *value) const;
36
37                std::wstring getValue() const {
38                        if (size.hasFilter())
39                                return _T("size: ") + size.getValue();
40                        if (creation.hasFilter())
41                                return _T("creation: ") + creation.getValue();
42                        if (accessed.hasFilter())
43                                return _T("accessed: ") + accessed.getValue();
44                        if (written.hasFilter())
45                                return _T("written: ") + written.getValue();
46                        if (version.hasFilter())
47                                return _T("written: ") + version.getValue();
48                        if (line_count.hasFilter())
49                                return _T("written: ") + line_count.getValue();
50                        return _T("UNknown...");
51                }
52
53        };
54
55}
56*/
Note: See TracBrowser for help on using the repository browser.