PVField no longer extends Requester.

This commit is contained in:
Marty Kraimer
2011-05-10 07:38:04 -04:00
parent fae332c09f
commit d13284da7f
11 changed files with 41 additions and 51 deletions

View File

@@ -34,13 +34,15 @@ public:
bool immutable;
Requester *requester;
PostHandler *postHandler;
Convert *convert;
};
PVFieldPvt::PVFieldPvt(PVStructure *parent,FieldConstPtr field)
: parent(parent),field(field),
fieldOffset(0), nextFieldOffset(0),
pvAuxInfo(0),
immutable(false),requester(0),postHandler(0)
immutable(false),requester(0),postHandler(0),
convert(getConvert())
{
}
@@ -63,13 +65,6 @@ PVField::~PVField()
delete pImpl;
}
String PVField::getRequesterName()
{
static String none("none");
if(pImpl->requester!=0) return pImpl->requester->getRequesterName();
return none;
}
void PVField::message(String fieldName,String message,MessageType messageType)
{
if(pImpl->parent!=0) {
@@ -176,11 +171,16 @@ void PVField::setParent(PVStructure * parent)
pImpl->parent = parent;
}
bool PVField::equals(PVField &pv)
{
return pImpl->convert->equals(*this,pv);
}
void PVField::toString(StringBuilder buf) {toString(buf,0);}
void PVField::toString(StringBuilder buf,int indentLevel)
{
getConvert()->getString(buf,this,indentLevel);
pImpl->convert->getString(buf,this,indentLevel);
if(pImpl->pvAuxInfo==0) return;
pImpl->pvAuxInfo->toString(buf,indentLevel);
}

View File

@@ -57,8 +57,7 @@ public:
};
class PVField
: virtual public Requester,
virtual public Serializable,
: virtual public Serializable,
private NoDefaultMethods
{
public:
@@ -66,7 +65,6 @@ public:
typedef std::tr1::shared_ptr<const PVField> const_shared_pointer;
virtual ~PVField();
String getRequesterName() ;
virtual void message(String message,MessageType messageType) ;
virtual void setRequester(Requester *prequester);
int getFieldOffset() ;
@@ -74,13 +72,13 @@ public:
int getNumberFields() ;
PVAuxInfo * getPVAuxInfo();
bool isImmutable() ;
void setImmutable();
virtual void setImmutable();
FieldConstPtr getField() ;
PVStructure * getParent() ;
bool renameField(String newName);
void postPut() ;
void setPostHandler(PostHandler *postHandler);
bool equals(PVField &pv);
virtual bool equals(PVField &pv);
virtual void toString(StringBuilder buf) ;
virtual void toString(StringBuilder buf,int indentLevel) ;
protected:

View File

@@ -1,5 +1,5 @@
--- testBaseExceptionGold 2011-04-25 13:04:28.000000000 -0400
+++ testBaseException 2011-04-27 07:53:41.000000000 -0400
--- testBaseExceptionGold 2011-04-27 13:11:55.000000000 -0400
+++ testBaseException 2011-05-10 07:36:37.000000000 -0400
@@ -1,37 +1,46 @@
+
+

View File

@@ -1,20 +1,20 @@
Time test
diff 22.226751 milliSeconds
time per iteration 22.226751 microseconds
time per addTail/removeHead 0.011113 microseconds
diff 23.025222 milliSeconds
time per iteration 23.025222 microseconds
time per addTail/removeHead 0.011513 microseconds
Time test locked
diff 205.273532 milliSeconds
time per iteration 205.273532 microseconds
time per addTail/removeHead 0.102637 microseconds
diff 221.055746 milliSeconds
time per iteration 221.055746 microseconds
time per addTail/removeHead 0.110528 microseconds
Time std::list test
diff 666.642776 milliSeconds
time per iteration 666.642776 microseconds
time per addTail/removeHead 0.333321 microseconds
diff 658.326477 milliSeconds
time per iteration 658.326477 microseconds
time per addTail/removeHead 0.329163 microseconds
Time std::list test locked
diff 812.128477 milliSeconds
time per iteration 812.128477 microseconds
time per addTail/removeHead 0.406064 microseconds
diff 825.914024 milliSeconds
time per iteration 825.914024 microseconds
time per addTail/removeHead 0.412957 microseconds

View File

@@ -28,5 +28,5 @@ structure parent
string Mary Good Girl
structure child2
string Jane Bad Girl
pvField: totalConstruct 15 totalDestruct 14 ACTIVE 1
field: totalConstruct 108 totalDestruct 107 ACTIVE 1
pvField: totalConstruct 15 totalDestruct 15
field: totalConstruct 108 totalDestruct 108

View File

@@ -1,8 +0,0 @@
--- testPVAppendGold 2011-04-25 13:04:28.000000000 -0400
+++ testPVAppend 2011-04-27 07:53:46.000000000 -0400
@@ -29,4 +29,4 @@
structure child2
string Jane Bad Girl
pvField: totalConstruct 15 totalDestruct 14 ACTIVE 1
-field: totalConstruct 108 totalDestruct 108
+field: totalConstruct 108 totalDestruct 107 ACTIVE 1

View File

@@ -28,5 +28,5 @@ structure parent
string Mary Good Girl
structure child2
string Jane Bad Girl
pvField: totalConstruct 15 totalDestruct 14 ACTIVE 1
pvField: totalConstruct 15 totalDestruct 15
field: totalConstruct 108 totalDestruct 108

View File

@@ -1 +1 @@
2011.04.27 07:53:47 782836752 nanoSeconds isDst true
2011.05.10 07:36:42 565871670 nanoSeconds isDst true

View File

@@ -1 +1 @@
time per call 0.007046 microseconds
time per call 0.007801 microseconds

View File

@@ -1,5 +1,5 @@
current 1303905226 876200358 milliSec 1303905226876
2011.04.27 07:53:46 876200358 nanoSeconds isDst true
current 1305027401 678184290 milliSec 1305027401678
2011.05.10 07:36:41 678184290 nanoSeconds isDst true
fromTime_t
current 1303905226 0 milliSec 1303905226000
2011.04.27 07:53:46 0 nanoSeconds isDst true
current 1305027401 0 milliSec 1305027401000
2011.05.10 07:36:41 0 nanoSeconds isDst true

View File

@@ -1,6 +1,6 @@
one requested 0.400000 diff 0.400283 seconds
two requested 0.200000 diff 0.200268 seconds
one requested 0.200000 diff 0.200291 seconds
two requested 0.400000 diff 0.400374 seconds
one requested 0.000000 diff 0.000042 seconds
two requested 0.000000 diff 0.000061 seconds
one requested 0.400000 diff 0.400284 seconds
two requested 0.200000 diff 0.200202 seconds
one requested 0.200000 diff 0.200283 seconds
two requested 0.400000 diff 0.400290 seconds
one requested 0.000000 diff 0.000034 seconds
two requested 0.000000 diff 0.000049 seconds