17#ifndef __file_name_parser_h__
18#define __file_name_parser_h__
45 if (s.size())
seq = parse_ints<uint32_t> (s);
90 void parse (
const std::string& imagename,
size_t max_num_sequences = std::numeric_limits<size_t>::max());
93 return (array.size());
96 std::string
spec ()
const {
97 return (specification);
109 return (seq_index.size());
113 return (seq_index[number]);
126 std::string folder_name, specification, current_name;
127 std::unique_ptr<Path::Dir> folder;
129 void insert_str (
const std::string&
str) {
132 array.insert (array.begin(),
item);
135 void insert_seq (
const std::string&
str) {
138 array.insert (array.begin(),
item);
139 seq_index.push_back (array.size()-1);
159 size_t max_num_sequences = std::numeric_limits<size_t>::max());
const vector< uint32_t > & sequence() const
std::string string() const
vector< uint32_t > & sequence()
void calc_padding(size_t maxval=0)
friend std::ostream & operator<<(std::ostream &stream, const Item &item)
void set_str(const std::string &s)
void set_seq(const std::string &s)
a class to interpret numbered filenames
bool match(const std::string &file_name, vector< uint32_t > &indices) const
std::string get_next_match(vector< uint32_t > &indices, bool return_seq_index=false)
friend std::ostream & operator<<(std::ostream &stream, const NameParser &parser)
size_t index_of_sequence(size_t number=0) const
void calculate_padding(const vector< uint32_t > &maxvals)
void parse(const std::string &imagename, size_t max_num_sequences=std::numeric_limits< size_t >::max())
const vector< uint32_t > & sequence(size_t index) const
const Item & operator[](size_t i) const
std::string name(const vector< uint32_t > &indices)
a class to hold a set of parsed image filenames
friend std::ostream & operator<<(std::ostream &stream, const List &list)
vector< std::shared_ptr< ParsedName > > list
void scan(NameParser &parser)
const ParsedName & operator[](size_t index) const
vector< uint32_t > count() const
size_t biggest_filename_size() const
void count_dim(vector< uint32_t > &dim, size_t ¤t_entry, size_t current_dim) const
vector< uint32_t > parse_scan_check(const std::string &specifier, size_t max_num_sequences=std::numeric_limits< size_t >::max())
a class to hold a parsed image filename
bool operator<(const ParsedName &pn) const
uint32_t index(size_t num) const
ParsedName(const std::string &name, const vector< uint32_t > &index)
friend std::ostream & operator<<(std::ostream &stream, const ParsedName &pin)
vector< uint32_t > indices
std::string str(const T &value, int precision=0)