diff --git a/documentation/pvDataCpp.html b/documentation/pvDataCpp.html index 48945d3..0edca05 100644 --- a/documentation/pvDataCpp.html +++ b/documentation/pvDataCpp.html @@ -9,178 +9,161 @@

EPICS pvDataCPP
-Overview
-2011.01.28

+2011.01.31

TODO

-CONTENTS + +

CONTENTS


-

Introduction

+

Introduction


This product is available via the open source @@ -283,7 +266,7 @@ pvDataApp:


-

PVData Meta Language

+

PVData Meta Language


This section describes a meta language for describing pvData. Currently @@ -291,7 +274,7 @@ there are no plans for a parser for the meta language. It is used for documentation. Also the toString introspection and data methods described below present data in this format.

-

Definition

+

Definition

PVData supports structured data. All data appears as a top level structure. A structure has an ordered set of fields where each field has a [] White space is permitted surrounding each comma.

-

Example

+

Example

Define the following top level structure:

structure timeStamp
@@ -439,10 +422,10 @@ structure[] structureArrayExample
         double y 10.0

-

PV - User Description

+

PV - User Description


-

Overview

+

Overview

Directory pvDataApp/pv has header files that completely describe pvData. The implementation is provided in directory pvDataApp/factory. Test programs @@ -476,7 +459,7 @@ converting and copying data between fields.

alarm, etc. -

pvType

+

pvType

This provides C/C++ definitions for the pvData primitive types: boolean, byte, short, int, long, float, double, and string. Because pvData is network @@ -534,7 +517,7 @@ typedef std::string * StringBuilder;

A typedef is provided for an array of each of the primitive types.
-

Process Variable Reflection

+

Process Variable Reflection

This subsection describes pvIntrospect.h

@@ -549,7 +532,7 @@ especially important for arrays and structures so that a client can discover the type without requiring that a large data array or structure be transported over the network.

-

Type Description

+

Type Description

Types are defined as:

enum Type {
@@ -640,7 +623,7 @@ style="font-family: courier;">ScalarType

Convert the scalar type to a string.
-

Reflection Description

+

Reflection Description

This section describes the reflection interfaces which provide the following:

@@ -869,7 +852,7 @@ methods:

structure->incReferenceCount() must be called before this method. -

Standard Fields

+

Standard Fields

The file standardField.h has a class description for creating or sharing Field objects for standard fields. For each type of standard object two methods @@ -1007,12 +990,12 @@ extern StandardField * getStandardField();

the section on Properties for a description of how these are defined. -

PVField - Data Interfaces

+

PVField - Data Interfaces

This section defines the Java Interfaces for accessing the data within a PV record.

-

PVField

+

PVField

PVField is the base interface for accessing data. A data structure consists of a top level PVStructure. Every field of every structure of every top level @@ -1119,7 +1102,7 @@ are:

. -

PVAuxInfo

+

PVAuxInfo

AuxInfo (Auxillary Information) is information about a field that is application specific. It will not be available outside the application that @@ -1156,7 +1139,7 @@ private:

Print all the auxInfos
-

PVScalar and extensions

+

PVScalar and extensions

class PVScalar : public PVField {
 public:
     virtual ~PVScalar();
@@ -1165,7 +1148,7 @@ protected:
     PVScalar(PVStructure *parent,ScalarConstPtr scalar);
 };
-
Primitive PVField types
+
Primitive PVField types

The interfaces for primitive data types are:

class PVBoolean : public PVScalar {
@@ -1254,7 +1237,7 @@ protected:
 private:
 };
-

PVArray and Extensions

+

PVArray and Extensions

PVArray is the base interface for all the other PV Array interfaces. It extends PVField and provides the @@ -1300,7 +1283,7 @@ private:

Specify if the capacity can be changed.
-
PVArray Extensions
+
PVArray Extensions

The interface for each array type has get and put methods which have the same arguments except for the data type. For example PVDoubleArray is:

@@ -1387,7 +1370,7 @@ that directly access the internal data array of a PVArray. This can be required for minimizing CPU overhead. In this case it is the applications responsibility to coordinate access to the array.

-
Complete set of PVArray Extensions
+
Complete set of PVArray Extensions
class PVScalarArray : public PVArray {
 public:
     virtual ~PVScalarArray();
@@ -1564,7 +1547,7 @@ protected:
 private:
 };
-

PVStructure

+

PVStructure

The interface for a structure is:

class PVStructure : public PVField,public BitSetSerializable {
@@ -1677,7 +1660,7 @@ private:
     
Specify the structure that this structure extends.
-

PVStructureArray

+

PVStructureArray

The interface for an array of structures is:

class StructureArrayData {
@@ -1693,6 +1676,7 @@ public:
     virtual void setCapacity(int capacity) = 0;
     virtual int append(int number) = 0;
     virtual bool remove(int offset,int number) = 0;
+    virtual void compress() = 0;
     virtual int get(int offset, int length,
         StructureArrayData *data) = 0;
     virtual int put(int offset,int length,
@@ -1715,13 +1699,17 @@ private:
   
getStructureArray
Get the introspection interface shared by each element.
append
-
Create new elements and append them to the end of the array. - It returns the index of the first new element.
+
Create new elements and append them to the end of the array. It returns + the index of the first new element.
remove
-
Remove the specfied set of elements. It returns (false,true) - if the elements (were not, were) removed. - It will not removed any elements unless all requested elements - exist or are null.
+
Remove the specfied set of elements. It returns (false,true) if the + elements (were not, were) removed. It will not removed any elements + unless all requested elements exist or are null. Note that this deletes + the element and sets the array element to null. It does not change the + array capacity.
+
compres
+
This moves all null elements and then changes the array capacity. When + done there are no null elements.

The other methods are similar to the methods for other array types.

@@ -1745,7 +1733,7 @@ introspection interface must be used. The following shows an example:

Note that incReferenceCount is called before each element is created.

-

PVDataCreate

+

PVDataCreate

PVDataCreate is an interface that provides methods that create PVField interfaces. A factory is provided that creates PVDataCreate.

@@ -1827,7 +1815,7 @@ extern PVDataCreate * getPVDataCreate();
before calling this method. -

Standard Data Fields

+

Standard Data Fields

A class StandardPVField has methods for creating standard data fields. Like class StandardField it has two forms of the methods which create a field, one @@ -1882,7 +1870,7 @@ public: PVStructure * powerSupply(PVStructure *parent); };

-

Convert

+

Convert

NOTE about copying immutable array fields. If an entire immutable array field is copied to another array that has the same elementType, both offsets @@ -1996,18 +1984,18 @@ for code that implements toString It generates a newline and inserts blanks at the beginning of the newline.


-

Namespace, Typedefs, and Memory +

Namespace, Typedefs, and Memory Management


-

Namespace

+

Namespace

All code in project pvDataCPP appears in namespace:

namespace epics { namespace pvData {
      // ...
 }}
-

typedefs

+

typedefs

As described above pvType.h provides C++ typdefs for the pvData primitive types.

@@ -2059,9 +2047,9 @@ typedef String * StringArray;
An array of the specified type NOT a pointer to the type.
-

Memory Managemment

+

Memory Managemment

-

NoDefaultMethods

+

NoDefaultMethods

Any class that does not want the compiler to generate default methods can privately extend the following class which is defined in file @@ -2077,19 +2065,19 @@ private: NoDefaultMethods & operator=(const NoDefaultMethods &); }; -

PVData introspection objects

+

PVData introspection objects

Introspection objects are meant to be shared. The constructors and destructors are all private or protected so that an introspection object can only be created via a call to one of the FieldCreate methods described abofe. -The introspection implementation, together with AbstractPVField keeps reference -counts and automatically deletes objects when the reference count goes to 0. -Code that uses introspection objects always accesses introspection objects via -pointers never via references or direct access to the object. When an -introspection interface is created via one of the methods of class FieldCreate -the reference count is set to 1. When any code wants to get an introspection -interface from an existing data object and use it for another data object, i.e. -share the interface, then incReferenceCount MUST be called.

+The introspection implementation, together with PVField keeps reference counts +and automatically deletes objects when the reference count goes to 0. Code that +uses introspection objects always accesses introspection objects via pointers +never via references or direct access to the object. When an introspection +interface is created via one of the methods of class FieldCreate the reference +count is set to 1. When any code wants to get an introspection interface from +an existing data object and use it for another data object, i.e. share the +interface, then incReferenceCount MUST be called.

The introspection destructors are all private. When code, normally ~PVField, is done using an intrispection interface it calls decReferenceCount. If the @@ -2097,20 +2085,20 @@ field is a structure then it is a recursive call. When the reference count for a field becomes 0 the field is deleted. Note than user code should never call decReferenceCount since the destructor for PVField calls it.

-

PVData data objects

+

PVData data objects

-

All PVData data objects must publically extend AbstractPVField, which does -not allow default methods but does have a virtual destructor. It is expected -that each data object is "owned" by some entity. For example a pvIOC (not -implemented) database will own all records and thus all PVData data objects in -the database. It is the ONLY entity that will create and destroy the data -objects. All other code only receives pointers to the data objects. Before a -record is deleted any code that is connected to a record is notified before the -record is deleted. After deletion all pointers to data in the record are -invalid. Similarly pvAccess creates and destroys PVData objects and notifies -clients before destroying PVData data objects.

+

All PVData data objects must publically extend PVField, which does not allow +default methods but does have a virtual destructor. It is expected that each +data object is "owned" by some entity. For example a pvIOC (not implemented) +database will own all records and thus all PVData data objects in the database. +It is the ONLY entity that will create and destroy the data objects. All other +code only receives pointers to the data objects. Before a record is deleted any +code that is connected to a record is notified before the record is deleted. +After deletion all pointers to data in the record are invalid. Similarly +pvAccess creates and destroys PVData objects and notifies clients before +destroying PVData data objects.

-

Other code in this project

+

Other code in this project

The classes in property, i.e. alarm, timeStamp, display, and control are all meant to be free copied and shared. They can be created on the stack. In most @@ -2121,10 +2109,10 @@ be extended. Thus they can only be created via "new" and must be destroyed via "delete".


-

Examples

+

Examples


-

Accessing PVData

+

Accessing PVData

Assume that code wants to print two fields from a PVStructure:

@@ -2152,7 +2140,7 @@ be extended. Thus they can only be created via "new" and must be destroyed via timeStampPV->toString(buf); } -

Creating PVData

+

Creating PVData

Example of creating a scalar field.

    PVDataCreate *pvDataCreate = getPVDataCreate();
@@ -2182,10 +2170,10 @@ and a timeStamp and alarm. Do it the easy way.

String("timeStamp,alarm"))

-

Property

+

Property


-

Definition of Property

+

Definition of Property

Only fields named "value" have properties. A record can have multiple value fields, which can appear in the top level structure of a record or in a @@ -2225,7 +2213,7 @@ structure powerSupplySimple powerSupplyValueStructure power powerSupplyValueStructure current -

Standard Properties

+

Standard Properties

The following field names have special meaning, i.e. support properties for general purpose clients.

@@ -2293,7 +2281,7 @@ examples are:

that support the PVData data model. For example a powerSupport record can have fields power, voltage, current that each support the PVData data model.

-

Overview of Property Support

+

Overview of Property Support

Except for enumerated, each property has two files: a property.h and a pvProperty.h . For example: timeStamp.h @@ -2322,7 +2310,7 @@ stack. For example the following is permitted:

... } -

timeStamp

+

timeStamp

A timeStamp is represented by the following structure

structure timeStamp
@@ -2348,7 +2336,7 @@ that can be attached to a time stamp pvData structure. It provides get and set
 methods to get/set a TimeStamp as defined by timeStamp.h

-

timeStamp.h

+

timeStamp.h

This provides

extern int32 milliSecPerSec;
@@ -2450,7 +2438,7 @@ execute. This is done as follows:

endTime.getCurrent(); double time = TimeStamp::diff(endTime,startTime);
-

pvTimeStamp.h

+

pvTimeStamp.h

class PVTimeStamp {
 public:
     PVTimeStamp();
@@ -2489,7 +2477,7 @@ public:
       thrown if not attached to a pvData structure. 
 
-

alarm

+

alarm

An alarm structure is defined as follows:

structure alarm
@@ -2511,7 +2499,7 @@ style="font-family: courier;">pvAlarm.h is a class that can be attached
 to a time stamp pvData structure. It provides get and set methods to get/set a
 Alarm as defined by alarm.h

-

alarm.h

+

alarm.h

enum AlarmSeverity {
  noAlarm,minorAlarm,majorAlarm,invalidAlarm
 };
@@ -2557,7 +2545,7 @@ public:
     
Set the severity.
-

pvAlarm.h

+

pvAlarm.h

class PVAlarm {
 public:
     PVAlarm() : pvSeverity(0),pvMessage(0) {}
@@ -2597,7 +2585,7 @@ public:
       if not attached to a pvData structure. 
 
 
-

control

+

control

Control information is represented by the following structure

structure control
@@ -2615,7 +2603,7 @@ attached to a time stamp pvData structure. It provides get and set methods to
 get/set a Control as defined by control.h

-

control.h

+

control.h

class Control {
 public:
     Control();
@@ -2640,7 +2628,7 @@ public:
     
Set the high limit.
-

pvControl.h

+

pvControl.h

class PVControl {
 public:
     PVControl();
@@ -2680,7 +2668,7 @@ public:
       thrown if not attached to a pvData structure. 
 
 
-

display

+

display

Display information is represented by the following structure

structure display
@@ -2701,7 +2689,7 @@ class that can be attached to a display pvData structure. It provides get and
 set methods to get/set a Diaplay as defined by diaplay.h

-

display.h

+

display.h

class Display {
 public:
     Display();
@@ -2744,7 +2732,7 @@ public:
     
Set the units.
-

pvDisplay.h

+

pvDisplay.h

class PVDisplay {
 public:
     PVDisplay()
@@ -2784,7 +2772,7 @@ public:
       thrown if not attached to a pvData structure. 
 
 
-

pvEnumerated

+

pvEnumerated

An enumerated structure is a structure that has fields:

structure
@@ -2851,90 +2839,45 @@ public:
 
 
-

PVData Abstract and Base Classes

+

PVData Factories


-

Overview

+

Directory factory has code that implements everything described by the files +in directory pv

-

Directory factory has code that implements everything described by the -include files in directory pv

+

TypeFunc.cpp implements the functions for the enums defined in +pvIntrospecct.h

-

Factories

+

FieldCreateFactory.cpp automatically creates a single instance of +FieldCreate and implements getFieldCreate.

-

FieldCreateFactory automatically creates a single instance of FieldCreate -and provides a method to get the interface.

+

PVDataCreateFactory.cpp automatically creates a single instance of +PVDataCreate and implements getPVDataCreate.

-

PVDataCreateFactory automatically creates a single instance of PVDataCreate -and provides a method to get the interface.

+

PVAuxInfoImpl.cpp implements auxInfo.

-

PVAuxInfoImpl implements auxInfo.

+

Convert.cpp automatically creates a single instance of Convert and +implements getConvert.

-

Convert automatically creates a single instance of Convert and provides a -method to get the interface.

- -

Abstract Classes for PVField

- -

AbstractPVField

- -

This is an abstract base class for implementing PVField interfaces. It MUST -be the base class for any class that extends PVField.

- -

AbstractPVScalar

- -

This is an abstract base class for implementing scalar data fields. It MUST -be the base class for any class that implements a scalar data field.

- -

AbstractPVArray

- -

This is an abstract base class for implementing array data fields. It MUST -be the base class for any class implements array data fields.

- -

AbstractPVScalarArray

- -

This is an abstract base class for implementing scalar array data fields. It -MUST be the base class for any class implements scalar array data fields.

- -

BasePVStructure

- -

BasePVStructure is a base class for any code that implements PVStructure. -Any code that implements PVStructure MUST extend this class.

- -

Base Classes For PVScalar

- -

For each scalar type there is a base class that implements it. The complete -list is:

+

The following are included by PVDataCreateFactory and implement the +corresponding class described in pvData.h:

-
BasePVBoolean
-
BasePVByte
-
BasePVShort
-
BasePVInt
-
BasePVLong
-
BasePVFloat
-
BasePVDouble
-
BasePVString
+
PVField.cpp
+
PVScalar.cpp
+
PVArray.cpp
+
PVScalarArray.cpp
+
PVStructure.cpp
-

Base Classes for PVArray

- -

For each scalar array type there is a base class that implements it. The -complete list is:

-
-
BasePVBooleanArray
-
BasePVByteArray
-
BasePVShortArray
-
BasePVIntArray
-
BasePVLongArray
-
BasePVFloatArray
-
BasePVDoubleArray
-
BasePVStringArray
-
BasePVStructureArray
-
+

There is a large set of files named "DefaultXXX.cpp" that implement each of +the other classes described in pvData.cpp. Each is included and used by +PVDataCreate.


-

Miscellanous Classes

+

Miscellanous Classes


-

Overview

+

Overview

This package provides utility code:

@@ -2982,7 +2925,7 @@ complete list is:

Note that directory testApp/misc has test code for all the classes in misc. The test code also can be used as examples.

-

BitSet

+

BitSet

This is adapted from the java.util.BitSet. bitSet.h is:

class BitSet /*: public Serializable*/ {
@@ -3076,7 +3019,7 @@ private:
     
Show the current values of the bitSet.
-

ByteBuffer

+

ByteBuffer

A ByteBuffer is used to serialize and deserialize primitive data. File byteBuffer.h is:

@@ -3116,7 +3059,7 @@ private:

x

-

Event

+

Event

This class provides coordinates activity between threads. One thread can wait for the event and the other signals the event.

@@ -3148,7 +3091,7 @@ private:
returns (false,true) if the event is (empty,full)
-

Exception

+

Exception

File epicsException.h describes:

class BaseException : public std::exception {
@@ -3166,7 +3109,7 @@ private:
 
 

x

-

Executor

+

Executor

An Executor is a thread that can execute commands. The user can request that a single command be executed.

@@ -3205,7 +3148,7 @@ execute.

nothing is done. -

Linked List

+

Linked List

LinkedList implements a double linked list that requires a user to allocate the nodes. It is more efficent that std::list. linkedList.h is a template that @@ -3309,7 +3252,7 @@ public:

Does the list contain the specified object?
-

Lock and Mutex

+

Lock and Mutex

lock.h is:

class Mutex  {
@@ -3362,9 +3305,9 @@ once. This can be implemented as follows:

// initialization }
-

Message Queue

+

Message Queue

-

Definitions

+

Definitions

class MessageNode {
 public:
     String getMessage() const;
@@ -3385,7 +3328,7 @@ public:
     int getClearOverrun();
 };
-

MessageQueue

+

MessageQueue

This is for use by code that wants to handle messages without blocking higher priority threads.

@@ -3426,7 +3369,7 @@ higher priority threads.

Look at miscTest/testMessageQueue.cpp for an example.

-

NoDefaultMethods

+

NoDefaultMethods

If a class privately extends this class then the compiler can not create any of the following: default constructor, default copy constructror, or default @@ -3445,7 +3388,7 @@ assignment contructor.

NoDefaultMethods & operator=(const NoDefaultMethods &); };
-

Requester

+

Requester

A PVField extends Requester. Requester is present so that when database errors are found there is someplace to send a message.

@@ -3475,7 +3418,7 @@ public:
Gives a message to the requester.
-

Serialize

+

Serialize

This is a helper class for serialization, which is required for sending and receiving pvData over the nerwork.

@@ -3546,7 +3489,7 @@ properly implemented.

x

-

Show Constructors and +

Show Constructors and Destructors

This is a facility that allows a class to report how many objects of that @@ -3616,7 +3559,7 @@ To see an example of how this is implemented look at misc/thread.cpp.

IMMEDIATELY BEFORE TERMINATION. -

Status

+

Status

Status provides a way to pass status back to client code. It is new and not currently used by pvData but may be in the future. It is used by code that uses @@ -3646,9 +3589,9 @@ pvData.

status optimization. -

Thread

+

Thread

-

ThreadPriority

+

ThreadPriority

enum ThreadPriority {
     lowestPriority,
     lowerPriority,
@@ -3665,7 +3608,7 @@ public:
     static int getEpicsPriority(ThreadPriority threadPriority);
 };
-

Thread

+

Thread

class Runnable {
 public:
     virtual void run() = 0;
@@ -3712,7 +3655,7 @@ exception is thrown if run remains active when delete is called. 

Make the current thread sleep for the specified number of seconds.
-

Time Function Call

+

Time Function Call

TimeFunction is a facility that measures the average number of seconds a function call requires. When timeCall is called, it calls function in a loop. @@ -3754,7 +3697,7 @@ long a function takes. It has the single method:

one second to call it ntimes. -

Timer

+

Timer

This provides a general purpose timer. It allows a user callback to be called after a delay or periodically.

@@ -3829,7 +3772,7 @@ be used to schedule multiple callbacks. It has the methods:

Schedule a periodic callback.
-

Queue

+

Queue

This provides a queue which has an immutable capacity. When the queue is full the user code is expected to keep using the current element until a new @@ -3911,10 +3854,10 @@ public: }


-

pvMisc

+

pvMisc


-

BitSetUtil

+

BitSetUtil

The following is also provided:

class BitSetUtil : private NoDefaultMethods {
@@ -3943,7 +3886,7 @@ currently has only one method:

entire structures if the structure offset bit is set. -

MultiChoice

+

MultiChoice

MultiChoice defines an array of strings and a bit set that selects an arbitrary set of the choices. This will be implemented if the java version is @@ -3951,7 +3894,7 @@ accepted.

NOT DONE

-

License Agreement

+

License Agreement


Copyright (c) 2008 Martin R. Kraimer
 Copyright (c) 2007 Control System Laboratory,
diff --git a/pvDataApp/Makefile b/pvDataApp/Makefile
index 3fe29cc..8e3fcca 100644
--- a/pvDataApp/Makefile
+++ b/pvDataApp/Makefile
@@ -55,29 +55,6 @@ INC += standardPVField.h
 SRC_DIRS += $(PVDATA)/factory
 
 INC += factory.h
-INC += AbstractPVField.h
-INC += AbstractPVScalar.h
-INC += AbstractPVArray.h
-INC += AbstractPVScalarArray.h
-INC += BasePVStructure.h
-INC += BasePVBoolean.h
-INC += BasePVByte.h
-INC += BasePVShort.h
-INC += BasePVInt.h
-INC += BasePVLong.h
-INC += BasePVFloat.h
-INC += BasePVDouble.h
-INC += BasePVString.h
-INC += BasePVBooleanArray.h
-INC += BasePVByteArray.h
-INC += BasePVShortArray.h
-INC += BasePVIntArray.h
-INC += BasePVLongArray.h
-INC += BasePVFloatArray.h
-INC += BasePVDoubleArray.h
-INC += BasePVString.h
-INC += BasePVStructure.h
-INC += BasePVStructureArray.h
 LIBSRCS += TypeFunc.cpp
 LIBSRCS += PVAuxInfoImpl.cpp
 LIBSRCS += FieldCreateFactory.cpp
diff --git a/pvDataApp/factory/BasePVBoolean.h b/pvDataApp/factory/DefaultPVBoolean.cpp
similarity index 92%
rename from pvDataApp/factory/BasePVBoolean.h
rename to pvDataApp/factory/DefaultPVBoolean.cpp
index f793ac8..81fb00c 100644
--- a/pvDataApp/factory/BasePVBoolean.h
+++ b/pvDataApp/factory/DefaultPVBoolean.cpp
@@ -1,11 +1,9 @@
-/*BasePVBoolean.h*/
+/*PVBoolean.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVBOOLEAN_H
-#define BASEPVBOOLEAN_H
 #include 
 #include 
 #include 
@@ -13,13 +11,10 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 
 namespace epics { namespace pvData {
 
-    PVBoolean::~PVBoolean() {}
-
     class BasePVBoolean : public PVBoolean {
     public:
         BasePVBoolean(PVStructure *parent,ScalarConstPtr scalar);
@@ -70,4 +65,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVBOOLEAN_H */
diff --git a/pvDataApp/factory/BasePVBooleanArray.h b/pvDataApp/factory/DefaultPVBooleanArray.cpp
similarity index 81%
rename from pvDataApp/factory/BasePVBooleanArray.h
rename to pvDataApp/factory/DefaultPVBooleanArray.cpp
index 09d7645..1883a10 100644
--- a/pvDataApp/factory/BasePVBooleanArray.h
+++ b/pvDataApp/factory/DefaultPVBooleanArray.cpp
@@ -1,33 +1,25 @@
-/*BasePVBooleanArrray.h*/
+/*PVBooleanArrray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVBOOLEANARRAY_H
-#define BASEPVBOOLEANARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 using std::min;
 
 namespace epics { namespace pvData {
 
-    PVBooleanArray::~PVBooleanArray() {}
-
-    PVBooleanArray::PVBooleanArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
-    class BasePVBooleanArray : public PVBooleanArray {
+    class DefaultPVBooleanArray : public PVBooleanArray {
     public:
-        BasePVBooleanArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
-        virtual ~BasePVBooleanArray();
+        DefaultPVBooleanArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
+        virtual ~DefaultPVBooleanArray();
         virtual void setCapacity(int capacity);
         virtual int get(int offset, int length, BooleanArrayData *data) ;
         virtual int put(int offset,int length,BooleanArray from,
@@ -44,17 +36,17 @@ namespace epics { namespace pvData {
         bool *value;
     };
 
-    BasePVBooleanArray::BasePVBooleanArray(PVStructure *parent,
+    DefaultPVBooleanArray::DefaultPVBooleanArray(PVStructure *parent,
         ScalarArrayConstPtr scalarArray)
     : PVBooleanArray(parent,scalarArray),value(new bool[0])
     { }
 
-    BasePVBooleanArray::~BasePVBooleanArray()
+    DefaultPVBooleanArray::~DefaultPVBooleanArray()
     {
         delete[] value;
     }
 
-    void BasePVBooleanArray::setCapacity(int capacity)
+    void DefaultPVBooleanArray::setCapacity(int capacity)
     {
         if(PVArray::getCapacity()==capacity) return;
         if(!PVArray::isCapacityMutable()) {
@@ -71,7 +63,7 @@ namespace epics { namespace pvData {
         PVArray::setCapacityLength(capacity,length);
     }
 
-    int BasePVBooleanArray::get(int offset, int len, BooleanArrayData *data)
+    int DefaultPVBooleanArray::get(int offset, int len, BooleanArrayData *data)
     {
         int n = len;
         int length = PVArray::getLength();
@@ -84,7 +76,7 @@ namespace epics { namespace pvData {
         return n;
     }
 
-    int BasePVBooleanArray::put(int offset,int len,
+    int DefaultPVBooleanArray::put(int offset,int len,
         BooleanArray from,int fromOffset)
     {
         if(PVField::isImmutable()) {
@@ -113,19 +105,19 @@ namespace epics { namespace pvData {
         return len;
     }
 
-    void BasePVBooleanArray::shareData(BooleanArray shareValue,int capacity,int length)
+    void DefaultPVBooleanArray::shareData(BooleanArray shareValue,int capacity,int length)
     {
         delete[] value;
         value = shareValue;
         PVArray::setCapacityLength(capacity,length);
     }
 
-    void BasePVBooleanArray::serialize(ByteBuffer *pbuffer,
+    void DefaultPVBooleanArray::serialize(ByteBuffer *pbuffer,
                 SerializableControl *pflusher) {
         serialize(pbuffer, pflusher, 0, getLength());
     }
 
-    void BasePVBooleanArray::deserialize(ByteBuffer *pbuffer,
+    void DefaultPVBooleanArray::deserialize(ByteBuffer *pbuffer,
             DeserializableControl *pcontrol) {
         int size = SerializeHelper::readSize(pbuffer, pcontrol);
         if(size>=0) {
@@ -149,7 +141,7 @@ namespace epics { namespace pvData {
         // TODO null arrays (size == -1) not supported
     }
 
-    void BasePVBooleanArray::serialize(ByteBuffer *pbuffer,
+    void DefaultPVBooleanArray::serialize(ByteBuffer *pbuffer,
             SerializableControl *pflusher, int offset, int count) {
         // cache
         int length = getLength();
@@ -178,14 +170,13 @@ namespace epics { namespace pvData {
         }
     }
 
-    bool BasePVBooleanArray::operator==(PVField& pv)
+    bool DefaultPVBooleanArray::operator==(PVField& pv)
     {
         return getConvert()->equals(this, &pv);
     }
 
-    bool BasePVBooleanArray::operator!=(PVField& pv)
+    bool DefaultPVBooleanArray::operator!=(PVField& pv)
     {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVBOOLEANARRAY_H */
diff --git a/pvDataApp/factory/BasePVByte.h b/pvDataApp/factory/DefaultPVByte.cpp
similarity index 92%
rename from pvDataApp/factory/BasePVByte.h
rename to pvDataApp/factory/DefaultPVByte.cpp
index 6f049a8..0e54942 100644
--- a/pvDataApp/factory/BasePVByte.h
+++ b/pvDataApp/factory/DefaultPVByte.cpp
@@ -1,11 +1,9 @@
-/*BasePVByte.h*/
+/*PVByte.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVBYTE_H
-#define BASEPVBYTE_H
 #include 
 #include 
 #include 
@@ -13,13 +11,10 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 
 namespace epics { namespace pvData {
 
-    PVByte::~PVByte() {}
-
     class BasePVByte : public PVByte {
     public:
         BasePVByte(PVStructure *parent,ScalarConstPtr scalar);
@@ -69,4 +64,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVBYTE_H */
diff --git a/pvDataApp/factory/BasePVByteArray.h b/pvDataApp/factory/DefaultPVByteArray.cpp
similarity index 95%
rename from pvDataApp/factory/BasePVByteArray.h
rename to pvDataApp/factory/DefaultPVByteArray.cpp
index 696a7b9..f54efdb 100644
--- a/pvDataApp/factory/BasePVByteArray.h
+++ b/pvDataApp/factory/DefaultPVByteArray.cpp
@@ -1,29 +1,21 @@
-/*BasePVByteArray.h*/
+/*PVByteArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVBYTEARRAY_H
-#define BASEPVBYTEARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 using std::min;
 
 namespace epics { namespace pvData {
 
-    PVByteArray::~PVByteArray() {}
-
-    PVByteArray::PVByteArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
     class BasePVByteArray : public PVByteArray {
     public:
         BasePVByteArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
@@ -188,4 +180,3 @@ namespace epics { namespace pvData {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVBYTEARRAY_H */
diff --git a/pvDataApp/factory/BasePVDouble.h b/pvDataApp/factory/DefaultPVDouble.cpp
similarity index 93%
rename from pvDataApp/factory/BasePVDouble.h
rename to pvDataApp/factory/DefaultPVDouble.cpp
index 8c07af0..153c573 100644
--- a/pvDataApp/factory/BasePVDouble.h
+++ b/pvDataApp/factory/DefaultPVDouble.cpp
@@ -4,8 +4,6 @@
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVDOUBLE_H
-#define BASEPVDOUBLE_H
 #include 
 #include 
 #include 
@@ -13,13 +11,10 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 
 namespace epics { namespace pvData {
 
-    PVDouble::~PVDouble() {}
-
     class BasePVDouble : public PVDouble {
     public:
         BasePVDouble(PVStructure *parent,ScalarConstPtr scalar);
@@ -69,4 +64,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVDOUBLE_H */
diff --git a/pvDataApp/factory/BasePVDoubleArray.h b/pvDataApp/factory/DefaultPVDoubleArray.cpp
similarity index 94%
rename from pvDataApp/factory/BasePVDoubleArray.h
rename to pvDataApp/factory/DefaultPVDoubleArray.cpp
index e97c412..f163c3e 100644
--- a/pvDataApp/factory/BasePVDoubleArray.h
+++ b/pvDataApp/factory/DefaultPVDoubleArray.cpp
@@ -1,29 +1,21 @@
-/*BasePVDoubleArray.h*/
+/*PVDoubleArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVDOUBLEARRAY_H
-#define BASEPVDOUBLEARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 using std::min;
 
 namespace epics { namespace pvData {
 
-    PVDoubleArray::~PVDoubleArray() {}
-
-    PVDoubleArray::PVDoubleArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
     class BasePVDoubleArray : public PVDoubleArray {
     public:
         BasePVDoubleArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
@@ -191,4 +183,3 @@ namespace epics { namespace pvData {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVDOUBLEARRAY_H */
diff --git a/pvDataApp/factory/BasePVFloat.h b/pvDataApp/factory/DefaultPVFloat.cpp
similarity index 92%
rename from pvDataApp/factory/BasePVFloat.h
rename to pvDataApp/factory/DefaultPVFloat.cpp
index 5baa37c..92c2b91 100644
--- a/pvDataApp/factory/BasePVFloat.h
+++ b/pvDataApp/factory/DefaultPVFloat.cpp
@@ -1,11 +1,9 @@
-/*BasePVFloat.h*/
+/*PVFloat.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVFLOAT_H
-#define BASEPVFLOAT_H
 #include 
 #include 
 #include 
@@ -13,13 +11,10 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 
 namespace epics { namespace pvData {
 
-    PVFloat::~PVFloat() {}
-
     class BasePVFloat : public PVFloat {
     public:
         BasePVFloat(PVStructure *parent,ScalarConstPtr scalar);
@@ -69,4 +64,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVFLOAT_H */
diff --git a/pvDataApp/factory/BasePVFloatArray.h b/pvDataApp/factory/DefaultPVFloatArray.cpp
similarity index 95%
rename from pvDataApp/factory/BasePVFloatArray.h
rename to pvDataApp/factory/DefaultPVFloatArray.cpp
index 1d42ca0..db9981a 100644
--- a/pvDataApp/factory/BasePVFloatArray.h
+++ b/pvDataApp/factory/DefaultPVFloatArray.cpp
@@ -1,29 +1,21 @@
-/*BasePVFloatArray.h*/
+/*PVFloatArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVFLOATARRAY_H
-#define BASEPVFLOATARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 namespace epics { namespace pvData {
 
     using std::min;
 
-    PVFloatArray::~PVFloatArray() {}
-
-    PVFloatArray::PVFloatArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
     class BasePVFloatArray : public PVFloatArray {
     public:
         BasePVFloatArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
@@ -191,4 +183,3 @@ namespace epics { namespace pvData {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVFLOATARRAY_H */
diff --git a/pvDataApp/factory/BasePVInt.h b/pvDataApp/factory/DefaultPVInt.cpp
similarity index 93%
rename from pvDataApp/factory/BasePVInt.h
rename to pvDataApp/factory/DefaultPVInt.cpp
index c613f6b..00fc048 100644
--- a/pvDataApp/factory/BasePVInt.h
+++ b/pvDataApp/factory/DefaultPVInt.cpp
@@ -1,11 +1,9 @@
-/*BasePVInt.h*/
+/*PVInt.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVINT_H
-#define BASEPVINT_H
 #include 
 #include 
 #include 
@@ -13,13 +11,10 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 
 namespace epics { namespace pvData {
 
-    PVInt::~PVInt() {}
-
     class BasePVInt : public PVInt {
     public:
         BasePVInt(PVStructure *parent,ScalarConstPtr scalar);
@@ -69,4 +64,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVINT_H */
diff --git a/pvDataApp/factory/BasePVIntArray.h b/pvDataApp/factory/DefaultPVIntArray.cpp
similarity index 95%
rename from pvDataApp/factory/BasePVIntArray.h
rename to pvDataApp/factory/DefaultPVIntArray.cpp
index 5331c9d..e0befae 100644
--- a/pvDataApp/factory/BasePVIntArray.h
+++ b/pvDataApp/factory/DefaultPVIntArray.cpp
@@ -1,29 +1,21 @@
-/*BasePVIntArray.h*/
+/*PVIntArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVINTARRAY_H
-#define BASEPVINTARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 using std::min;
 
 namespace epics { namespace pvData {
 
-    PVIntArray::~PVIntArray() {}
-
-    PVIntArray::PVIntArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
     class BasePVIntArray : public PVIntArray {
     public:
         BasePVIntArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
@@ -191,4 +183,3 @@ namespace epics { namespace pvData {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVINTARRAY_H */
diff --git a/pvDataApp/factory/BasePVLong.h b/pvDataApp/factory/DefaultPVLong.cpp
similarity index 92%
rename from pvDataApp/factory/BasePVLong.h
rename to pvDataApp/factory/DefaultPVLong.cpp
index 71ad294..ddff999 100644
--- a/pvDataApp/factory/BasePVLong.h
+++ b/pvDataApp/factory/DefaultPVLong.cpp
@@ -1,11 +1,9 @@
-/*BasePVLong.h*/
+/*PVLong.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVLONG_H
-#define BASEPVLONG_H
 #include 
 #include 
 #include 
@@ -13,13 +11,10 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 
 namespace epics { namespace pvData {
 
-    PVLong::~PVLong() {}
-
     class BasePVLong : public PVLong {
     public:
         BasePVLong(PVStructure *parent,ScalarConstPtr scalar);
@@ -69,4 +64,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVLONG_H */
diff --git a/pvDataApp/factory/BasePVLongArray.h b/pvDataApp/factory/DefaultPVLongArray.cpp
similarity index 95%
rename from pvDataApp/factory/BasePVLongArray.h
rename to pvDataApp/factory/DefaultPVLongArray.cpp
index bdcbc28..4da1410 100644
--- a/pvDataApp/factory/BasePVLongArray.h
+++ b/pvDataApp/factory/DefaultPVLongArray.cpp
@@ -1,29 +1,21 @@
-/*BasePVLongArray.h*/
+/*PVLongArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVLONGARRAY_H
-#define BASEPVLONGARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 using std::min;
 
 namespace epics { namespace pvData {
 
-    PVLongArray::~PVLongArray() {}
-
-    PVLongArray::PVLongArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
     class BasePVLongArray : public PVLongArray {
     public:
         BasePVLongArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
@@ -191,4 +183,3 @@ namespace epics { namespace pvData {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVLONGARRAY_H */
diff --git a/pvDataApp/factory/BasePVShort.h b/pvDataApp/factory/DefaultPVShort.cpp
similarity index 92%
rename from pvDataApp/factory/BasePVShort.h
rename to pvDataApp/factory/DefaultPVShort.cpp
index f36ddb4..8662283 100644
--- a/pvDataApp/factory/BasePVShort.h
+++ b/pvDataApp/factory/DefaultPVShort.cpp
@@ -1,11 +1,9 @@
-/*BasePVShort.h*/
+/*PVShort.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVSHORT_H
-#define BASEPVSHORT_H
 #include 
 #include 
 #include 
@@ -13,13 +11,10 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 
 namespace epics { namespace pvData {
 
-    PVShort::~PVShort() {}
-
     class BasePVShort : public PVShort {
     public:
         BasePVShort(PVStructure *parent,ScalarConstPtr scalar);
@@ -69,4 +64,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVSHORT_H */
diff --git a/pvDataApp/factory/BasePVShortArray.h b/pvDataApp/factory/DefaultPVShortArray.cpp
similarity index 95%
rename from pvDataApp/factory/BasePVShortArray.h
rename to pvDataApp/factory/DefaultPVShortArray.cpp
index b9ed07d..602b2cf 100644
--- a/pvDataApp/factory/BasePVShortArray.h
+++ b/pvDataApp/factory/DefaultPVShortArray.cpp
@@ -1,29 +1,21 @@
-/*BasePVShortArray.h*/
+/*PVShortArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVSHORTARRAY_H
-#define BASEPVSHORTARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 using std::min;
 
 namespace epics { namespace pvData {
 
-    PVShortArray::~PVShortArray() {}
-
-    PVShortArray::PVShortArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
     class BasePVShortArray : public PVShortArray {
     public:
         BasePVShortArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
@@ -191,4 +183,3 @@ namespace epics { namespace pvData {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVSHORTARRAY_H */
diff --git a/pvDataApp/factory/BasePVString.h b/pvDataApp/factory/DefaultPVString.cpp
similarity index 92%
rename from pvDataApp/factory/BasePVString.h
rename to pvDataApp/factory/DefaultPVString.cpp
index 27b9616..5b30ff9 100644
--- a/pvDataApp/factory/BasePVString.h
+++ b/pvDataApp/factory/DefaultPVString.cpp
@@ -1,11 +1,9 @@
-/*BasePVString.h*/
+/*PVString.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVSTRING_H
-#define BASEPVSTRING_H
 #include 
 #include 
 #include 
@@ -13,14 +11,11 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 #include "byteBuffer.h"
 #include "serializeHelper.h"
 
 namespace epics { namespace pvData {
 
-    PVString::~PVString() {}
-
     class BasePVString : public PVString {
     public:
         BasePVString(PVStructure *parent,ScalarConstPtr scalar);
@@ -68,4 +63,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* BASEPVSTRING_H */
diff --git a/pvDataApp/factory/BasePVStringArray.h b/pvDataApp/factory/DefaultPVStringArray.cpp
similarity index 94%
rename from pvDataApp/factory/BasePVStringArray.h
rename to pvDataApp/factory/DefaultPVStringArray.cpp
index 45ed3c9..774a6ba 100644
--- a/pvDataApp/factory/BasePVStringArray.h
+++ b/pvDataApp/factory/DefaultPVStringArray.cpp
@@ -1,27 +1,19 @@
-/*BasePVStringArray.h*/
+/*PVStringArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVSTRINGARRAY_H
-#define BASEPVSTRINGARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVScalarArray.h"
 #include "serializeHelper.h"
 
 namespace epics { namespace pvData {
 
-    PVStringArray::~PVStringArray() {}
-
-    PVStringArray::PVStringArray(PVStructure *parent,ScalarArrayConstPtr scalar)
-    : PVScalarArray(parent,scalar) {}
-
     class BasePVStringArray : public PVStringArray {
     public:
         BasePVStringArray(PVStructure *parent,ScalarArrayConstPtr scalarArray);
@@ -171,4 +163,3 @@ namespace epics { namespace pvData {
         return !(getConvert()->equals(this, &pv));
     }
 }}
-#endif  /* BASEPVSTRINGARRAY_H */
diff --git a/pvDataApp/factory/BasePVStructureArray.h b/pvDataApp/factory/DefaultPVStructureArray.cpp
similarity index 91%
rename from pvDataApp/factory/BasePVStructureArray.h
rename to pvDataApp/factory/DefaultPVStructureArray.cpp
index c487a8b..e81a9a0 100644
--- a/pvDataApp/factory/BasePVStructureArray.h
+++ b/pvDataApp/factory/DefaultPVStructureArray.cpp
@@ -1,11 +1,9 @@
-/*BasePVStructureArray.h*/
+/*PVStructureArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVSTRUCTUREARRAY_H
-#define BASEPVSTRUCTUREARRAY_H
 #include 
 #include 
 #include 
@@ -16,13 +14,6 @@
 
 namespace epics { namespace pvData {
 
-    PVStructureArray::PVStructureArray(PVStructure *parent,
-        StructureArrayConstPtr structureArray)
-    : PVArray(parent,structureArray)
-    {}
-
-    PVStructureArray::~PVStructureArray() {}
-
     class BasePVStructureArray : public PVStructureArray {
     public:
         BasePVStructureArray(PVStructure *parent,
@@ -31,6 +22,7 @@ namespace epics { namespace pvData {
         virtual StructureArrayConstPtr getStructureArray();
         virtual int append(int number);
         virtual bool remove(int offset,int number);
+        virtual void compress();
         virtual void setCapacity(int capacity);
         virtual int get(int offset, int length,
             StructureArrayData *data);
@@ -96,15 +88,36 @@ namespace epics { namespace pvData {
                 value[i] = 0;
            }
         }
-        // move any at end up
-        int nToMove = length - (offset+number);
-        for(int i=0; i
 #include 
 #include 
@@ -89,4 +87,3 @@ namespace epics { namespace pvData {
      }
 
 }}
-#endif  /* ABSTRACTPVARRAY_H */
diff --git a/pvDataApp/factory/PVDataCreateFactory.cpp b/pvDataApp/factory/PVDataCreateFactory.cpp
index 9e229e8..40aab9c 100644
--- a/pvDataApp/factory/PVDataCreateFactory.cpp
+++ b/pvDataApp/factory/PVDataCreateFactory.cpp
@@ -13,29 +13,28 @@
 #include "pvData.h"
 #include "convert.h"
 #include "factory.h"
-#include "AbstractPVField.h"
-#include "AbstractPVScalar.h"
-#include "AbstractPVArray.h"
-#include "AbstractPVScalarArray.h"
-#include "BasePVBoolean.h"
-#include "BasePVByte.h"
-#include "BasePVShort.h"
-#include "BasePVInt.h"
-#include "BasePVLong.h"
-#include "BasePVFloat.h"
-#include "BasePVDouble.h"
-#include "BasePVString.h"
-#include "AbstractPVArray.h"
-#include "BasePVBooleanArray.h"
-#include "BasePVByteArray.h"
-#include "BasePVShortArray.h"
-#include "BasePVIntArray.h"
-#include "BasePVLongArray.h"
-#include "BasePVFloatArray.h"
-#include "BasePVDoubleArray.h"
-#include "BasePVStringArray.h"
-#include "BasePVStructure.h"
-#include "BasePVStructureArray.h"
+#include "PVField.cpp"
+#include "PVScalar.cpp"
+#include "PVArray.cpp"
+#include "PVScalarArray.cpp"
+#include "PVStructure.cpp"
+#include "DefaultPVBoolean.cpp"
+#include "DefaultPVByte.cpp"
+#include "DefaultPVShort.cpp"
+#include "DefaultPVInt.cpp"
+#include "DefaultPVLong.cpp"
+#include "DefaultPVFloat.cpp"
+#include "DefaultPVDouble.cpp"
+#include "DefaultPVString.cpp"
+#include "DefaultPVBooleanArray.cpp"
+#include "DefaultPVByteArray.cpp"
+#include "DefaultPVShortArray.cpp"
+#include "DefaultPVIntArray.cpp"
+#include "DefaultPVLongArray.cpp"
+#include "DefaultPVFloatArray.cpp"
+#include "DefaultPVDoubleArray.cpp"
+#include "DefaultPVStringArray.cpp"
+#include "DefaultPVStructureArray.cpp"
 
 namespace epics { namespace pvData {
 
@@ -144,7 +143,7 @@ PVScalarArray *PVDataCreate::createPVScalarArray(PVStructure *parent,
 {
      switch(scalarArray->getElementType()) {
      case pvBoolean:
-           return new BasePVBooleanArray(parent,scalarArray);
+           return new DefaultPVBooleanArray(parent,scalarArray);
      case pvByte:
            return new BasePVByteArray(parent,scalarArray);
      case pvShort:
diff --git a/pvDataApp/factory/AbstractPVField.h b/pvDataApp/factory/PVField.cpp
similarity index 98%
rename from pvDataApp/factory/AbstractPVField.h
rename to pvDataApp/factory/PVField.cpp
index 4e5d575..dc1c0bd 100644
--- a/pvDataApp/factory/AbstractPVField.h
+++ b/pvDataApp/factory/PVField.cpp
@@ -1,11 +1,9 @@
-/*AbstractPVField.h*/
+/*PVField.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef ABSTRACTPVFIELD_H
-#define ABSTRACTPVFIELD_H
 #include 
 #include 
 #include 
@@ -259,4 +257,3 @@ void PVField::computeOffset(PVField   *  pvField,int offset) {
 }
 
 }}
-#endif  /* ABSTRACTPVFIELD_H */
diff --git a/pvDataApp/factory/AbstractPVScalar.h b/pvDataApp/factory/PVScalar.cpp
similarity index 81%
rename from pvDataApp/factory/AbstractPVScalar.h
rename to pvDataApp/factory/PVScalar.cpp
index 804ebd6..f148738 100644
--- a/pvDataApp/factory/AbstractPVScalar.h
+++ b/pvDataApp/factory/PVScalar.cpp
@@ -1,18 +1,15 @@
-/*AbstractPVScalar.h*/
+/*PVScalar.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef ABSTRACTPVSCALAR_H
-#define ABSTRACTPVSCALAR_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVField.h"
 
 namespace epics { namespace pvData {
 
@@ -27,4 +24,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* ABSTRACTPVSCALAR_H */
diff --git a/pvDataApp/factory/AbstractPVScalarArray.h b/pvDataApp/factory/PVScalarArray.cpp
similarity index 81%
rename from pvDataApp/factory/AbstractPVScalarArray.h
rename to pvDataApp/factory/PVScalarArray.cpp
index 9726b3d..726b2d8 100644
--- a/pvDataApp/factory/AbstractPVScalarArray.h
+++ b/pvDataApp/factory/PVScalarArray.cpp
@@ -1,18 +1,15 @@
-/*AbstractPVScalarArray.h*/
+/*PVScalarArray.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef ABSTRACTPVSCALARARRAY_H
-#define ABSTRACTPVSCALARARRAY_H
 #include 
 #include 
 #include 
 #include 
 #include "pvData.h"
 #include "factory.h"
-#include "AbstractPVArray.h"
 
 namespace epics { namespace pvData {
 
@@ -28,4 +25,3 @@ namespace epics { namespace pvData {
     }
 
 }}
-#endif  /* ABSTRACTPVSCALARARRAY_H */
diff --git a/pvDataApp/factory/BasePVStructure.h b/pvDataApp/factory/PVStructure.cpp
similarity index 99%
rename from pvDataApp/factory/BasePVStructure.h
rename to pvDataApp/factory/PVStructure.cpp
index 4726a11..64214d2 100644
--- a/pvDataApp/factory/BasePVStructure.h
+++ b/pvDataApp/factory/PVStructure.cpp
@@ -1,11 +1,9 @@
-/*BasePVStructure.h*/
+/*PVStructure.cpp*/
 /**
  * Copyright - See the COPYRIGHT that is included with this distribution.
  * EPICS pvDataCPP is distributed subject to a Software License Agreement found
  * in file LICENSE that is included with this distribution.
  */
-#ifndef BASEPVSTRUCTURE_H
-#define BASEPVSTRUCTURE_H
 #include 
 #include 
 #include 
@@ -571,4 +569,3 @@ namespace epics { namespace pvData {
     BasePVStructure::~BasePVStructure() {}
 
 }}
-#endif  /* BASEPVSTRUCTURE_H */
diff --git a/pvDataApp/pv/pvData.h b/pvDataApp/pv/pvData.h
index acef197..c6eef4d 100644
--- a/pvDataApp/pv/pvData.h
+++ b/pvDataApp/pv/pvData.h
@@ -160,10 +160,11 @@ public:
 
 class PVStructureArray : public PVArray {
 public:
-    virtual ~PVStructureArray();
+    virtual ~PVStructureArray() {}
     virtual StructureArrayConstPtr getStructureArray() = 0;
     virtual int append(int number) = 0;
     virtual bool remove(int offset,int number) = 0;
+    virtual void compress() = 0;
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length,
         StructureArrayData *data) = 0;
@@ -177,8 +178,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,
         SerializableControl *pflusher, int offset, int count) = 0;
 protected:
-    PVStructureArray(PVStructure *parent,
-        StructureArrayConstPtr structureArray);
+    PVStructureArray(PVStructure *parent, StructureArrayConstPtr structureArray)
+    : PVArray(parent,structureArray) {}
 private:
 };
 
@@ -228,7 +229,7 @@ private:
 
 class PVBoolean : public PVScalar {
 public:
-    virtual ~PVBoolean();
+    virtual ~PVBoolean() {}
     virtual bool get() = 0;
     virtual void put(bool value) = 0;
 protected:
@@ -239,7 +240,7 @@ private:
 
 class PVByte : public PVScalar {
 public:
-    virtual ~PVByte();
+    virtual ~PVByte() {}
     virtual int8 get() = 0;
     virtual void put(int8 value) = 0;
 protected:
@@ -250,7 +251,7 @@ private:
 
 class PVShort : public PVScalar {
 public:
-    virtual ~PVShort();
+    virtual ~PVShort() {}
     virtual int16 get() = 0;
     virtual void put(int16 value) = 0;
 protected:
@@ -261,7 +262,7 @@ private:
 
 class PVInt : public PVScalar{
 public:
-    virtual ~PVInt();
+    virtual ~PVInt() {}
     virtual int32 get() = 0;
     virtual void put(int32 value) = 0;
 protected:
@@ -272,7 +273,7 @@ private:
 
 class PVLong : public PVScalar {
 public:
-    virtual ~PVLong();
+    virtual ~PVLong() {}
     virtual int64 get() = 0;
     virtual void put(int64 value) = 0;
 protected:
@@ -283,7 +284,7 @@ private:
 
 class PVFloat : public PVScalar {
 public:
-    virtual ~PVFloat();
+    virtual ~PVFloat() {}
     virtual float get() = 0;
     virtual void put(float value) = 0;
 protected:
@@ -294,7 +295,7 @@ private:
 
 class PVDouble : public PVScalar {
 public:
-    virtual ~PVDouble();
+    virtual ~PVDouble() {}
     virtual double get() = 0;
     virtual void put(double value) = 0;
 protected:
@@ -305,7 +306,7 @@ private:
 
 class PVString : public PVScalar {
 public:
-    virtual ~PVString();
+    virtual ~PVString() {}
     virtual String get() = 0;
     virtual void put(String value) = 0;
 protected:
@@ -322,7 +323,7 @@ public:
 
 class PVBooleanArray : public PVScalarArray {
 public:
-    virtual ~PVBooleanArray();
+    virtual ~PVBooleanArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, BooleanArrayData *data) = 0;
     virtual int put(int offset,int length, BooleanArray from, int fromOffset) = 0;
@@ -330,7 +331,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher) = 0;
 protected:
-    PVBooleanArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVBooleanArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
@@ -343,7 +345,7 @@ public:
 
 class PVByteArray : public PVScalarArray {
 public:
-    virtual ~PVByteArray();
+    virtual ~PVByteArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, ByteArrayData *data) = 0;
     virtual int put(int offset,int length, ByteArray  from, int fromOffset) = 0;
@@ -351,7 +353,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher) = 0;
 protected:
-    PVByteArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVByteArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
@@ -363,7 +366,7 @@ public:
 
 class PVShortArray : public PVScalarArray {
 public:
-    virtual ~PVShortArray();
+    virtual ~PVShortArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, ShortArrayData *data) = 0;
     virtual int put(int offset,int length, ShortArray  from, int fromOffset) = 0;
@@ -371,7 +374,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher) = 0;
 protected:
-    PVShortArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVShortArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
@@ -383,7 +387,7 @@ public:
 
 class PVIntArray : public PVScalarArray {
 public:
-    virtual ~PVIntArray();
+    virtual ~PVIntArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, IntArrayData *data) = 0;
     virtual int put(int offset,int length, IntArray  from, int fromOffset)= 0;
@@ -391,7 +395,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher)= 0;
 protected:
-    PVIntArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVIntArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
@@ -403,7 +408,7 @@ public:
 
 class PVLongArray : public PVScalarArray {
 public:
-    virtual ~PVLongArray();
+    virtual ~PVLongArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, LongArrayData *data) = 0;
     virtual int put(int offset,int length, LongArray  from, int fromOffset)= 0;
@@ -411,7 +416,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher)= 0;
 protected:
-    PVLongArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVLongArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
@@ -424,7 +430,7 @@ public:
 
 class PVFloatArray : public PVScalarArray {
 public:
-    virtual ~PVFloatArray();
+    virtual ~PVFloatArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, FloatArrayData *data) = 0;
     virtual int put(int offset,int length, FloatArray  from, int fromOffset)= 0;
@@ -432,7 +438,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher)= 0;
 protected:
-    PVFloatArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVFloatArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
@@ -447,7 +454,7 @@ public:
 
 class PVDoubleArray : public PVScalarArray {
 public:
-    virtual ~PVDoubleArray();
+    virtual ~PVDoubleArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, DoubleArrayData *data) = 0;
     virtual int put(int offset,int length, DoubleArray  from, int fromOffset) = 0;
@@ -455,7 +462,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher) = 0;
 protected:
-    PVDoubleArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVDoubleArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
@@ -468,7 +476,7 @@ public:
 
 class PVStringArray : public PVScalarArray {
 public:
-    virtual ~PVStringArray();
+    virtual ~PVStringArray() {}
     virtual void setCapacity(int capacity) = 0;
     virtual int get(int offset, int length, StringArrayData *data) = 0;
     virtual int put(int offset,int length, StringArray  from, int fromOffset)= 0;
@@ -476,7 +484,8 @@ public:
     virtual void serialize(ByteBuffer *pbuffer,SerializableControl *pflusher) = 0;
     virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher)= 0;
 protected:
-    PVStringArray(PVStructure *parent,ScalarArrayConstPtr scalar);
+    PVStringArray(PVStructure *parent,ScalarArrayConstPtr scalar)
+    : PVScalarArray(parent,scalar) {}
 private:
 };
 
diff --git a/test/testLinkedListAux b/test/testLinkedListAux
index 12b1de3..62299e5 100644
--- a/test/testLinkedListAux
+++ b/test/testLinkedListAux
@@ -1,20 +1,20 @@
 
 Time test
-diff 24.740621 milliSeconds
-time per iteration 24.740621 microseconds
-time per addTail/removeHead 0.012370 microseconds
+diff 24.890191 milliSeconds
+time per iteration 24.890191 microseconds
+time per addTail/removeHead 0.012445 microseconds
 
 Time test locked
-diff 188.817816 milliSeconds
-time per iteration 188.817816 microseconds
-time per addTail/removeHead 0.094409 microseconds
+diff 188.108610 milliSeconds
+time per iteration 188.108610 microseconds
+time per addTail/removeHead 0.094054 microseconds
 
 Time std::list test
-diff 629.679579 milliSeconds
-time per iteration 629.679579 microseconds
-time per addTail/removeHead 0.314840 microseconds
+diff 668.831984 milliSeconds
+time per iteration 668.831984 microseconds
+time per addTail/removeHead 0.334416 microseconds
 
 Time std::list test locked
-diff 787.049712 milliSeconds
-time per iteration 787.049712 microseconds
-time per addTail/removeHead 0.393525 microseconds
+diff 780.392611 milliSeconds
+time per iteration 780.392611 microseconds
+time per addTail/removeHead 0.390196 microseconds
diff --git a/test/testPVStructureArray b/test/testPVStructureArray
index 9b3ed89..f50783e 100644
--- a/test/testPVStructureArray
+++ b/test/testPVStructureArray
@@ -1,3 +1,4 @@
+after append 5
 structure powerSupply
     structure[] value 
         structure powerSupply
@@ -48,6 +49,121 @@ structure powerSupply
                 structure alarm
                     int severity 0
                     string message 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+    alarm alarm
+        int severity 0
+        string message 
+    timeStamp timeStamp
+        long secondsPastEpoch 0
+        int nanoSeconds 0
+after remove 0,1,3structure powerSupply
+    structure[] value 
+        null
+        null
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+        null
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+    alarm alarm
+        int severity 0
+        string message 
+    timeStamp timeStamp
+        long secondsPastEpoch 0
+        int nanoSeconds 0
+after compressstructure powerSupply
+    structure[] value 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
     alarm alarm
         int severity 0
         string message 
@@ -55,6 +171,6 @@ structure powerSupply
         long secondsPastEpoch 0
         int nanoSeconds 0
 field:  totalConstruct 102 totalDestruct 102
-pvField:  totalConstruct 56 totalDestruct 56
+pvField:  totalConstruct 88 totalDestruct 88
 linkedListNode:  totalConstruct 5 totalDestruct 5
 linkedList:  totalConstruct 1 totalDestruct 1
diff --git a/test/testPVStructureArrayDiff b/test/testPVStructureArrayDiff
index 5557c62..e69de29 100644
--- a/test/testPVStructureArrayDiff
+++ b/test/testPVStructureArrayDiff
@@ -1,57 +0,0 @@
-56a57,112
->  reference counts powerSupply referenceCount 1
->     value referenceCount 1
->     alarm referenceCount 14
->         severity referenceCount 14
->         message referenceCount 14
->     timeStamp referenceCount 2
->         secondsPastEpoch referenceCount 2
->         nanoSeconds referenceCount 2
-> before incReferenceCount reference counts powerSupply referenceCount 4
->     voltage referenceCount 4
->         value referenceCount 4
->         alarm referenceCount 14
->             severity referenceCount 14
->             message referenceCount 14
->     power referenceCount 4
->         value referenceCount 4
->         alarm referenceCount 14
->             severity referenceCount 14
->             message referenceCount 14
->     current referenceCount 4
->         value referenceCount 4
->         alarm referenceCount 14
->             severity referenceCount 14
->             message referenceCount 14
-> after incReferenceCount reference counts powerSupply referenceCount 5
->     voltage referenceCount 5
->         value referenceCount 5
->         alarm referenceCount 17
->             severity referenceCount 17
->             message referenceCount 17
->     power referenceCount 5
->         value referenceCount 5
->         alarm referenceCount 17
->             severity referenceCount 17
->             message referenceCount 17
->     current referenceCount 5
->         value referenceCount 5
->         alarm referenceCount 17
->             severity referenceCount 17
->             message referenceCount 17
-> after decReferenceCount reference counts powerSupply referenceCount 4
->     voltage referenceCount 4
->         value referenceCount 4
->         alarm referenceCount 14
->             severity referenceCount 14
->             message referenceCount 14
->     power referenceCount 4
->         value referenceCount 4
->         alarm referenceCount 14
->             severity referenceCount 14
->             message referenceCount 14
->     current referenceCount 4
->         value referenceCount 4
->         alarm referenceCount 14
->             severity referenceCount 14
->             message referenceCount 14
diff --git a/test/testPVStructureArrayGold b/test/testPVStructureArrayGold
index b84d060..f50783e 100644
--- a/test/testPVStructureArrayGold
+++ b/test/testPVStructureArrayGold
@@ -1,3 +1,4 @@
+after append 5
 structure powerSupply
     structure[] value 
         structure powerSupply
@@ -48,69 +49,128 @@ structure powerSupply
                 structure alarm
                     int severity 0
                     string message 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+    alarm alarm
+        int severity 0
+        string message 
+    timeStamp timeStamp
+        long secondsPastEpoch 0
+        int nanoSeconds 0
+after remove 0,1,3structure powerSupply
+    structure[] value 
+        null
+        null
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+        null
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+    alarm alarm
+        int severity 0
+        string message 
+    timeStamp timeStamp
+        long secondsPastEpoch 0
+        int nanoSeconds 0
+after compressstructure powerSupply
+    structure[] value 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+        structure powerSupply
+            structure voltage
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure power
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
+            structure current
+                double value 0
+                structure alarm
+                    int severity 0
+                    string message 
     alarm alarm
         int severity 0
         string message 
     timeStamp timeStamp
         long secondsPastEpoch 0
         int nanoSeconds 0
- reference counts powerSupply referenceCount 1
-    value referenceCount 1
-    alarm referenceCount 14
-        severity referenceCount 14
-        message referenceCount 14
-    timeStamp referenceCount 2
-        secondsPastEpoch referenceCount 2
-        nanoSeconds referenceCount 2
-before incReferenceCount reference counts powerSupply referenceCount 4
-    voltage referenceCount 4
-        value referenceCount 4
-        alarm referenceCount 14
-            severity referenceCount 14
-            message referenceCount 14
-    power referenceCount 4
-        value referenceCount 4
-        alarm referenceCount 14
-            severity referenceCount 14
-            message referenceCount 14
-    current referenceCount 4
-        value referenceCount 4
-        alarm referenceCount 14
-            severity referenceCount 14
-            message referenceCount 14
-after incReferenceCount reference counts powerSupply referenceCount 5
-    voltage referenceCount 5
-        value referenceCount 5
-        alarm referenceCount 17
-            severity referenceCount 17
-            message referenceCount 17
-    power referenceCount 5
-        value referenceCount 5
-        alarm referenceCount 17
-            severity referenceCount 17
-            message referenceCount 17
-    current referenceCount 5
-        value referenceCount 5
-        alarm referenceCount 17
-            severity referenceCount 17
-            message referenceCount 17
-after decReferenceCount reference counts powerSupply referenceCount 4
-    voltage referenceCount 4
-        value referenceCount 4
-        alarm referenceCount 14
-            severity referenceCount 14
-            message referenceCount 14
-    power referenceCount 4
-        value referenceCount 4
-        alarm referenceCount 14
-            severity referenceCount 14
-            message referenceCount 14
-    current referenceCount 4
-        value referenceCount 4
-        alarm referenceCount 14
-            severity referenceCount 14
-            message referenceCount 14
 field:  totalConstruct 102 totalDestruct 102
-pvField:  totalConstruct 56 totalDestruct 56
+pvField:  totalConstruct 88 totalDestruct 88
 linkedListNode:  totalConstruct 5 totalDestruct 5
 linkedList:  totalConstruct 1 totalDestruct 1
diff --git a/test/testThreadAux b/test/testThreadAux
index cf8e769..8b993dd 100644
--- a/test/testThreadAux
+++ b/test/testThreadAux
@@ -1 +1 @@
-time per call 30.779267 microseconds
+time per call 41.431581 microseconds
diff --git a/test/testTimeStampAux b/test/testTimeStampAux
index a4a083e..8085ac6 100644
--- a/test/testTimeStampAux
+++ b/test/testTimeStampAux
@@ -1,5 +1,5 @@
-current 1296220855 236718062 milliSec 1296220855236
-2011.01.28 08:20:55 236718062 nanoSeconds isDst false
+current 1296556183 151053711 milliSec 1296556183151
+2011.02.01 05:29:43 151053711 nanoSeconds isDst false
 fromTime_t
-current 1296220855 0 milliSec 1296220855000
-2011.01.28 08:20:55 0 nanoSeconds isDst false
+current 1296556183 0 milliSec 1296556183000
+2011.02.01 05:29:43 0 nanoSeconds isDst false
diff --git a/test/testTimerAux b/test/testTimerAux
index 7739e59..3ac1383 100644
--- a/test/testTimerAux
+++ b/test/testTimerAux
@@ -1,6 +1,6 @@
-one requested 0.400000  diff 0.400272 seconds
-two requested 0.200000  diff 0.200259 seconds
-one requested 0.200000  diff 0.200247 seconds
-two requested 0.400000  diff 0.400347 seconds
-one requested 0.000000  diff 0.000073 seconds
-two requested 0.000000  diff 0.000098 seconds
+one requested 0.400000  diff 0.400276 seconds
+two requested 0.200000  diff 0.200325 seconds
+one requested 0.200000  diff 0.200255 seconds
+two requested 0.400000  diff 0.400288 seconds
+one requested 0.000000  diff 0.000027 seconds
+two requested 0.000000  diff 0.000087 seconds
diff --git a/testApp/pv/testPVStructureArray.cpp b/testApp/pv/testPVStructureArray.cpp
index bbd54b1..f27120d 100644
--- a/testApp/pv/testPVStructureArray.cpp
+++ b/testApp/pv/testPVStructureArray.cpp
@@ -49,13 +49,20 @@ void testPowerSupplyArray(FILE * fd) {
     PVStructureArray * powerSupplyArray =
         powerSupplyArrayStruct->getStructureArrayField(String("value"));
     assert(powerSupplyArray!=0);
-    int offset = powerSupplyArray->append(3);
+    int offset = powerSupplyArray->append(5);
     powerSupplyArray->setLength(offset);
     buffer.clear();
     powerSupplyArrayStruct->toString(&buffer);
-    fprintf(fd,"%s\n",buffer.c_str());
-    StructureConstPtr structure = 
-         powerSupplyArray->getStructureArray()->getStructure();
+    fprintf(fd,"after append 5\n%s\n",buffer.c_str());
+    powerSupplyArray->remove(0,2);
+    powerSupplyArray->remove(3,1);
+    buffer.clear();
+    powerSupplyArrayStruct->toString(&buffer);
+    fprintf(fd,"after remove 0,1,3%s\n",buffer.c_str());
+    powerSupplyArray->compress();
+    buffer.clear();
+    powerSupplyArrayStruct->toString(&buffer);
+    fprintf(fd,"after compress%s\n",buffer.c_str());
     delete powerSupplyArrayStruct;
 }