git-svn-id: svn://db.shs.com.ru/pip@496 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -266,13 +266,6 @@ PIChar PIChar::toLower() const {
|
||||
}
|
||||
|
||||
|
||||
#ifdef PIP_STD_IOSTREAM
|
||||
std::ostream & operator <<(std::ostream & s, const PIChar & v) {
|
||||
s << v.toCharPtr();
|
||||
return s;
|
||||
}
|
||||
#endif
|
||||
|
||||
PICout operator <<(PICout s, const PIChar & v) {
|
||||
s.space();
|
||||
s.setControl(0, true);
|
||||
|
||||
@@ -157,11 +157,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#ifdef PIP_STD_IOSTREAM
|
||||
//! Output operator to \c std::ostream
|
||||
std::ostream & operator <<(std::ostream & s, const PIChar & v);
|
||||
#endif
|
||||
|
||||
//! Output operator to \a PICout
|
||||
PICout operator <<(PICout s, const PIChar & v);
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ bool PIObject::execute(const PIString & method, const PIVector<PIVariant> & vl)
|
||||
bool ok = findSuitableMethodV(method, vl.size_s(), ac, func);
|
||||
if (!ok)
|
||||
return false;
|
||||
callAddrV(func.addrV, this, ac, vl);
|
||||
callAddrV(func.addrV, toThis(), ac, vl);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ bool PIObject::executeQueued(PIObject * performer, const PIString & method, cons
|
||||
bool ok = findSuitableMethodV(method, vl.size_s(), ac, func);
|
||||
if (!ok)
|
||||
return false;
|
||||
performer->postQueuedEvent(QueuedEvent(func.addrV, this, this, performer, vl));
|
||||
performer->postQueuedEvent(QueuedEvent(func.addrV, toThis(), this, performer, vl));
|
||||
performer->proc_event_queue = true;
|
||||
return true;
|
||||
}
|
||||
@@ -399,6 +399,12 @@ void PIObject::postQueuedEvent(const PIObject::QueuedEvent & e) {
|
||||
}
|
||||
|
||||
|
||||
void * PIObject::toThis() const {
|
||||
//piCout << ptrOffset() << (void*)this << (void*)((char*)this - ptrOffset());
|
||||
return (void*)((char*)this - ptrOffset());
|
||||
}
|
||||
|
||||
|
||||
PIMutex & PIObject::__meta_mutex() {
|
||||
static PIMutex ret;
|
||||
return ret;
|
||||
|
||||
@@ -195,7 +195,8 @@
|
||||
public: \
|
||||
static const PIString __classNameS() {return PIStringAscii(#name);} \
|
||||
virtual const char * className() const {return #name;} \
|
||||
private:
|
||||
private: \
|
||||
virtual int ptrOffset() const {name * o = (name*)100; return int(llong((PIObject*)o) - llong(o));}
|
||||
|
||||
#define PIOBJECT_PARENT(name) \
|
||||
class __##name##_ParentInitializer__ { \
|
||||
@@ -885,6 +886,8 @@ private:
|
||||
__MetaFunc methodEH(const void * addr) const;
|
||||
void updateConnectors();
|
||||
void postQueuedEvent(const QueuedEvent & e);
|
||||
void * toThis() const;
|
||||
virtual int ptrOffset() const {return 0;}
|
||||
|
||||
static PIVector<PIObject * > & objects();
|
||||
static void callAddrV(void * slot, void * obj, int args, const PIVector<PIVariant> & vl);
|
||||
|
||||
@@ -75,6 +75,8 @@ inline PIString StdWString2PIString(const std::wstring & v) {
|
||||
|
||||
|
||||
|
||||
//! \relatesalso PIChar \brief Output operator to \c std::ostream
|
||||
inline std::ostream & operator <<(std::ostream & s, const PIChar & v) {s << v.toCharPtr(); return s;}
|
||||
|
||||
//! \relatesalso PIString \brief Return concatenated string
|
||||
inline PIString operator +(const PIString & f, const std::string & str) {PIString s(f); s += StdString2PIString(str); return s;}
|
||||
|
||||
Reference in New Issue
Block a user