1 #ifndef __JSUPPORT__JSINGLEFILESCANNER__
2 #define __JSUPPORT__JSINGLEFILESCANNER__
23 namespace JPP {
using namespace JSUPPORT; }
74 template<
class T = JNullType>
91 JTYPELIST<JSingleFileScanner_t, JLimit>::typelist>
121 this->setLimit(limit);
158 return out << static_cast<const std::string&>(file_name);
193 template<
class JTypelist_t>
261 if (
counter < getUpperLimit()) {
269 if (
counter < getLowerLimit()) {
340 template<
class JHead_t,
class JTail_t>
370 template<
class JTypelist_t>
423 THROW(
JException,
"JSingleFileScanner::skip(): inconsistent number of items skipped.");
431 template<
class JHead_t>
454 template<
class JTypelist_t>
virtual skip_type skip(const skip_type ns) override
Skip items.
JFileScanner< T > scanner
JSingleFileScanner(const input_type &file_name)
Constructor.
Interface for object iteration with rewinding.
JRewindableObjectIterator< T >::pointer_type pointer_type
virtual ~JSingleFileScanner()
Virtual destructor.
JSingleFileScanner_t()
Default constructor.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
bool is_valid(const json &js)
Check validity of JSon data.
unsigned int skip_type
Type definition for number of objects to skip.
JSingleFileScanner::input_type input_type
JSingleFileScanner(const input_type &file_name)
Constructor.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
virtual void rewind() override
Rewind.
virtual const pointer_type & next() override
Get next element.
Long64_t counter_type
Type definition for counter.
JSingleFileScanner(const input_type &file_name)
Constructor.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
Template definition of auxiliary base class for data structures composed of multiple base classes wit...
Auxiliary base class for file name.
Auxiliary class for defining the range of iterations of objects.
Auxiliary class for recursive type list generation.
JSingleFileScanner_t(const std::string &file_name)
Constructor.
Auxiliary class for no type definition.
JSingleFileScanner()
Default constructor.
JSingleFileScanner(const input_type &file_name, const JLimit &limit)
Constructor.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
JSingleFileScanner()
Default constructor.
JSingleFileScanner(const input_type &file_name, const JLimit &limit)
Constructor.
counter_type getCounter() const
Get counter.
JSingleFileScanner_t input_type
virtual skip_type skip(const skip_type ns) override
Skip items.
void configure(const input_type &input, const JLimit &limit)
Configure.
const JSingleFileScanner_t & getFilename() const
Get file name.
void configure(const input_type &input)
Configure.
virtual bool hasNext() override
Check availability of next element.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
JSingleFileScanner::input_type input_type
JSingleFileScanner(const input_type &file_name, const JLimit &limit)
Constructor.
JSingleFileScanner()
Default constructor.
Object reading from file.
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
Object reading from a list of files.
friend std::istream & operator>>(std::istream &in, JSingleFileScanner &file_name)
Read single file scanner from input.
JSingleFileScanner()
Default constructor.
Auxiliaries for defining the range of iterations of objects.
JSingleFileScanner::input_type input_type
virtual void rewind() override
Rewind.
friend std::ostream & operator<<(std::ostream &out, const JSingleFileScanner &file_name)
Write single file scanner to output.