From 2dba4aab2b6399a30c4d894c120ab3c51450cf80 Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Wed, 28 Mar 2012 20:40:49 +0200 Subject: [PATCH] Dirk's VxWorks porting --- pvDataApp/factory/FieldCreateFactory.cpp | 2 +- pvDataApp/misc/status.cpp | 24 ++++++++++++------------ pvDataApp/misc/status.h | 2 +- pvDataApp/pv/pvIntrospect.h | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pvDataApp/factory/FieldCreateFactory.cpp b/pvDataApp/factory/FieldCreateFactory.cpp index 99fcadd..99fa3b7 100644 --- a/pvDataApp/factory/FieldCreateFactory.cpp +++ b/pvDataApp/factory/FieldCreateFactory.cpp @@ -31,7 +31,7 @@ PVDATA_REFCOUNT_MONITOR_DEFINE(field); Field::Field(String fieldName,Type type) :m_fieldName(fieldName) - ,m_type(type) + ,m_fieldType(type) { PVDATA_REFCOUNT_MONITOR_CONSTRUCT(field); } diff --git a/pvDataApp/misc/status.cpp b/pvDataApp/misc/status.cpp index d6c0cdf..bd11b8f 100644 --- a/pvDataApp/misc/status.cpp +++ b/pvDataApp/misc/status.cpp @@ -18,12 +18,12 @@ Status Status::OK; //PVDATA_REFCOUNT_MONITOR_DEFINE(status); Status::Status() : - m_type(STATUSTYPE_OK) + m_statusType(STATUSTYPE_OK) { } Status::Status(StatusType type, String message) : - m_type(type), m_message(message) + m_statusType(type), m_message(message) { if (type == STATUSTYPE_OK) throw std::invalid_argument("type == STATUSTYPE_OK"); @@ -32,7 +32,7 @@ Status::Status(StatusType type, String message) : } Status::Status(StatusType type, String message, String stackDump) : - m_type(type), m_message(message), m_stackDump(stackDump) + m_statusType(type), m_message(message), m_stackDump(stackDump) { if (type == STATUSTYPE_OK) throw std::invalid_argument("type == STATUSTYPE_OK"); @@ -46,7 +46,7 @@ Status::~Status() { Status::StatusType Status::getType() const { - return m_type; + return m_statusType; } @@ -62,25 +62,25 @@ epics::pvData::String Status::getStackDump() const bool Status::isOK() const { - return (m_type == STATUSTYPE_OK); + return (m_statusType == STATUSTYPE_OK); } bool Status::isSuccess() const { - return (m_type == STATUSTYPE_OK || m_type == STATUSTYPE_WARNING); + return (m_statusType == STATUSTYPE_OK || m_statusType == STATUSTYPE_WARNING); } void Status::serialize(ByteBuffer *buffer, SerializableControl *flusher) const { flusher->ensureBuffer(1); - if (m_type == STATUSTYPE_OK) + if (m_statusType == STATUSTYPE_OK) { // special code for okStatus (optimization) buffer->putByte((int8)-1); } else { - buffer->putByte((int8)m_type); + buffer->putByte((int8)m_statusType); SerializeHelper::serializeString(m_message, buffer, flusher); SerializeHelper::serializeString(m_stackDump, buffer, flusher); } @@ -93,15 +93,15 @@ void Status::deserialize(ByteBuffer *buffer, DeserializableControl *flusher) if (typeCode == (int8)-1) { // in most of the cases status will be OK, we statistically optimize - if (m_type != STATUSTYPE_OK) + if (m_statusType != STATUSTYPE_OK) { - m_type = STATUSTYPE_OK; + m_statusType = STATUSTYPE_OK; m_message = m_stackDump = m_emptyString; } } else { - m_type = (StatusType)typeCode; + m_statusType = (StatusType)typeCode; m_message = SerializeHelper::deserializeString(buffer, flusher); m_stackDump = SerializeHelper::deserializeString(buffer, flusher); } @@ -117,7 +117,7 @@ String Status::toString() const void Status::toString(StringBuilder buffer, int indentLevel) const { *buffer += "Status [type="; - *buffer += StatusTypeName[m_type]; + *buffer += StatusTypeName[m_statusType]; if (!m_message.empty()) { *buffer += ", message="; diff --git a/pvDataApp/misc/status.h b/pvDataApp/misc/status.h index 706b430..40d27ee 100644 --- a/pvDataApp/misc/status.h +++ b/pvDataApp/misc/status.h @@ -98,7 +98,7 @@ namespace epics { namespace pvData { static epics::pvData::String m_emptyString; - StatusType m_type; + StatusType m_statusType; String m_message; String m_stackDump; }; diff --git a/pvDataApp/pv/pvIntrospect.h b/pvDataApp/pv/pvIntrospect.h index 006f4dd..1667a60 100644 --- a/pvDataApp/pv/pvIntrospect.h +++ b/pvDataApp/pv/pvIntrospect.h @@ -191,7 +191,7 @@ public: * Get the field type. * @return The type. */ - Type getType() const{return m_type;} + Type getType() const{return m_fieldType;} /** * Convert the scalarType to a string and add it to builder. * @param builder The string builder. @@ -218,7 +218,7 @@ protected: Field(String fieldName,Type type); private: String m_fieldName; - Type m_type; + Type m_fieldType; friend class StructureArray; friend class Structure;