better eoString

This commit is contained in:
jmerelo 2003-06-17 12:03:42 +00:00
commit b354bd51f8

View file

@ -45,6 +45,8 @@ class eoString: public EO<fitnessT>, public std::string
public: public:
typedef char Type; typedef char Type;
typedef char AtomType;
typedef std::string ContainerType;
/// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator
//@{ //@{
@ -52,6 +54,16 @@ public:
eoString( const std::string& _str ="" ) eoString( const std::string& _str ="" )
: std::string( _str ) {}; : std::string( _str ) {};
/// printing...
virtual void printOn(std::ostream& os) const
{
EO<fitnessT>::printOn(os);
os << ' ';
os << size() << ' ' << substr() << endl;
}
/** @name Methods from eoObject /** @name Methods from eoObject
readFrom and printOn are directly inherited from eo1d readFrom and printOn are directly inherited from eo1d
*/ */