> Shouldn't a propertySurveyor also be given access rights information
> (i.e. whether a particular property is writable or not)? Do you intend
> to use a different mechanism to communicate that somehow?
>
> Unfortunately
> your very clever template mechanism only works with fully symmetrical
> property sets; in many cases I think we're going to have to write all
> three traverse() routines ourselves, to cope with read-only properties.
>
A very good question Andrew!
My initial reaction is that the template will need to be revised so that the
user can supply the access rights when they call its reveal function (see
below).
When implementing a property catalog for an EPICS PV there may also need to
be subordinate properties for the access rights so that they might be
dynamic. This will allow for the users to subscribe for access right state
changes. Does this imply that we need a 3rd access rights enumeration member
(in addition to arReadable and arWritable) - something like arVariable?
template < class VIEWER >
inline void MyContainer :: traverse ( VIEWER & viewer )
{
viewer.reveal ( propertyX, arReadable, & MyContainer::x );
viewer.reveal ( propertyY, arReadable, & MyContainer::y );
viewer.reveal ( propertyZ, arWriteable, & MyContainer::z );
viewer.reveal ( propertyI, arWriteable, & MyContainer::i );
}
template < class VIEWER >
inline bool MyContainer::find ( const PropertyId & id, VIEWER & viewer )
{
bool status = true;
if ( id == propertyX ) {
viewer.reveal ( propertyX, arReadable, & MyContainer::x );
}
else if ( id == propertyY ) {
viewer.reveal ( propertyY, arReadable, & MyContainer::y );
}
else if ( id == propertyZ ) {
viewer.reveal ( propertyY, arWriteable, & MyContainer::z );
}
else if ( id == propertyI ) {
viewer.reveal ( propertyY, arWriteable, & MyContainer::i );
}
else {
status = false;
}
return status;
}
Jeff
- References:
- Re: ICE and TIPC Andrew Johnson
- Navigate by Date:
- Prev:
String Interfaces Andrew Johnson
- Next:
RE: String Interfaces Jeff Hill
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Data Interface (was: ICE & TIPC) Kay-Uwe Kasemir
- Next:
Re: ICE and TIPC Ralph Lange
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|