documentation more complete
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@ INC += event.h
|
||||
INC += thread.h
|
||||
INC += executor.h
|
||||
INC += showConstructDestruct.h
|
||||
INC += timeStamp.h
|
||||
INC += timeFunction.h
|
||||
INC += timer.h
|
||||
INC += queueVoid.h
|
||||
@@ -36,7 +35,6 @@ LIBSRCS += linkedListVoid.cpp
|
||||
LIBSRCS += event.cpp
|
||||
LIBSRCS += thread.cpp
|
||||
LIBSRCS += executor.cpp
|
||||
LIBSRCS += timeStamp.cpp
|
||||
LIBSRCS += timeFunction.cpp
|
||||
LIBSRCS += timer.cpp
|
||||
LIBSRCS += queueVoid.cpp
|
||||
@@ -93,6 +91,7 @@ INC += pvControl.h
|
||||
INC += display.h
|
||||
INC += pvDisplay.h
|
||||
INC += pvEnumerated.h
|
||||
INC += timeStamp.h
|
||||
INC += pvTimeStamp.h
|
||||
|
||||
LIBSRCS += alarm.cpp
|
||||
@@ -100,6 +99,7 @@ LIBSRCS += pvAlarm.cpp
|
||||
LIBSRCS += pvControl.cpp
|
||||
LIBSRCS += pvDisplay.cpp
|
||||
LIBSRCS += pvEnumerated.cpp
|
||||
LIBSRCS += timeStamp.cpp
|
||||
LIBSRCS += pvTimeStamp.cpp
|
||||
|
||||
SRC_DIRS += $(PVDATA)/pvMisc
|
||||
|
||||
@@ -517,20 +517,12 @@ namespace epics { namespace pvData {
|
||||
|
||||
bool PVStructure::operator==(PVField &obj)
|
||||
{
|
||||
PVStructure &b = dynamic_cast<PVStructure &>(obj);
|
||||
PVFieldPtrArray bFields = b.pImpl->pvFields;
|
||||
PVFieldPtrArray pvFields = pImpl->pvFields;
|
||||
int len = b.pImpl->numberFields;
|
||||
if(len!=pImpl->numberFields) return false;
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (!(*pvFields[i]==*bFields[i])) return false;
|
||||
}
|
||||
return true;
|
||||
return getConvert()->equals(this,&obj);
|
||||
}
|
||||
|
||||
bool PVStructure::operator!=(PVField &pv)
|
||||
{
|
||||
return !(*this==pv);
|
||||
return !(getConvert()->equals(this,&pv));
|
||||
}
|
||||
|
||||
static PVField *findSubField(String fieldName,PVStructure *pvStructure) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,10 @@ bool PVAlarm::attach(PVField *pvField)
|
||||
{
|
||||
PVStructure *pvStructure = 0;
|
||||
if(pvField->getField()->getFieldName().compare("alarm")!=0) {
|
||||
if(pvField->getField()->getFieldName().compare("value")!=0) {
|
||||
pvField->message(noAlarmFound,errorMessage);
|
||||
return false;
|
||||
}
|
||||
PVStructure *pvParent = pvField->getParent();
|
||||
if(pvParent==0) {
|
||||
pvField->message(noAlarmFound,errorMessage);
|
||||
|
||||
@@ -19,6 +19,10 @@ bool PVControl::attach(PVField *pvField)
|
||||
{
|
||||
PVStructure *pvStructure = 0;
|
||||
if(pvField->getField()->getFieldName().compare("control")!=0) {
|
||||
if(pvField->getField()->getFieldName().compare("value")!=0) {
|
||||
pvField->message(noControlFound,errorMessage);
|
||||
return false;
|
||||
}
|
||||
PVStructure *pvParent = pvField->getParent();
|
||||
if(pvParent==0) {
|
||||
pvField->message(noControlFound,errorMessage);
|
||||
|
||||
@@ -19,6 +19,10 @@ bool PVDisplay::attach(PVField *pvField)
|
||||
{
|
||||
PVStructure *pvStructure = 0;
|
||||
if(pvField->getField()->getFieldName().compare("display")!=0) {
|
||||
if(pvField->getField()->getFieldName().compare("value")!=0) {
|
||||
pvField->message(noDisplayFound,errorMessage);
|
||||
return false;
|
||||
}
|
||||
PVStructure *pvParent = pvField->getParent();
|
||||
if(pvParent==0) {
|
||||
pvField->message(noDisplayFound,errorMessage);
|
||||
|
||||
@@ -24,7 +24,19 @@ bool PVTimeStamp::attach(PVField *pvField)
|
||||
pvField->message(noTimeStamp,errorMessage);
|
||||
return false;
|
||||
}
|
||||
pvStructure = pvParent->getStructureField(String("timeStamp"));
|
||||
if(pvField->getField()->getFieldName().compare("value")!=0) {
|
||||
pvField->message(noTimeStamp,errorMessage);
|
||||
return false;
|
||||
}
|
||||
// look up the tree for a timeSyamp
|
||||
while(pvParent!=0) {
|
||||
PVStructure *pvs = pvParent->getStructureField(String("timeStamp"));
|
||||
if(pvs!=0) {
|
||||
pvStructure = pvs;
|
||||
break;
|
||||
}
|
||||
pvParent = pvParent->getParent();
|
||||
}
|
||||
if(pvStructure==0) {
|
||||
pvField->message(noTimeStamp,errorMessage);
|
||||
return false;
|
||||
|
||||
@@ -60,14 +60,15 @@ public:
|
||||
|
||||
class Field : private NoDefaultMethods {
|
||||
public:
|
||||
virtual ~Field();
|
||||
Field(String fieldName,Type type);
|
||||
static ConstructDestructCallback *getConstructDestructCallback();
|
||||
int getReferenceCount() const;
|
||||
String getFieldName() const;
|
||||
Type getType() const;
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
protected:
|
||||
Field(String fieldName,Type type);
|
||||
virtual ~Field();
|
||||
private:
|
||||
class FieldPvt *pImpl;
|
||||
void incReferenceCount() const;
|
||||
@@ -77,55 +78,64 @@ private:
|
||||
friend class PVFieldPvt;
|
||||
friend class StandardField;
|
||||
friend class BasePVStructureArray;
|
||||
friend class FieldCreate;
|
||||
};
|
||||
|
||||
|
||||
class Scalar : public Field{
|
||||
public:
|
||||
Scalar(String fieldName,ScalarType scalarType);
|
||||
virtual ~Scalar();
|
||||
ScalarType getScalarType() const {return scalarType;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
protected:
|
||||
Scalar(String fieldName,ScalarType scalarType);
|
||||
virtual ~Scalar();
|
||||
private:
|
||||
ScalarType scalarType;
|
||||
friend class FieldCreate;
|
||||
};
|
||||
|
||||
class ScalarArray : public Field{
|
||||
public:
|
||||
ScalarArray(String fieldName,ScalarType scalarType);
|
||||
virtual ~ScalarArray();
|
||||
ScalarType getElementType() const {return elementType;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
protected:
|
||||
ScalarArray(String fieldName,ScalarType scalarType);
|
||||
virtual ~ScalarArray();
|
||||
private:
|
||||
ScalarType elementType;
|
||||
friend class FieldCreate;
|
||||
};
|
||||
|
||||
class StructureArray : public Field{
|
||||
public:
|
||||
StructureArray(String fieldName,StructureConstPtr structure);
|
||||
virtual ~StructureArray();
|
||||
StructureConstPtr getStructure() const {return pstructure;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
protected:
|
||||
StructureArray(String fieldName,StructureConstPtr structure);
|
||||
virtual ~StructureArray();
|
||||
private:
|
||||
StructureConstPtr pstructure;
|
||||
friend class FieldCreate;
|
||||
};
|
||||
|
||||
class Structure : public Field {
|
||||
public:
|
||||
Structure(String fieldName, int numberFields,FieldConstPtrArray fields);
|
||||
virtual ~Structure();
|
||||
int getNumberFields() const {return numberFields;}
|
||||
FieldConstPtr getField(String fieldName) const;
|
||||
int getFieldIndex(String fieldName) const;
|
||||
FieldConstPtrArray getFields() const {return fields;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
protected:
|
||||
Structure(String fieldName, int numberFields,FieldConstPtrArray fields);
|
||||
virtual ~Structure();
|
||||
private:
|
||||
int numberFields;
|
||||
FieldConstPtrArray fields;
|
||||
friend class FieldCreate;
|
||||
};
|
||||
|
||||
class FieldCreate : NoDefaultMethods {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
|
||||
Time test
|
||||
diff 86.701878 milliSeconds
|
||||
time per iteration 86.701878 microseconds
|
||||
time per addTail/removeHead 0.043351 microseconds
|
||||
diff 84.008528 milliSeconds
|
||||
time per iteration 84.008528 microseconds
|
||||
time per addTail/removeHead 0.042004 microseconds
|
||||
|
||||
Time test locked
|
||||
diff 608.700458 milliSeconds
|
||||
time per iteration 608.700458 microseconds
|
||||
time per addTail/removeHead 0.304350 microseconds
|
||||
diff 580.331337 milliSeconds
|
||||
time per iteration 580.331337 microseconds
|
||||
time per addTail/removeHead 0.290166 microseconds
|
||||
|
||||
Time std::list test
|
||||
diff 2209.051253 milliSeconds
|
||||
time per iteration 2209.051253 microseconds
|
||||
time per addTail/removeHead 1.104526 microseconds
|
||||
diff 2156.999667 milliSeconds
|
||||
time per iteration 2156.999667 microseconds
|
||||
time per addTail/removeHead 1.078500 microseconds
|
||||
|
||||
Time std::list test locked
|
||||
diff 2720.724619 milliSeconds
|
||||
time per iteration 2720.724619 microseconds
|
||||
time per addTail/removeHead 1.360362 microseconds
|
||||
diff 2675.507176 milliSeconds
|
||||
time per iteration 2675.507176 microseconds
|
||||
time per addTail/removeHead 1.337754 microseconds
|
||||
|
||||
@@ -1 +1 @@
|
||||
time per call 25.270516 microseconds
|
||||
time per call 41.228039 microseconds
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
current 1291814737 128832482 milliSec 1291814737128
|
||||
2010.12.08 08:25:37 128832482 nanoSeconds isDst false
|
||||
current 1292263902 816951231 milliSec 1292263902816
|
||||
2010.12.13 13:11:42 816951231 nanoSeconds isDst false
|
||||
fromTime_t
|
||||
current 1291814737 0 milliSec 1291814737000
|
||||
2010.12.08 08:25:37 0 nanoSeconds isDst false
|
||||
current 1292263902 0 milliSec 1292263902000
|
||||
2010.12.13 13:11:42 0 nanoSeconds isDst false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
one requested 0.400000 diff 0.400202 seconds
|
||||
two requested 0.200000 diff 0.200183 seconds
|
||||
one requested 0.200000 diff 0.200157 seconds
|
||||
two requested 0.400000 diff 0.400198 seconds
|
||||
one requested 0.000000 diff 0.000025 seconds
|
||||
two requested 0.000000 diff 0.000042 seconds
|
||||
one requested 0.400000 diff 0.400294 seconds
|
||||
two requested 0.200000 diff 0.200352 seconds
|
||||
one requested 0.200000 diff 0.200359 seconds
|
||||
two requested 0.400000 diff 0.400304 seconds
|
||||
one requested 0.000000 diff 0.000035 seconds
|
||||
two requested 0.000000 diff 0.000053 seconds
|
||||
|
||||
Reference in New Issue
Block a user