AsmGrader 0.0.0
Loading...
Searching...
No Matches
asmgrader::AssignmentFileSearcher Class Reference

#include <assignment_file_searcher.hpp>

Inheritance diagram for asmgrader::AssignmentFileSearcher:
[legend]

Public Member Functions

 AssignmentFileSearcher (const Assignment &assignment, std::string var_regex=DEFAULT_REGEX)
 Unknown student name; search for any word in place of lastnamefirstname
 
bool search_recursive (StudentInfo &student, const std::filesystem::path &base, int max_depth=DEFAULT_SEARCH_DEPTH)
 
std::vector< StudentInfosearch_recursive (const std::filesystem::path &base, int max_depth=DEFAULT_SEARCH_DEPTH)
 Search for all potential student submissions for the given assignment.
 

Static Public Attributes

static constexpr auto DEFAULT_REGEX = R"(`lastname``firstname`_\d+_\d+_`base`\.`ext`)"
 
static constexpr auto DEFAULT_SEARCH_DEPTH = 10
 

Additional Inherited Members

- Protected Member Functions inherited from asmgrader::FileSearcher
std::string set_arg (const std::string &key, std::string_view value)
 
std::string get_expr () const
 
 FileSearcher (std::string expr, std::map< std::string, std::string > args={})
 
std::vector< std::filesystem::path > search (const std::filesystem::path &base)
 Equivalent to search_recursive(base, 1)
 
std::vector< std::filesystem::path > search_recursive (const std::filesystem::path &base, int max_depth)
 

Constructor & Destructor Documentation

◆ AssignmentFileSearcher()

asmgrader::AssignmentFileSearcher::AssignmentFileSearcher ( const Assignment & assignment,
std::string var_regex = DEFAULT_REGEX )
explicit

Unknown student name; search for any word in place of lastnamefirstname

Member Function Documentation

◆ search_recursive() [1/2]

std::vector< StudentInfo > asmgrader::AssignmentFileSearcher::search_recursive ( const std::filesystem::path & base,
int max_depth = DEFAULT_SEARCH_DEPTH )

Search for all potential student submissions for the given assignment.

◆ search_recursive() [2/2]

bool asmgrader::AssignmentFileSearcher::search_recursive ( StudentInfo & student,
const std::filesystem::path & base,
int max_depth = DEFAULT_SEARCH_DEPTH )

Member Data Documentation

◆ DEFAULT_REGEX

auto asmgrader::AssignmentFileSearcher::DEFAULT_REGEX = R"(`lastname``firstname`_\d+_\d+_`base`\.`ext`)"
staticconstexpr

◆ DEFAULT_SEARCH_DEPTH

auto asmgrader::AssignmentFileSearcher::DEFAULT_SEARCH_DEPTH = 10
staticconstexpr

The documentation for this class was generated from the following files: