diff --git a/src/copy/createRequest.cpp b/src/copy/createRequest.cpp index 6cc5d3e..37c9f0d 100644 --- a/src/copy/createRequest.cpp +++ b/src/copy/createRequest.cpp @@ -30,7 +30,7 @@ static FieldCreatePtr fieldCreate = getFieldCreate(); struct CreateRequestImpl { - struct Node + struct Node { string name; vector nodes; @@ -55,7 +55,7 @@ struct CreateRequestImpl { CreateRequestImpl() {} - + void removeBlanks(string& str) { diff --git a/src/factory/Compare.cpp b/src/factory/Compare.cpp index c38141f..1e53608 100644 --- a/src/factory/Compare.cpp +++ b/src/factory/Compare.cpp @@ -268,7 +268,7 @@ bool compareField(const PVUnion* left, const PVUnion* right) if(*ls!=*right->getUnion()) return false; - + if (ls->isVariant()) { const PVField::const_shared_pointer& lval = left->get(); diff --git a/src/factory/Convert.cpp b/src/factory/Convert.cpp index a7ed9f1..f8ec4a1 100644 --- a/src/factory/Convert.cpp +++ b/src/factory/Convert.cpp @@ -24,7 +24,7 @@ using std::tr1::static_pointer_cast; using std::size_t; using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { static std::vector split(string commaSeparatedList) { @@ -60,7 +60,7 @@ void Convert::getString(string *buf,PVField const *pvField,int /*indentLevel*/) size_t Convert::fromString(PVStructurePtr const &pvStructure, StringArray const & from, size_t fromStartIndex) { size_t processed = 0; - + PVFieldPtrArray const & fieldsData = pvStructure->getPVFields(); if (fieldsData.size() != 0) { size_t length = pvStructure->getStructure()->getNumberFields(); @@ -93,7 +93,7 @@ size_t Convert::fromString(PVStructurePtr const &pvStructure, StringArray const } } } - + return processed; } diff --git a/src/factory/FieldCreateFactory.cpp b/src/factory/FieldCreateFactory.cpp index 3ac4dac..0d696a9 100644 --- a/src/factory/FieldCreateFactory.cpp +++ b/src/factory/FieldCreateFactory.cpp @@ -1001,7 +1001,7 @@ FieldBuilderPtr FieldBuilder::begin(StructureConstPtr S) FieldBuilderPtr FieldBuilder::setId(string const & id) { this->id = id; - idSet = true; + idSet = true; return shared_from_this(); } @@ -1065,7 +1065,7 @@ FieldBuilderPtr FieldBuilder::addArray(string const & name, FieldConstPtr const msg << element->getType(); THROW_EXCEPTION2(std::invalid_argument, msg.str()); } - + return add(name, fld); } @@ -1100,7 +1100,7 @@ StructureConstPtr FieldBuilder::createStructure() { if (parentBuilder.get()) THROW_EXCEPTION2(std::runtime_error, "createStructure() called in nested FieldBuilder"); - + StructureConstPtr field(static_pointer_cast(createFieldInternal(structure))); reset(); return field; @@ -1110,7 +1110,7 @@ UnionConstPtr FieldBuilder::createUnion() { if (parentBuilder.get()) THROW_EXCEPTION2(std::runtime_error, "createUnion() called in nested FieldBuilder"); - + UnionConstPtr field(static_pointer_cast(createFieldInternal(union_))); reset(); return field; @@ -1178,7 +1178,7 @@ FieldBuilderPtr FieldBuilder::endNested() { if (!parentBuilder) THROW_EXCEPTION2(std::runtime_error, "FieldBuilder::endNested() can only be called to create nested fields"); - + FieldConstPtr nestedField = createFieldInternal(nestedClassToBuild); if(createNested) { @@ -1246,7 +1246,7 @@ ScalarArrayConstPtr FieldCreate::createScalarArray(ScalarType elementType) const strm << elementType; THROW_EXCEPTION2(std::invalid_argument, strm.str()); } - + return scalarArrays[elementType]; } @@ -1448,7 +1448,7 @@ static int decodeScalar(int8 code) pvUInt, // unsigned 32-bits pvULong // unsigned 64-bits }; - + static const int floatLUT[] = { -1, // reserved diff --git a/src/factory/PVArray.cpp b/src/factory/PVArray.cpp index c2cb04f..b7b6ab6 100644 --- a/src/factory/PVArray.cpp +++ b/src/factory/PVArray.cpp @@ -28,7 +28,7 @@ PVArray::PVArray(FieldConstPtr const & field) { capacityMutable = false; PVField::setImmutable(); - } + } bool PVArray::isCapacityMutable() const { diff --git a/src/factory/PVDataCreateFactory.cpp b/src/factory/PVDataCreateFactory.cpp index 0f019c0..ce6287b 100644 --- a/src/factory/PVDataCreateFactory.cpp +++ b/src/factory/PVDataCreateFactory.cpp @@ -169,7 +169,7 @@ void PVString::serialize(ByteBuffer *pbuffer, const size_t maxCount = length - offset; if (count > maxCount) count = maxCount; - + // write SerializeHelper::serializeSubstring(storage.value, offset, count, pbuffer, pflusher); } @@ -191,7 +191,7 @@ template PVValueArray::PVValueArray(ScalarArrayConstPtr const & scalarArray) :base_t(scalarArray) ,value() - + {} PVValueArray::PVValueArray(StructureArrayConstPtr const & structureArray) @@ -627,7 +627,7 @@ PVScalarArrayPtr PVDataCreate::createPVScalarArray( return PVScalarArrayPtr(new PVStringArray(scalarArray)); } throw std::logic_error("PVDataCreate::createPVScalarArray should never get here"); - + } PVScalarArrayPtr PVDataCreate::createPVScalarArray( diff --git a/src/factory/PVField.cpp b/src/factory/PVField.cpp index 5da743c..676e0bb 100644 --- a/src/factory/PVField.cpp +++ b/src/factory/PVField.cpp @@ -62,7 +62,7 @@ size_t PVField::getNumberFields() const void PVField::setImmutable() {immutable = true;} -void PVField::postPut() +void PVField::postPut() { if(postHandler) postHandler->postPut(); } diff --git a/src/factory/PVStructure.cpp b/src/factory/PVStructure.cpp index 2ee5800..ff14b81 100644 --- a/src/factory/PVStructure.cpp +++ b/src/factory/PVStructure.cpp @@ -168,7 +168,7 @@ PVFieldPtr PVStructure::getSubFieldImpl(const char *name, bool throws) const std::stringstream ss; ss << "Failed to get field: " << fullName << " (" << std::string(fullName, sep) << " not found)"; - throw std::runtime_error(ss.str()); + throw std::runtime_error(ss.str()); } else return PVFieldPtr(); @@ -184,7 +184,7 @@ PVFieldPtr PVStructure::getSubFieldImpl(const char *name, bool throws) const std::stringstream ss; ss << "Failed to get field: " << fullName << " (" << std::string(fullName, sep) - << " is not a structure)"; + << " is not a structure)"; throw std::runtime_error(ss.str()); } else diff --git a/src/factory/PVUnion.cpp b/src/factory/PVUnion.cpp index 400614a..a52687b 100644 --- a/src/factory/PVUnion.cpp +++ b/src/factory/PVUnion.cpp @@ -23,7 +23,7 @@ using std::size_t; using std::string; namespace epics { namespace pvData { - + #define PVUNION_UNDEFINED_INDEX -1 const int32 PVUnion::UNDEFINED_INDEX = PVUNION_UNDEFINED_INDEX; @@ -75,7 +75,7 @@ PVFieldPtr PVUnion::select(int32 index) return value; } - + PVFieldPtr PVUnion::select(string const & fieldName) { int32 index = variant ? -1 : static_cast(unionPtr->getFieldIndex(fieldName)); @@ -136,7 +136,7 @@ void PVUnion::serialize(ByteBuffer *pbuffer, SerializableControl *pflusher) cons // write selector value SerializeHelper::writeSize(selector, pbuffer, pflusher); // write value, no value for UNDEFINED_INDEX - if (selector != UNDEFINED_INDEX) + if (selector != UNDEFINED_INDEX) value->serialize(pbuffer, pflusher); } } @@ -191,7 +191,7 @@ std::ostream& PVUnion::dumpValue(std::ostream& o) const o << format::indent() << fieldField->getField()->getID() << ' ' << fieldField->getFieldName() << ' ' << *(fieldField.get()) << std::endl; else o << *(fieldField.get()); - } + } } return o; } diff --git a/src/factory/StandardField.cpp b/src/factory/StandardField.cpp index 20cbc8c..49b4c90 100644 --- a/src/factory/StandardField.cpp +++ b/src/factory/StandardField.cpp @@ -21,7 +21,7 @@ using std::tr1::static_pointer_cast; using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { static StructureConstPtr buildValueAlarm(ScalarType vtype) @@ -157,7 +157,7 @@ StructureConstPtr StandardField::createProperties(string id,FieldConstPtr field, if(first->getType()==epics::pvData::scalar && second->getType()==epics::pvData::scalarArray) { ScalarConstPtr scalarFirst = static_pointer_cast(first); - ScalarArrayConstPtr scalarArraySecond = + ScalarArrayConstPtr scalarArraySecond = static_pointer_cast(second); if(scalarFirst->getScalarType()==pvInt && scalarArraySecond->getElementType()==pvString) { diff --git a/src/factory/StandardPVField.cpp b/src/factory/StandardPVField.cpp index 0677646..95e499f 100644 --- a/src/factory/StandardPVField.cpp +++ b/src/factory/StandardPVField.cpp @@ -20,7 +20,7 @@ using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { StandardPVField::StandardPVField() : standardField(getStandardField()), diff --git a/src/factory/TypeFunc.cpp b/src/factory/TypeFunc.cpp index bd8fa4b..9816fa1 100644 --- a/src/factory/TypeFunc.cpp +++ b/src/factory/TypeFunc.cpp @@ -59,7 +59,7 @@ namespace ScalarTypeFunc { if(type>=pvBoolean && type<=pvDouble) return true; return false; } - + static const char* names[] = { "boolean", "byte", "short", "int", "long", diff --git a/src/factory/pvSubArrayCopy.cpp b/src/factory/pvSubArrayCopy.cpp index 23a0446..a472bc1 100644 --- a/src/factory/pvSubArrayCopy.cpp +++ b/src/factory/pvSubArrayCopy.cpp @@ -17,7 +17,7 @@ using std::cout; using std::endl; using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { template void copy( diff --git a/src/misc/bitSet.cpp b/src/misc/bitSet.cpp index 0fa972e..d53aaeb 100644 --- a/src/misc/bitSet.cpp +++ b/src/misc/bitSet.cpp @@ -42,12 +42,12 @@ #define CHECK_POST() assert(words.empty() || words.back()!=0) namespace epics { namespace pvData { - + BitSet::shared_pointer BitSet::create(uint32 nbits) { return BitSet::shared_pointer(new BitSet(nbits)); } - + BitSet::BitSet() {} BitSet::BitSet(uint32 nbits) @@ -327,7 +327,7 @@ namespace epics { namespace pvData { SerializeHelper::writeSize(len, buffer, flusher); flusher->ensureBuffer(len); - n = len / 8; + n = len / 8; for (uint32 i = 0; i < n; i++) buffer->putLong(words[i]); diff --git a/src/misc/event.cpp b/src/misc/event.cpp index e802afe..0f47384 100644 --- a/src/misc/event.cpp +++ b/src/misc/event.cpp @@ -27,7 +27,7 @@ using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { Event::~Event() { diff --git a/src/misc/status.cpp b/src/misc/status.cpp index 6f09d50..0edd0f3 100644 --- a/src/misc/status.cpp +++ b/src/misc/status.cpp @@ -32,7 +32,7 @@ Status::Status(StatusType type, string const & message, string const & stackDump if (type == STATUSTYPE_OK) throw std::invalid_argument("type == STATUSTYPE_OK"); } - + void Status::maximize(const Status& o) { if(m_statusType < o.m_statusType) { @@ -57,7 +57,7 @@ void Status::serialize(ByteBuffer *buffer, SerializableControl *flusher) const SerializeHelper::serializeString(m_stackDump, buffer, flusher); } } - + void Status::deserialize(ByteBuffer *buffer, DeserializableControl *flusher) { flusher->ensureData(1); diff --git a/src/misc/timer.cpp b/src/misc/timer.cpp index ae8dcb1..14a207b 100644 --- a/src/misc/timer.cpp +++ b/src/misc/timer.cpp @@ -19,7 +19,7 @@ using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { TimerCallback::TimerCallback() : period(0.0), diff --git a/src/misc/typeCast.cpp b/src/misc/typeCast.cpp index cc9f54d..8ae3688 100644 --- a/src/misc/typeCast.cpp +++ b/src/misc/typeCast.cpp @@ -30,9 +30,9 @@ static void castVTyped(size_t count, void *draw, const void *sraw) { TO *dest=(TO*)draw; const FROM *src=(FROM*)sraw; - + //std::transform(src, src+count, dest, castUnsafe); - + try { for(size_t i=0; i(src[i]); diff --git a/src/property/alarm.cpp b/src/property/alarm.cpp index 27e3477..b79bad7 100644 --- a/src/property/alarm.cpp +++ b/src/property/alarm.cpp @@ -20,7 +20,7 @@ using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { AlarmSeverity AlarmSeverityFunc::getSeverity(int value) { diff --git a/src/property/pvAlarm.cpp b/src/property/pvAlarm.cpp index 1361ec8..213d4d0 100644 --- a/src/property/pvAlarm.cpp +++ b/src/property/pvAlarm.cpp @@ -18,7 +18,7 @@ using std::tr1::static_pointer_cast; using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { string PVAlarm::noAlarmFound("No alarm structure found"); string PVAlarm::notAttached("Not attached to an alarm structure"); diff --git a/src/property/pvControl.cpp b/src/property/pvControl.cpp index f745b1a..be023e1 100644 --- a/src/property/pvControl.cpp +++ b/src/property/pvControl.cpp @@ -15,7 +15,7 @@ #include #include -namespace epics { namespace pvData { +namespace epics { namespace pvData { using std::tr1::static_pointer_cast; using std::string; diff --git a/src/property/pvDisplay.cpp b/src/property/pvDisplay.cpp index 1205262..0027cb7 100644 --- a/src/property/pvDisplay.cpp +++ b/src/property/pvDisplay.cpp @@ -18,7 +18,7 @@ using std::tr1::static_pointer_cast; using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { string PVDisplay::noDisplayFound("No display structure found"); string PVDisplay::notAttached("Not attached to an display structure"); diff --git a/src/property/pvEnumerated.cpp b/src/property/pvEnumerated.cpp index 91fa55d..5aa61d0 100644 --- a/src/property/pvEnumerated.cpp +++ b/src/property/pvEnumerated.cpp @@ -18,7 +18,7 @@ using std::tr1::static_pointer_cast; using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { string PVEnumerated::notFound("No enumerated structure found"); string PVEnumerated::notAttached("Not attached to an enumerated structure"); diff --git a/src/property/pvTimeStamp.cpp b/src/property/pvTimeStamp.cpp index 646aae0..07976bf 100644 --- a/src/property/pvTimeStamp.cpp +++ b/src/property/pvTimeStamp.cpp @@ -18,7 +18,7 @@ using std::tr1::static_pointer_cast; using std::string; -namespace epics { namespace pvData { +namespace epics { namespace pvData { string PVTimeStamp::noTimeStamp("No timeStamp structure found"); string PVTimeStamp::notAttached("Not attached to a timeStamp structure"); @@ -93,5 +93,5 @@ bool PVTimeStamp::set(TimeStamp const & timeStamp) } return returnValue; } - + }} diff --git a/src/property/timeStamp.cpp b/src/property/timeStamp.cpp index 7982393..57e4c4c 100644 --- a/src/property/timeStamp.cpp +++ b/src/property/timeStamp.cpp @@ -19,7 +19,7 @@ #include #include -namespace epics { namespace pvData { +namespace epics { namespace pvData { const int32 milliSecPerSec = 1000; const int32 microSecPerSec = 1000000; diff --git a/src/pvMisc/bitSetUtil.cpp b/src/pvMisc/bitSetUtil.cpp index d9d86b5..e4b8394 100644 --- a/src/pvMisc/bitSetUtil.cpp +++ b/src/pvMisc/bitSetUtil.cpp @@ -72,7 +72,7 @@ static bool checkBitSetPVField( bool BitSetUtil::compress(BitSetPtr const &bitSet,PVStructurePtr const &pvStructure) { - return checkBitSetPVField(pvStructure,bitSet,0); + return checkBitSetPVField(pvStructure,bitSet,0); } }} diff --git a/testApp/misc/testBitSet.cpp b/testApp/misc/testBitSet.cpp index ff358f0..dbecfaf 100644 --- a/testApp/misc/testBitSet.cpp +++ b/testApp/misc/testBitSet.cpp @@ -152,7 +152,7 @@ static void testOperators() b2.set(256); b1 ^= b2; testOk1((b1.cardinality() == 2 && b1.get(1) == true && b1.get(256) == true)); - + testDiag("assign"); testOk1(b1 != b2); diff --git a/testApp/misc/testEvent.cpp b/testApp/misc/testEvent.cpp index ee52877..4fdf109 100644 --- a/testApp/misc/testEvent.cpp +++ b/testApp/misc/testEvent.cpp @@ -47,4 +47,4 @@ MAIN(testEvent) testBasicEvent(); return testDone(); } - + diff --git a/testApp/misc/testOverrunBitSet.cpp b/testApp/misc/testOverrunBitSet.cpp index c20c532..6407f99 100644 --- a/testApp/misc/testOverrunBitSet.cpp +++ b/testApp/misc/testOverrunBitSet.cpp @@ -81,7 +81,7 @@ void test() testOk1(userOverrunBitSet->get(secondsOffset)); testOk1(userOverrunBitSet->get(nanosecondsOffset)); testOk1(userOverrunBitSet->get(userTagOffset)); - + BitSetUtil::compress(userChangeBitSet,pvStructure); BitSetUtil::compress(userOverrunBitSet,pvStructure); testOk1(userChangeBitSet->cardinality()==4); diff --git a/testApp/misc/testSerialization.cpp b/testApp/misc/testSerialization.cpp index 6845452..10f2f62 100644 --- a/testApp/misc/testSerialization.cpp +++ b/testApp/misc/testSerialization.cpp @@ -70,7 +70,7 @@ public: virtual void alignBuffer(std::size_t alignment) { buffer->align(alignment); } - + virtual bool directSerialize(ByteBuffer* /*existingBuffer*/, const char* /*toSerialize*/, std::size_t /*elementCount*/, std::size_t /*elementSize*/) { @@ -169,25 +169,25 @@ void testEquals() { PVStructureArrayPtr structureArray1 = factory->createPVStructureArray(getFieldCreate()->createStructureArray(structure1->getStructure())); PVStructureArrayPtr structureArray2 = factory->createPVStructureArray(getFieldCreate()->createStructureArray(structure2->getStructure())); testOk1((*structureArray1)==(*structureArray2)); - + // variant union PVUnionPtr variantUnion1 = factory->createPVVariantUnion(); PVUnionPtr variantUnion2 = factory->createPVVariantUnion(); testOk1((*variantUnion1)==(*variantUnion2)); - + variantUnion1->set(structure1); variantUnion2->set(structure1); testOk1((*variantUnion1)==(*variantUnion2)); variantUnion2->set(structureArray1); testOk1((*variantUnion1)!=(*variantUnion2)); - + // variant union array PVUnionArrayPtr variantUnionArray1 = factory->createPVVariantUnionArray(); PVUnionArrayPtr variantUnionArray2 = factory->createPVVariantUnionArray(); testOk1((*variantUnionArray1)==(*variantUnionArray2)); - // union + // union UnionConstPtr punion = getFieldCreate()->createFieldBuilder()-> add("double", pvDouble)-> add("double2", pvDouble)-> @@ -201,11 +201,11 @@ void testEquals() { PVUnionPtr union1 = factory->createPVUnion(punion); PVUnionPtr union2 = factory->createPVUnion(punion); testOk1((*union1)==(*union2)); - + union1->select("double")->put(1.2); union2->select("double")->put(1.2); testOk1((*union1)==(*union2)); - + union2->select("double")->put(2.2); testOk1((*union1)!=(*union2)); @@ -216,7 +216,7 @@ void testEquals() { testOk1((*union1)!=(*union2)); testOk1((*union1)!=(*variantUnion2)); - + PVUnionArrayPtr unionArray1 = factory->createPVUnionArray(getFieldCreate()->createUnionArray(punion)); PVUnionArrayPtr unionArray2 = factory->createPVUnionArray(getFieldCreate()->createUnionArray(punion)); testOk1((*unionArray1)==(*unionArray2)); @@ -439,17 +439,17 @@ void testUnion() { PVUnionArrayPtr variantArray = factory->createPVVariantUnionArray(); testOk1(variantArray.get()!=NULL); - + variantArray->setLength(6); PVUnionArray::svector data; PVUnionPtr u = factory->createPVVariantUnion(); data.push_back(u); - + u = factory->createPVVariantUnion(); u->set(factory->createPVStructure(getStandardField()->timeStamp())); data.push_back(u); - + u = factory->createPVVariantUnion(); u->set(factory->createPVStructure(getStandardField()->control())); data.push_back(u); @@ -458,16 +458,16 @@ void testUnion() { variantArray->replace(freeze(data)); serializationTest(variantArray); - + testDiag("\tVariant union test"); - + UnionConstPtr punion = getFieldCreate()->createFieldBuilder()-> add("doubleValue", pvDouble)-> add("intValue", pvInt)-> createUnion(); - + u = factory->createPVUnion(punion); - testOk1(NULL!=u.get()); + testOk1(NULL!=u.get()); // null union test testOk1(NULL==u->get().get()); @@ -480,13 +480,13 @@ void testUnion() { testOk1(0 == u->getSelectedIndex()); testOk1("doubleValue" == u->getSelectedFieldName()); serializationTest(u); - + u->select("intValue")->put(543); testOk1(543 == u->get()->get()); testOk1(1 == u->getSelectedIndex()); testOk1("intValue" == u->getSelectedFieldName()); serializationTest(u); - + u->select(1)->put(5432); testOk1(5432 == u->get()->get()); serializationTest(u); @@ -496,12 +496,12 @@ void testUnion() { testOk1(PVUnion::UNDEFINED_INDEX == u->getSelectedIndex()); testOk1("" == u->getSelectedFieldName()); serializationTest(u); - + u->set("doubleValue", doubleValue); testOk1(doubleValue.get() == u->get().get()); testOk1(0 == u->getSelectedIndex()); serializationTest(u); - + try { u->set(1, doubleValue); @@ -523,7 +523,7 @@ void testUnion() { // expected testPass("PVUnion.select(int32) index out of bounds test"); } - + try { u->select(-2); @@ -545,22 +545,22 @@ void testUnion() { // expected testPass("PVUnion.set(int32, PVFieldPtr const&) index out of bounds test"); } - + testDiag("\tUnion array test"); PVUnionArrayPtr unionArray = factory->createPVUnionArray(getFieldCreate()->createUnionArray(punion)); testOk1(unionArray.get()!=NULL); - + unionArray->setLength(6); data.clear(); u = factory->createPVUnion(punion); data.push_back(u); - + u = factory->createPVUnion(punion); u->select(0)->put(12); data.push_back(u); - + u = factory->createPVUnion(punion); u->select(1)->put(421); data.push_back(u); @@ -569,7 +569,7 @@ void testUnion() { unionArray->replace(freeze(data)); serializationTest(unionArray); - + } void testStructureArray() { @@ -677,11 +677,11 @@ void testIntrospectionSerialization() // variant union UnionConstPtr variant = factory->createVariantUnion(); serializationFieldTest(variant); - + // variant array union UnionArrayConstPtr variantArray = factory->createVariantUnionArray(); serializationFieldTest(variantArray); - + // union UnionConstPtr punion = factory->createFieldBuilder()-> add("double", pvDouble)-> @@ -693,7 +693,7 @@ void testIntrospectionSerialization() addArray("intArray", pvInt)-> createUnion(); serializationFieldTest(punion); - + // union array UnionArrayConstPtr punionArray = factory->createUnionArray(punion); serializationFieldTest(punionArray); @@ -877,7 +877,7 @@ MAIN(testSerialization) { testStructure(); testStructureId(); testStructureArray(); - + testUnion(); testArraySizeType(); diff --git a/testApp/misc/testSharedVector.cpp b/testApp/misc/testSharedVector.cpp index e3f0649..b0d5416 100644 --- a/testApp/misc/testSharedVector.cpp +++ b/testApp/misc/testSharedVector.cpp @@ -522,7 +522,7 @@ void testICE() testOk1(B.size()==6); testOk1(A.data()!=check); testOk1(B.data()==check); - + D = B; // create second const reference // clears D, but reference to B diff --git a/testApp/property/testProperty.cpp b/testApp/property/testProperty.cpp index fd74d7d..5f03f68 100644 --- a/testApp/property/testProperty.cpp +++ b/testApp/property/testProperty.cpp @@ -64,7 +64,7 @@ static void testAlarm() { testDiag("testAlarm\n"); Alarm alarm; - PVAlarm pvAlarm; + PVAlarm pvAlarm; bool result; PVFieldPtr pvField = doubleRecord->getSubField(string("alarm")); if(pvField.get()==NULL) { @@ -93,7 +93,7 @@ static void testTimeStamp() { testDiag("testTimeStamp\n"); TimeStamp timeStamp; - PVTimeStamp pvTimeStamp; + PVTimeStamp pvTimeStamp; bool result; PVFieldPtr pvField = doubleRecord->getSubField(string("timeStamp")); if(pvField.get()==NULL) { @@ -132,7 +132,7 @@ static void testControl() { testDiag("testControl\n"); Control control; - PVControl pvControl; + PVControl pvControl; bool result; PVFieldPtr pvField = doubleRecord->getSubField(string("control")); if(pvField.get()==NULL) { @@ -159,7 +159,7 @@ static void testDisplay() { testDiag("testDisplay\n"); Display display; - PVDisplay pvDisplay; + PVDisplay pvDisplay; bool result; PVFieldPtr pvField = doubleRecord->getSubField(string("display")); if(pvField.get()==NULL) { @@ -191,7 +191,7 @@ static void testDisplay() static void testEnumerated() { testDiag("testEnumerated\n"); - PVEnumerated pvEnumerated; + PVEnumerated pvEnumerated; bool result; PVFieldPtr pvField = enumeratedRecord->getSubField(string("value")); if(pvField.get()==NULL) { diff --git a/testApp/pv/testBitSetUtil.cpp b/testApp/pv/testBitSetUtil.cpp index ab9c675..bdd275e 100644 --- a/testApp/pv/testBitSetUtil.cpp +++ b/testApp/pv/testBitSetUtil.cpp @@ -31,7 +31,7 @@ static StandardPVFieldPtr standardPVField; static void test() { std::ostringstream oss; - + testDiag("\ntestBitSetUtil\n"); StringArray fieldNames; PVFieldPtrArray pvFields; diff --git a/testApp/pv/testFieldBuilder.cpp b/testApp/pv/testFieldBuilder.cpp index b61e40d..c40a691 100644 --- a/testApp/pv/testFieldBuilder.cpp +++ b/testApp/pv/testFieldBuilder.cpp @@ -34,7 +34,7 @@ void test_structure() FieldCreatePtr fieldCreate = getFieldCreate(); FieldBuilderPtr fb = fieldCreate->createFieldBuilder(); - + // test with simple (non-nested) structure std::string ID = "testStructureID"; StructureConstPtr s = fb->setId(ID)-> @@ -44,7 +44,7 @@ void test_structure() testOk1(s.get() != 0); testOk1(ID == s->getID()); testOk1(2 == s->getFields().size()); - + FieldConstPtr f0 = s->getField(0); testOk1(scalar == f0->getType()); testOk1("double" == s->getFieldName(0)); @@ -54,13 +54,13 @@ void test_structure() testOk1(scalarArray == f1->getType()); testOk1("intArray" == s->getFieldName(1)); testOk(pvInt == std::tr1::static_pointer_cast(f1)->getElementType(), "f1 element type == int"); - + // test reuse with empty structure StructureConstPtr emptyStructure = fb->createStructure(); testOk1(emptyStructure.get() != 0); testOk1(Structure::DEFAULT_ID == emptyStructure->getID()); testOk1(0 == emptyStructure->getFields().size()); - + // test add/addArray with Field StructureConstPtr s2 = fb->add("s", s)-> addArray("sArray", s)-> @@ -137,7 +137,7 @@ void test_nestedStructure() testDiag("Test test_nestedStructure()"); FieldCreatePtr fieldCreate = getFieldCreate(); - + std::string NESTED_ID = "nestedID"; StructureConstPtr s = fieldCreate->createFieldBuilder()-> add("double", pvDouble)-> @@ -163,21 +163,21 @@ void test_nestedStructure() { StructureConstPtr s2 = std::tr1::static_pointer_cast(f1); - + testOk1(s2.get() != 0); testOk1(NESTED_ID == s2->getID()); testOk1(2 == s2->getFields().size()); - + FieldConstPtr f20 = s2->getField(0); testOk1(scalar == f20->getType()); testOk1("short" == s2->getFieldName(0)); testOk(pvShort == std::tr1::static_pointer_cast(f20)->getScalarType(), "f20 scalar type == short"); - + FieldConstPtr f21 = s2->getField(1); testOk1(scalar == f21->getType()); testOk1("long" == s2->getFieldName(1)); testOk(pvLong == std::tr1::static_pointer_cast(f21)->getScalarType(), "f21 element type == long"); - + } FieldConstPtr f2 = s->getField(2); @@ -185,15 +185,15 @@ void test_nestedStructure() testOk1("intArray" == s->getFieldName(2)); testOk(pvInt == std::tr1::static_pointer_cast(f2)->getElementType(), "f2 element type == int"); -} - +} + void test_nestedStructureArray() { testDiag("Test test_nestedStructureArray()"); FieldCreatePtr fieldCreate = getFieldCreate(); - + std::string NESTED_ID = "nestedID"; StructureConstPtr s = fieldCreate->createFieldBuilder()-> add("double", pvDouble)-> @@ -219,21 +219,21 @@ void test_nestedStructureArray() { StructureConstPtr s2 = std::tr1::static_pointer_cast(f1)->getStructure(); - + testOk1(s2.get() != 0); testOk1(NESTED_ID == s2->getID()); testOk1(2 == s2->getFields().size()); - + FieldConstPtr f20 = s2->getField(0); testOk1(scalar == f20->getType()); testOk1("short" == s2->getFieldName(0)); testOk(pvShort == std::tr1::static_pointer_cast(f20)->getScalarType(), "f20 scalar type == short"); - + FieldConstPtr f21 = s2->getField(1); testOk1(scalar == f21->getType()); testOk1("long" == s2->getFieldName(1)); testOk(pvLong == std::tr1::static_pointer_cast(f21)->getScalarType(), "f21 element type == long"); - + } FieldConstPtr f2 = s->getField(2); diff --git a/testApp/pv/testIntrospect.cpp b/testApp/pv/testIntrospect.cpp index c1d1677..09a60f6 100644 --- a/testApp/pv/testIntrospect.cpp +++ b/testApp/pv/testIntrospect.cpp @@ -32,7 +32,7 @@ static void testScalarCommon(ScalarType stype, ScalarConstPtr pscalar = fieldCreate->createScalar(stype); Type type = pscalar->getType(); testOk1(type==scalar); - + std::ostringstream oss; oss << type; testOk1(oss.str().compare("scalar")==0); @@ -307,17 +307,17 @@ static void testUnion() testOk1(union1arr->getUnion()==union1); testOk1(union1arr->getID()=="union[]"); - + UnionConstPtr variantUnion1 = fieldCreate->createVariantUnion(); testOk1(variantUnion1->getNumberFields()==0); testOk1(variantUnion1->getID() == Union::ANY_ID); - + UnionArrayConstPtr variantUnion1arr = fieldCreate->createVariantUnionArray(); testOk1(variantUnion1arr->getUnion()==variantUnion1); testOk1(variantUnion1arr->getID()=="any[]"); - + } static void testBoundedString() diff --git a/testApp/pv/testOperators.cpp b/testApp/pv/testOperators.cpp index e91d761..347e416 100644 --- a/testApp/pv/testOperators.cpp +++ b/testApp/pv/testOperators.cpp @@ -72,7 +72,7 @@ MAIN(testOperators) pvStructure = standardPVField->scalarArray(pvDouble,"alarm,timeStamp"); std::cout << *pvStructure << std::endl; - + PVDoubleArray::svector values(3); values[0] = 1.1; values[1] = 2.2; values[2] = 3.3; PVDoubleArrayPtr darray = pvStructure->getSubField("value"); diff --git a/testApp/pv/testPVData.cpp b/testApp/pv/testPVData.cpp index fd468c4..1483151 100644 --- a/testApp/pv/testPVData.cpp +++ b/testApp/pv/testPVData.cpp @@ -81,7 +81,7 @@ static void testCreatePVStructure() pvFields.push_back(pv1); PVStructurePtr pvParent = pvDataCreate->createPVStructure( fieldNames,pvFields); - + std::cout << "testCreatePVStructure PASSED" << std::endl; } @@ -344,7 +344,7 @@ static void testPVScalar() testPVScalarWithProperties(string("float"),pvFloat); testPVScalarWithProperties(string("double"),pvDouble); testPVScalarWithProperties(string("string"),pvString); - + std::cout << "testPVScalar PASSED" << std::endl; } @@ -386,7 +386,7 @@ static void testScalarArray() } static void testRequest() -{ +{ StringArray nullNames; FieldConstPtrArray nullFields; StringArray optionNames(1); diff --git a/testApp/pv/testPVStructureArray.cpp b/testApp/pv/testPVStructureArray.cpp index 153b557..30c5b96 100644 --- a/testApp/pv/testPVStructureArray.cpp +++ b/testApp/pv/testPVStructureArray.cpp @@ -113,9 +113,9 @@ static void testCompress() static void testRemove() { testDiag("Test structure array remove"); - + PVStructureArray::svector contents(10); - + for(size_t i=0; ialarm()->build();