tylerliu | bcd8348 | 2020-10-07 14:45:28 -0700 | [diff] [blame^] | 1 | // |
| 2 | // Created by Tyler on 10/6/20. |
| 3 | // |
| 4 | |
| 5 | #ifndef NDNCERT_ASSIGNMENT_OR_HPP |
| 6 | #define NDNCERT_ASSIGNMENT_OR_HPP |
| 7 | |
| 8 | #include "assignment-funcs.hpp" |
| 9 | |
| 10 | namespace ndn { |
| 11 | namespace ndncert { |
| 12 | |
| 13 | /** |
| 14 | * assign names base on client probe parameter |
| 15 | */ |
| 16 | class AssignmentOr: public NameAssignmentFuncFactory{ |
| 17 | public: |
| 18 | AssignmentOr(); |
| 19 | |
| 20 | NameAssignmentFunc getFunction(std::list<NameAssignmentFunc> funcs); |
| 21 | |
| 22 | NameAssignmentFunc getFunction(const std::string &factoryParam) override; |
| 23 | |
| 24 | class OrAssignmentFunc { |
| 25 | public: |
| 26 | OrAssignmentFunc(std::list<NameAssignmentFunc> funcList); |
| 27 | |
| 28 | std::vector<PartialName> |
| 29 | operator() (const std::vector<std::tuple<std::string, std::string>> params); |
| 30 | private: |
| 31 | std::list<NameAssignmentFunc> m_funcList; |
| 32 | }; |
| 33 | |
| 34 | }; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | |
| 39 | |
| 40 | #endif //NDNCERT_ASSIGNMENT_OR_HPP |