Update of /cvsroot/cppunit/cppunit2/src/cpput
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15246/src/cpput
Modified Files:
properties.cpp
Log Message:
* added getter to PropertyAccessor to retreive the valid Properties.
Index: properties.cpp
===================================================================
RCS file: /cvsroot/cppunit/cppunit2/src/cpput/properties.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** properties.cpp 19 Nov 2004 22:57:57 -0000 1.2
--- properties.cpp 20 Nov 2004 12:12:01 -0000 1.3
***************
*** 607,610 ****
--- 607,619 ----
+ const Properties &
+ PropertiesAccessor::properties() const
+ {
+ CPPTL_ASSERT_MESSAGE( properties_ != 0,
+ "PropertiesAccessor::properties() called on invalid accessor." );
+ return *properties_;
+ }
+
+
bool
PropertiesAccessor::isValid() const
***************
*** 1098,1101 ****
--- 1107,1112 ----
{
str += prefix;
+ str += "/";
+ str += it->name();
str += " = ";
str += value.toString();
***************
*** 1106,1115 ****
for ( unsigned int index = 0; index < indexedProperties_.size(); ++index )
{
! str += prefix;
! str += "[";
! str += CppTL::toString( index );
! str += "] = ";
! str += indexedProperties_[index].toString();
! str += "\n";
}
return str;
--- 1117,1133 ----
for ( unsigned int index = 0; index < indexedProperties_.size(); ++index )
{
! std::string localPrefix = prefix;
! localPrefix += "[";
! localPrefix += CppTL::toString( index );
! localPrefix += "]";
! if ( indexedProperties_[index].isProperties() )
! str += indexedProperties_[index].asProperties().toString( localPrefix );
! else
! {
! str += localPrefix;
! str += " = ";
! str += indexedProperties_[index].toString();
! str += "\n";
! }
}
return str;
|