X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmTagKey.h;h=2d32f44359ac69c41166b06d91415d1c45372d70;hb=b04328934019f7df41631ee9ddd5750c91b5dc28;hp=6653618841edd6d54d87a06689e2ffb8a59433b3;hpb=5297c664d2e2a380570f0aef41535ce547923b46;p=gdcm.git diff --git a/src/gdcmTagKey.h b/src/gdcmTagKey.h index 66536188..2d32f443 100644 --- a/src/gdcmTagKey.h +++ b/src/gdcmTagKey.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTagKey.h,v $ Language: C++ - Date: $Date: 2005/10/26 15:34:33 $ - Version: $Revision: 1.6 $ + Date: $Date: 2005/11/08 09:35:44 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -32,7 +32,7 @@ namespace gdcm class TagKey { public : - TagKey(const uint16_t &gr, const uint16_t &elt) { tag[0] = gr;tag[1] = elt;} + TagKey(uint16_t gr, uint16_t elt) { tag[0] = gr;tag[1] = elt;} TagKey() { tag[0] = tag[1] = 0x0000;} friend std::ostream& operator<<(std::ostream& _os, const TagKey &_val); @@ -44,11 +44,11 @@ public : return std::string(res); } - void SetGroup(const uint16_t &group) { tag[0] = group; } - uint16_t &GetGroup(void) { return tag[0]; } const + void SetGroup(uint16_t group) { tag[0] = group; } + uint16_t GetGroup() const { return tag[0]; } - void SetElement(const uint16_t &elem) { tag[1] = elem; } - uint16_t GetElement(void) { return tag[1]; } const + void SetElement(uint16_t elem) { tag[1] = elem; } + uint16_t GetElement() const { return tag[1]; } TagKey &operator=(const TagKey &_val) { @@ -58,17 +58,17 @@ public : } TagKey(const TagKey &_val) - { + { tag[0] = _val[0]; tag[1] = _val[1]; - } + } - uint16_t &operator[](const unsigned int &_id) const + const uint16_t &operator[](const unsigned int &_id) const { assert(_id<2); return tag[_id]; } - uint16_t &operator[](const unsigned int &_id) + const uint16_t &operator[](const unsigned int &_id) { assert(_id<2); return tag[_id];