Commit 6504f856 authored by seb's avatar seb
Browse files

add __repr__ for all object which define operator<<


git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@202 45c4679d-1946-429d-baad-37912b19538b
parent 930627bf
......@@ -33,6 +33,12 @@ using namespace lima;
bool running;
int run_nb;
int last_frame_nb;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
Acq(Espia::Dev& dev);
......
......@@ -44,5 +44,11 @@ class Simulator
void reset();
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
......@@ -29,6 +29,12 @@ class Point
bool contains(const Point& p) const;
void alignTo(const Point& p, AlignDir align_dir);
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
enum XBorder {
......@@ -57,6 +63,12 @@ using namespace lima;
YBorder getY() const;
bool operator ==(const Corner& c);
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
class Size
......@@ -90,6 +102,12 @@ using namespace lima;
void alignTo(const Point& p, AlignDir align_dir);
Point getCornerCoords(const Point& p, const Corner& c);
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
class Bin
......@@ -117,6 +135,12 @@ using namespace lima;
Bin& operator *=(const Point& p);
Bin& operator /=(const Point& p);
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
class Flip
......@@ -178,6 +202,12 @@ using namespace lima;
void alignSizeTo(const Point& p, AlignDir align_dir);
void alignCornersTo(const Point& p, AlignDir align_dir);
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
bool operator ==(const Roi& r1, const Roi& r2);
......@@ -213,5 +243,11 @@ using namespace lima;
void checkValidPoint(const Point& point, bool for_div);
void checkValidRoi(const Roi& roi);
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
......@@ -16,6 +16,13 @@ using namespace lima;
int concatNbFrames;
double latencyTime;
TrigMode triggerMode;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
CtAcquisition(HwInterface *hw);
......
......@@ -2,6 +2,7 @@ class CtBuffer {
%TypeHeaderCode
#include <CtBuffer.h>
#include <Constants.h>
#include <sstream>
using namespace lima;
%End
public:
......@@ -9,6 +10,13 @@ using namespace lima;
BufferMode mode;
long nbBuffers;
short maxMemory;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
CtBuffer(HwInterface *hw);
......
......@@ -20,6 +20,13 @@ using namespace lima;
long LastImageReady;
long LastImageSaved;
long LastCounterReady;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
class ImageStatusCallback
......@@ -47,6 +54,13 @@ using namespace lima;
CtControl::ErrorCode Error;
CtControl::CameraErrorCode CameraStatus;
CtControl::ImageStatus ImageCounters;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
CtControl(HwInterface *hw);
......
class CtSwBinRoi {
%TypeHeaderCode
#include <CtImage.h>
#include <sstream>
using namespace lima;
%End
public:
......@@ -17,6 +18,13 @@ using namespace lima;
const Bin& getBin() const;
const Roi& getRoi() const;
const Size& getSize() const;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
class CtHwBinRoi
......
......@@ -81,6 +81,7 @@ class CtSaving
{
%TypeHeaderCode
#include <CtSaving.h>
#include <sstream>
using namespace lima;
%End
public:
......@@ -114,6 +115,13 @@ using namespace lima;
CtSaving::SavingMode savingMode;
CtSaving::OverwritePolicy overwritePolicy;
long framesPerFile;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
......
......@@ -5,6 +5,7 @@ struct HwFrameInfoType
#define PY_ARRAY_UNIQUE_SYMBOL _LimaNumPy
#include "numpy/arrayobject.h"
#include <HwFrameInfo.h>
#include <sstream>
using namespace lima;
%End
......@@ -49,6 +50,12 @@ using namespace lima;
if (!arr)
return NULL; //should throw an error
sipCpp = new HwFrameInfoType(a0, PyArray_DATA(a1), a2, *a3, a4);
%End
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
......
......@@ -40,6 +40,12 @@ using namespace lima;
AcqStatus acq;
DetStatus det;
DetStatus det_mask;
const char* __repr__();
%MethodCode
std::ostringstream str;
str << *sipCpp;
sipRes = str.str().c_str();
%End
};
enum ResetLevel {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment