X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkAny.h;h=d5ae85f10b91756ad6b1e3dfb6b8c2222012d776;hb=487dbfe275c2c6fa7454a000503082bfca54396b;hp=45ed57640f596d4d61d605ee232ae84fb5a89a1c;hpb=a26195c366a89795288009cf7e20f11afa494970;p=bbtk.git diff --git a/kernel/src/bbtkAny.h b/kernel/src/bbtkAny.h index 45ed576..d5ae85f 100644 --- a/kernel/src/bbtkAny.h +++ b/kernel/src/bbtkAny.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkAny.h,v $ Language: C++ - Date: $Date: 2008/01/22 15:02:00 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/02/20 16:05:38 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See doc/license.txt or @@ -113,18 +113,18 @@ namespace bbtk class anyholder : public anyplaceholder { public: // structors - + anyholder(ValueType* const & value) : held(value) { } - + public: // queries - + virtual const std::type_info & type() const { return typeid(ValueType*); } - + virtual bool is_pointer() const { return true; } virtual const std::type_info & pointed_type() const { return typeid(ValueType); } virtual void* get_pointer() const { @@ -136,11 +136,11 @@ namespace bbtk } virtual anyplaceholder * clone() const { return new anyholder(held); } - + public: // representation - + ValueType* held; - + }; //========================================================= @@ -174,13 +174,13 @@ namespace bbtk public: typedef any< TypeTraits > self; // structors - + /// Default constructor any() : content(0) { } - + /// Constructor with a value of template type template any(const ValueType & value) @@ -223,7 +223,7 @@ namespace bbtk { delete content; } - + /// Swaps the content of this with another any any & swap(any & rhs)