1 #ifndef VALIDATION_FILE_H
2 #define VALIDATION_FILE_H
8 #include <nel/ligo/primitive.h>
15 CMissionState(std::string _name
, std::string _state
, std::string _hashKey
)
16 : name(_name
), state(_state
), hashKey(_hashKey
) { }
23 CMission(std::string _name
, std::string _hashKey
)
24 : name(_name
), hashKey(_hashKey
) { }
25 bool parsePrim(NLLIGO::IPrimitive
const* prim
);
31 typedef std::map
<std::string
, CMissionState
> TMissionStateContainer
;
32 std::deque
<std::string
> _AuthorizedStates
;
33 TMissionStateContainer _MissionStates
;
35 // CValidationFile() { }
36 void loadMissionValidationFile(std::string filename
);
37 void saveMissionValidationFile(std::string filename
);
38 void insertMission(std::string
const& mission
, std::string
const& hashKey
)
40 _MissionStates
.insert(std::make_pair(mission
, CMissionState(mission
, defaultState(), hashKey
)));
42 std::string
defaultState()
44 if (!_AuthorizedStates
.empty())
45 return _AuthorizedStates
.front();
51 #endif // VALIDATION_FILE_H