k1a  1.1
Accelerated functionalities for k1lib
StrIterCat.h
Go to the documentation of this file.
1 #pragma once
2 #define PY_SSIZE_T_CLEAN
3 #include <Python.h>
4 #include <structmember.h>
5 
6 #include <fstream>
7 #include <iostream>
8 #include <string>
9 #include <vector>
10 
11 #include "StrIter.h"
12 
13 namespace k1a {
14 
25 class StrIterCat : public StrIter {
26  public:
27  std::string *fileName;
28  StrIterCat(PyObject *pyObj, std::string fileName);
29  std::string next();
30  ~StrIterCat();
31 
32  private:
33  std::ifstream *fp;
34 };
35 
36 typedef struct {
39 } PyStrIterCat;
40 
41 PyObject *PyStrIterCat_new(std::string fileName);
42 PyObject *PyStrIterCat_new(PyTypeObject *type, PyObject *args, PyObject *kwargs);
43 extern PyTypeObject PyStrIterCat_Type;
44 
45 } // namespace k1a
Line iterator from file.
Definition: StrIterCat.h:25
std::string next()
Definition: StrIterCat.cpp:21
StrIterCat(PyObject *pyObj, std::string fileName)
Definition: StrIterCat.cpp:16
std::string * fileName
Definition: StrIterCat.h:27
std::ifstream * fp
Definition: StrIterCat.h:33
String iterator.
Definition: StrIter.h:79
PyObject * pyObj
Associated python object.
Definition: StrIter.h:81
Definition: funcs.cpp:15
PyTypeObject PyStrIterCat_Type
Definition: StrIterCat.cpp:64
PyObject * PyStrIterCat_new(std::string fileName)
Creates a new PyStrIterCat object.
Definition: StrIterCat.cpp:37
StrIterCat * val
Definition: StrIterCat.h:38