git-svn-id: svn://db.shs.com.ru/pip@842 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -530,21 +530,21 @@ public:
|
||||
void setDebug(bool debug) {setProperty(PIStringAscii("debug"), debug);}
|
||||
|
||||
//! Returns properties of the object
|
||||
const PIMap<PIString, PIVariant> & properties() const {return properties_;}
|
||||
PIMap<PIString, PIVariant> properties() const;
|
||||
|
||||
//! Returns properties count of the object
|
||||
int propertiesCount() const {return properties_.size_s();}
|
||||
|
||||
//! Returns property with name "name"
|
||||
PIVariant property(const PIString & name) const {if (!properties_.contains(name)) return PIVariant(); return properties_.value(name);}
|
||||
PIVariant property(const PIString & name) const {return properties_.value(name.hash(), Property(PIString(), PIVariant())).second;}
|
||||
PIVariant property(const char * name) const {return property(PIStringAscii(name));}
|
||||
|
||||
//! Set property with name "name" to "value". If there is no such property in object it will be added
|
||||
void setProperty(const PIString & name, const PIVariant & value) {properties_[name] = value; propertyChanged(name);}
|
||||
void setProperty(const PIString & name, const PIVariant & value) {properties_[name.hash()] = Property(name, value); propertyChanged(name);}
|
||||
void setProperty(const char * name, const PIVariant & value) {setProperty(PIStringAscii(name), value);}
|
||||
|
||||
//! Returns if property with name "name" exists
|
||||
bool isPropertyExists(const PIString & name) const {return properties_.contains(name);}
|
||||
bool isPropertyExists(const PIString & name) const {return properties_.contains(name.hash());}
|
||||
bool isPropertyExists(const char * name) const {return isPropertyExists(PIStringAscii(name));}
|
||||
|
||||
void setThreadSafe(bool yes) {thread_safe_ = yes;}
|
||||
@@ -840,6 +840,7 @@ private:
|
||||
PIVector<PIVariant> values;
|
||||
};
|
||||
typedef PIPair<PIString, PIVariant> Property;
|
||||
typedef PIPair<uint, PIPair<PIString, PIVariant> > PropertyHash;
|
||||
|
||||
bool findSuitableMethodV(const PIString & method, int args, int & ret_args, __MetaFunc & ret);
|
||||
PIVector<__MetaFunc> findEH(const PIString & name) const;
|
||||
@@ -855,7 +856,7 @@ private:
|
||||
|
||||
|
||||
PIVector<__Connection> connections;
|
||||
PIMap<PIString, PIVariant> properties_;
|
||||
PIMap<uint, PIPair<PIString, PIVariant> > properties_;
|
||||
PISet<PIObject * > connectors;
|
||||
PIVector<__QueuedEvent> events_queue;
|
||||
PIMutex mutex_, mutex_connect, mutex_queue;
|
||||
|
||||
Reference in New Issue
Block a user