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-2014 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 00053 class SbVec2String { 00054 public: 00055 00059 SbVec2String() { } 00060 00064 SbVec2String(const SbString v[2]) { vec[0]=v[0]; vec[1]=v[1]; } 00065 00069 SbVec2String(SbString x, SbString y) { vec[0]=x; vec[1]=y; } 00070 00074 const SbString *getValue() const { return vec; } 00075 00079 void getValue(SbString &x, SbString &y) const; 00080 00084 SbVec2String &setValue(const SbString v[2]); 00085 00089 SbVec2String &setValue(SbString x, SbString y); 00090 00092 00095 SbString & operator [](int i) { return (vec[i]); } 00096 const SbString & operator [](int i) const { return (vec[i]); } 00098 00102 friend int operator ==(const SbVec2String &v1, const SbVec2String &v2); 00103 00107 friend int operator !=(const SbVec2String &v1, const SbVec2String &v2) 00108 { return !(v1 == v2); } 00109 00110 private: 00111 SbString vec[2]; // Storage for SbString vector components 00112 00113 }; 00114 00115 #endif /* _SB_VEC2STRING_ */ 00116 00117