MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / MapStringToProperty

Method MapStringToProperty

src/fs/fsparserutil.cpp:55–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53//=========================================================================
54
55bool cFSParserUtil::MapStringToProperty(const TSTRING& str, int& propIndex) const
56{
57 bool fMappedChar = true; // assume we'll recognize this char
58 // and set false if we don't
59
60 // for short names
61 if (str.length() == 1)
62 {
63 switch (str[0])
64 {
65 case 'p':
66 propIndex = cFSPropSet::PROP_MODE;
67 break;
68 case 'i':
69 propIndex = cFSPropSet::PROP_INODE;
70 break;
71 case 'n':
72 propIndex = cFSPropSet::PROP_NLINK;
73 break;
74 case 'u':
75 propIndex = cFSPropSet::PROP_UID;
76 break;
77 case 'g':
78 propIndex = cFSPropSet::PROP_GID;
79 break;
80 case 's':
81 propIndex = cFSPropSet::PROP_SIZE;
82 break;
83 case 't':
84 propIndex = cFSPropSet::PROP_FILETYPE;
85 break;
86 case 'd':
87 propIndex = cFSPropSet::PROP_DEV;
88 break;
89 case 'r':
90 propIndex = cFSPropSet::PROP_RDEV;
91 break;
92 case 'b':
93 propIndex = cFSPropSet::PROP_BLOCKS;
94 break;
95 case 'a':
96 propIndex = cFSPropSet::PROP_ATIME;
97 break;
98 case 'm':
99 propIndex = cFSPropSet::PROP_MTIME;
100 break;
101 case 'c':
102 propIndex = cFSPropSet::PROP_CTIME;
103 break;
104 case 'C':
105 propIndex = cFSPropSet::PROP_CRC32;
106 break;
107 case 'M':
108 propIndex = cFSPropSet::PROP_MD5;
109 break;
110 case 'S':
111 propIndex = cFSPropSet::PROP_SHA;
112 break;

Callers 1

CreatePropVectorMethod · 0.80

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected