EPICS pvData C++
Overview
2010.08.02
CONTENTS
Introduction
This project has the begining of the C++ implementation of pvData. The
following is done:
- introspection interfaces
- The introspection interfaces for clients are described.
- introspection implementation
- The following have been implemented: Type, ScalarType, Field,
Scalar
- test
- A test of Scalar.
- As mentioned below there are major problems with the current
implementation.
Since the last version the following are the main changes:
Building
The project is structured as an epics base client application. Edit
configure/RELEASE so that it references your EPICS base and then just
type:
make
At the top. Then execute the test in the bin directory.
pvDataApp has the following sub directories:
- pv
- pvData.h has the interface descriptions for client code.
- factory
- FieldCreateFactory.cpp has the current implementation
- test
- Has a test for the current implementation.
Questions about Classes
The pure virtual classes defined in pvData.h now work. But there are still
some things that are not so nice. Amoung these are:
- User code sees pointers instead of references. Can this be changed
while keeping the boost::shared_ptr support?
- The toString methods have an argument of "std::string &buf" instead
of "std::string *". But in the test code I could not create a
"std::string &" to work. I do not know why.
- Can arguments and return descriptions be defined better?
- Is const present everywhere it should be? Remember that introspection
classes are immutable and are shared whereever possible.
- The code is NOT thread safe. When we decide for sure what thread/lock
support to choose I will fix this.
HELP WILL BE GREATLY APPRECIATED. because I am still coming up to speed
with c++
Garbage Collection
boost::shared_ptr is currenly used for implementations of Field, Scalar,
etc. It is also used for all string arguments passed to methods. Since string
values are freely shared by pvData, pvAccess, etc, this is really important.
questions:
- Is the implementation using shared_ptr correctly?
- Should other things currently defined use stared_ptr?