src/FilesystemCommand.h
branchv_0
changeset 28 9172bd97ae99
parent 27 532953173cd5
child 29 6f15f18d2abf
equal deleted inserted replaced
27:532953173cd5 28:9172bd97ae99
    36 #include "Configuration.h"
    36 #include "Configuration.h"
    37 #include "AttributeFinder.h"
    37 #include "AttributeFinder.h"
    38 #include "FileAttributeFinder.h"
    38 #include "FileAttributeFinder.h"
    39 #include "XattrAttributeFinder.h"
    39 #include "XattrAttributeFinder.h"
    40 #include "HashAttributeFinder.h"
    40 #include "HashAttributeFinder.h"
       
    41 #include "ScriptAttributeFinder.h"
    41 
    42 
    42 namespace relpipe {
    43 namespace relpipe {
    43 namespace in {
    44 namespace in {
    44 namespace filesystem {
    45 namespace filesystem {
    45 
    46 
    50 private:
    51 private:
    51 	std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
    52 	std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
    52 
    53 
    53 	FileAttributeFinder fileAttributeFinder;
    54 	FileAttributeFinder fileAttributeFinder;
    54 	HashAttributeFinder hashAttributeFinder;
    55 	HashAttributeFinder hashAttributeFinder;
       
    56 	ScriptAttributeFinder scriptAttributeFinder;
    55 	XattrAttributeFinder xattrAttributeFinder;
    57 	XattrAttributeFinder xattrAttributeFinder;
    56 
    58 
    57 	std::map<string_t, AttributeFinder*> attributeFinders{
    59 	std::map<string_t, AttributeFinder*> attributeFinders{
    58 		{RequestedField::GROUP_FILE, &fileAttributeFinder},
    60 		{RequestedField::GROUP_FILE, &fileAttributeFinder},
    59 		{RequestedField::GROUP_HASH, &hashAttributeFinder},
    61 		{RequestedField::GROUP_HASH, &hashAttributeFinder},
       
    62 		{RequestedField::GROUP_SCRIPT, &scriptAttributeFinder},
    60 		{RequestedField::GROUP_XATTR, &xattrAttributeFinder}};
    63 		{RequestedField::GROUP_XATTR, &xattrAttributeFinder}};
    61 
    64 
    62 	void reset(std::stringstream& stream) {
    65 	void reset(std::stringstream& stream) {
    63 		stream.str("");
    66 		stream.str("");
    64 		stream.clear();
    67 		stream.clear();