00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef TECPLOT_TOOLBOX_AUXDATA_H
00012 #define TECPLOT_TOOLBOX_AUXDATA_H
00013
00014 #if defined MSWIN
00015 #pragma once
00016 #endif
00017
00018 #include <string>
00019
00020 namespace tecplot { namespace toolbox {
00021
00022 class Set;
00023
00027 class TPTOOLBOX_DLLAPI AuxData
00028 {
00029 public:
00056 AuxData(const AuxDataLocation_e auxDataLocation,
00057 const EntIndex_t zoneOrMapOrVariable = 1);
00058 virtual ~AuxData();
00059
00070 virtual const Boolean_t isValid() const;
00071
00078 virtual const AuxData_pa getRef() const;
00079
00101 virtual Boolean_t set(std::string name,
00102 std::string value,
00103 Boolean_t retain = TRUE) const;
00104
00130 virtual Boolean_t set(std::string name,
00131 LgIndex_t value,
00132 Boolean_t retain = TRUE) const;
00133
00160 virtual Boolean_t set(std::string name,
00161 double value,
00162 Boolean_t retain = TRUE) const;
00163
00190 virtual Boolean_t set(std::string name,
00191 Boolean_t value,
00192 Boolean_t retain = TRUE) const;
00193
00219 virtual Boolean_t set(std::string name,
00220 const Set& value,
00221 Boolean_t retain = TRUE) const;
00222
00240 template <typename T>
00241 inline Boolean_t get(std::string name,
00242 T* value,
00243 Boolean_t* retain = NULL) const
00244 {
00245 REQUIRE(VALID_NON_ZERO_LEN_STR(name.c_str()));
00246 REQUIRE(VALID_REF(value));
00247 REQUIRE(VALID_REF_OR_NULL(retain));
00248
00249
00250
00251
00252
00253
00254 LgIndex_t index;
00255 Boolean_t result = getIndex(name, &index);
00256 if ( result )
00257 get(index,
00258 value,
00259 NULL,
00260 retain);
00261 ENSURE(VALID_BOOLEAN(result));
00262 return result;
00263 }
00264
00283 virtual void get(LgIndex_t index,
00284 std::string* value,
00285 std::string* name = NULL,
00286 Boolean_t* retain = NULL) const;
00287
00308 virtual void get(LgIndex_t index,
00309 LgIndex_t* value,
00310 std::string* name = NULL,
00311 Boolean_t* retain = NULL) const;
00312
00333 virtual void get(LgIndex_t index,
00334 double* value,
00335 std::string* name = NULL,
00336 Boolean_t* retain = NULL) const;
00337
00360 virtual void get(LgIndex_t index,
00361 Boolean_t* value,
00362 std::string* name = NULL,
00363 Boolean_t* retain = NULL) const;
00364
00385 virtual void get(LgIndex_t index,
00386 Set* value,
00387 std::string* name = NULL,
00388 Boolean_t* retain = NULL) const;
00389
00400 virtual void remove(LgIndex_t index) const;
00401
00415 virtual Boolean_t remove(std::string name) const;
00416
00430 virtual Boolean_t getIndex(std::string name,
00431 LgIndex_t* index) const;
00432
00439 virtual LgIndex_t size() const;
00440
00447 AuxDataLocation_e getAuxDataLocation () const { return m_auxDataLocation; }
00448
00456 EntIndex_t getZoneOrMapOrVarIndex() const { return m_zoneOrMapOrVar; }
00457
00458 private:
00459 AuxData& operator=(const AuxData&);
00460
00461 private:
00462 const AuxDataLocation_e m_auxDataLocation;
00463 const EntIndex_t m_zoneOrMapOrVar;
00464 };
00465
00466 }}
00467
00468 #endif