00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : David Beilloin (Oct 2006) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SB_VEC2STRING_ 00026 #define _SB_VEC2STRING_ 00027 00028 #include <Inventor/SbString.h> 00029 00031 // 00032 // Class: SbVec2String 00033 // 00034 // 2D vector used to store two SbStrings. 00035 // 00037 00054 class SbVec2String { 00055 public: 00056 00060 SbVec2String() { } 00061 00065 SbVec2String(const SbString v[2]) { vec[0]=v[0]; vec[1]=v[1]; } 00066 00070 SbVec2String(SbString x, SbString y) { vec[0]=x; vec[1]=y; } 00071 00075 const SbString *getValue() const { return vec; } 00076 00080 void getValue(SbString &x, SbString &y) const; 00081 00085 SbVec2String &setValue(const SbString v[2]); 00086 00090 SbVec2String &setValue(SbString x, SbString y); 00091 00093 00096 SbString & operator [](int i) { return (vec[i]); } 00097 const SbString & operator [](int i) const { return (vec[i]); } 00099 00103 friend int operator ==(const SbVec2String &v1, const SbVec2String &v2); 00104 00108 friend int operator !=(const SbVec2String &v1, const SbVec2String &v2) 00109 { return !(v1 == v2); } 00110 00111 private: 00112 SbString vec[2]; // Storage for SbString vector components 00113 00114 }; 00115 00116 #endif /* _SB_VEC2STRING_ */ 00117 00118