From b354bd51f8e996c9da457540d876d83b8e07e878 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Tue, 17 Jun 2003 12:03:42 +0000 Subject: [PATCH] better eoString --- eo/src/other/eoString.h | 42 ++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/eo/src/other/eoString.h b/eo/src/other/eoString.h index 85843411..3c17b704 100644 --- a/eo/src/other/eoString.h +++ b/eo/src/other/eoString.h @@ -44,23 +44,35 @@ class eoString: public EO, public std::string { 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 - //@{ - /// ctor - eoString( const std::string& _str ="" ) - : std::string( _str ) {}; + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + /// ctor + eoString( const std::string& _str ="" ) + : std::string( _str ) {}; - /** @name Methods from eoObject - readFrom and printOn are directly inherited from eo1d - */ - //@{ - /** Inherited from eoObject - @see eoObject - */ - virtual std::string className() const {return "eoString";}; - //@} + /// printing... + virtual void printOn(std::ostream& os) const + { + EO::printOn(os); + os << ' '; + + os << size() << ' ' << substr() << endl; + + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual std::string className() const {return "eoString";}; + //@} };