avtDatabaseMetaData.C 184 KB
Newer Older
hrchilds's avatar
hrchilds committed
1
2
/*****************************************************************************
*
brugger's avatar
   
brugger committed
3
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
hrchilds's avatar
hrchilds committed
4
* Produced at the Lawrence Livermore National Laboratory
brugger's avatar
   
brugger committed
5
* LLNL-CODE-442911
hrchilds's avatar
hrchilds committed
6
7
* All rights reserved.
*
brugger's avatar
   
brugger committed
8
* This file is  part of VisIt. For  details, see https://visit.llnl.gov/.  The
hrchilds's avatar
hrchilds committed
9
10
11
12
13
14
15
16
17
18
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution  and  use  in  source  and  binary  forms,  with  or  without
* modification, are permitted provided that the following conditions are met:
*
*  - Redistributions of  source code must  retain the above  copyright notice,
*    this list of conditions and the disclaimer below.
*  - Redistributions in binary form must reproduce the above copyright notice,
*    this  list of  conditions  and  the  disclaimer (as noted below)  in  the
brugger's avatar
   
brugger committed
19
20
21
*    documentation and/or other materials provided with the distribution.
*  - Neither the name of  the LLNS/LLNL nor the names of  its contributors may
*    be used to endorse or promote products derived from this software without
hrchilds's avatar
hrchilds committed
22
23
24
25
26
*    specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT  HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING,  BUT NOT  LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR  PURPOSE
brugger's avatar
   
brugger committed
27
28
29
* ARE  DISCLAIMED. IN  NO EVENT  SHALL LAWRENCE  LIVERMORE NATIONAL  SECURITY,
* LLC, THE  U.S.  DEPARTMENT OF  ENERGY  OR  CONTRIBUTORS BE  LIABLE  FOR  ANY
* DIRECT,  INDIRECT,   INCIDENTAL,   SPECIAL,   EXEMPLARY,  OR   CONSEQUENTIAL
hrchilds's avatar
hrchilds committed
30
31
32
33
34
35
36
37
38
* DAMAGES (INCLUDING, BUT NOT  LIMITED TO, PROCUREMENT OF  SUBSTITUTE GOODS OR
* SERVICES; LOSS OF  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER
* CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT
* LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY  WAY
* OUT OF THE  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/

hrchilds's avatar
hrchilds committed
39
#include <avtDatabaseMetaData.h>
hrchilds's avatar
hrchilds committed
40
#include <DataNode.h>
hrchilds's avatar
hrchilds committed
41
#include <ImproperUseException.h>
hrchilds's avatar
hrchilds committed
42
#include <InvalidVariableException.h>
hrchilds's avatar
hrchilds committed
43
44
45
46
47
#include <BadIndexException.h>
#include <DebugStream.h>
#include <ParsingExprList.h>
#include <ExprNode.h>
#include <snprintf.h>
48
#include <plugin_vartypes.h>
hrchilds's avatar
hrchilds committed
49
#include <avtMeshMetaData.h>
50
#include <avtSubsetsMetaData.h>
hrchilds's avatar
hrchilds committed
51
52
53
54
55
56
57
58
59
60
#include <avtScalarMetaData.h>
#include <avtVectorMetaData.h>
#include <avtTensorMetaData.h>
#include <avtSymmetricTensorMetaData.h>
#include <avtArrayMetaData.h>
#include <avtMaterialMetaData.h>
#include <avtSpeciesMetaData.h>
#include <avtCurveMetaData.h>
#include <avtLabelMetaData.h>
#include <avtDefaultPlotMetaData.h>
hrchilds's avatar
hrchilds committed
61

hrchilds's avatar
hrchilds committed
62
// ****************************************************************************
hrchilds's avatar
hrchilds committed
63
// Method: avtDatabaseMetaData::avtDatabaseMetaData
hrchilds's avatar
hrchilds committed
64
65
//
// Purpose: 
66
//   Init utility for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
67
//
hrchilds's avatar
hrchilds committed
68
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
69
//
hrchilds's avatar
hrchilds committed
70
// Programmer: xml2atts
71
// Creation:   omitted
hrchilds's avatar
hrchilds committed
72
73
74
75
76
//
// Modifications:
//   
// ****************************************************************************

77
void avtDatabaseMetaData::Init()
hrchilds's avatar
hrchilds committed
78
{
hrchilds's avatar
hrchilds committed
79
80
81
82
83
84
85
86
87
88
    hasTemporalExtents = false;
    minTemporalExtents = 0;
    maxTemporalExtents = 0;
    numStates = 0;
    isVirtualDatabase = false;
    mustRepopulateOnStateChange = false;
    mustAlphabetizeVariables = true;
    formatCanDoDomainDecomposition = false;
    useCatchAllMesh = false;
    isSimulation = false;
89
    replacementMask = -65;
90
91

    avtDatabaseMetaData::SelectAll();
hrchilds's avatar
hrchilds committed
92
93
}

hrchilds's avatar
hrchilds committed
94
// ****************************************************************************
hrchilds's avatar
hrchilds committed
95
// Method: avtDatabaseMetaData::avtDatabaseMetaData
hrchilds's avatar
hrchilds committed
96
//
hrchilds's avatar
hrchilds committed
97
// Purpose: 
98
//   Copy utility for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
99
//
hrchilds's avatar
hrchilds committed
100
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
101
//
hrchilds's avatar
hrchilds committed
102
// Programmer: xml2atts
103
// Creation:   omitted
hrchilds's avatar
hrchilds committed
104
//
hrchilds's avatar
hrchilds committed
105
106
// Modifications:
//   
hrchilds's avatar
hrchilds committed
107
108
// ****************************************************************************

109
void avtDatabaseMetaData::Copy(const avtDatabaseMetaData &obj)
hrchilds's avatar
hrchilds committed
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
    AttributeGroupVector::const_iterator pos;

    hasTemporalExtents = obj.hasTemporalExtents;
    minTemporalExtents = obj.minTemporalExtents;
    maxTemporalExtents = obj.maxTemporalExtents;
    numStates = obj.numStates;
    isVirtualDatabase = obj.isVirtualDatabase;
    mustRepopulateOnStateChange = obj.mustRepopulateOnStateChange;
    mustAlphabetizeVariables = obj.mustAlphabetizeVariables;
    formatCanDoDomainDecomposition = obj.formatCanDoDomainDecomposition;
    useCatchAllMesh = obj.useCatchAllMesh;
    timeStepPath = obj.timeStepPath;
    timeStepNames = obj.timeStepNames;
    cycles = obj.cycles;
    cyclesAreAccurate = obj.cyclesAreAccurate;
    times = obj.times;
    timesAreAccurate = obj.timesAreAccurate;
    databaseName = obj.databaseName;
    fileFormat = obj.fileFormat;
    databaseComment = obj.databaseComment;
    exprList = obj.exprList;
    // *** Copy the meshes field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = meshes.begin(); pos != meshes.end(); ++pos)
        delete *pos;
    meshes.clear();
    if(obj.meshes.size() > 0)
        meshes.reserve(obj.meshes.size());
    // Duplicate the meshes from obj.
    for(pos = obj.meshes.begin(); pos != obj.meshes.end(); ++pos)
hrchilds's avatar
hrchilds committed
141
    {
hrchilds's avatar
hrchilds committed
142
143
144
        avtMeshMetaData *oldavtMeshMetaData = (avtMeshMetaData *)(*pos);
        avtMeshMetaData *newavtMeshMetaData = new avtMeshMetaData(*oldavtMeshMetaData);
        meshes.push_back(newavtMeshMetaData);
hrchilds's avatar
hrchilds committed
145
    }
hrchilds's avatar
hrchilds committed
146

147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
    // *** Copy the subsets field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = subsets.begin(); pos != subsets.end(); ++pos)
        delete *pos;
    subsets.clear();
    if(obj.subsets.size() > 0)
        subsets.reserve(obj.subsets.size());
    // Duplicate the subsets from obj.
    for(pos = obj.subsets.begin(); pos != obj.subsets.end(); ++pos)
    {
        avtSubsetsMetaData *oldavtSubsetsMetaData = (avtSubsetsMetaData *)(*pos);
        avtSubsetsMetaData *newavtSubsetsMetaData = new avtSubsetsMetaData(*oldavtSubsetsMetaData);
        subsets.push_back(newavtSubsetsMetaData);
    }

hrchilds's avatar
hrchilds committed
162
163
164
165
166
167
168
169
170
    // *** Copy the scalars field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = scalars.begin(); pos != scalars.end(); ++pos)
        delete *pos;
    scalars.clear();
    if(obj.scalars.size() > 0)
        scalars.reserve(obj.scalars.size());
    // Duplicate the scalars from obj.
    for(pos = obj.scalars.begin(); pos != obj.scalars.end(); ++pos)
hrchilds's avatar
hrchilds committed
171
    {
hrchilds's avatar
hrchilds committed
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
        avtScalarMetaData *oldavtScalarMetaData = (avtScalarMetaData *)(*pos);
        avtScalarMetaData *newavtScalarMetaData = new avtScalarMetaData(*oldavtScalarMetaData);
        scalars.push_back(newavtScalarMetaData);
    }

    // *** Copy the vectors field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = vectors.begin(); pos != vectors.end(); ++pos)
        delete *pos;
    vectors.clear();
    if(obj.vectors.size() > 0)
        vectors.reserve(obj.vectors.size());
    // Duplicate the vectors from obj.
    for(pos = obj.vectors.begin(); pos != obj.vectors.end(); ++pos)
    {
        avtVectorMetaData *oldavtVectorMetaData = (avtVectorMetaData *)(*pos);
        avtVectorMetaData *newavtVectorMetaData = new avtVectorMetaData(*oldavtVectorMetaData);
        vectors.push_back(newavtVectorMetaData);
    }

    // *** Copy the tensors field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = tensors.begin(); pos != tensors.end(); ++pos)
        delete *pos;
    tensors.clear();
    if(obj.tensors.size() > 0)
        tensors.reserve(obj.tensors.size());
    // Duplicate the tensors from obj.
    for(pos = obj.tensors.begin(); pos != obj.tensors.end(); ++pos)
    {
        avtTensorMetaData *oldavtTensorMetaData = (avtTensorMetaData *)(*pos);
        avtTensorMetaData *newavtTensorMetaData = new avtTensorMetaData(*oldavtTensorMetaData);
        tensors.push_back(newavtTensorMetaData);
    }

    // *** Copy the symmTensors field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = symmTensors.begin(); pos != symmTensors.end(); ++pos)
        delete *pos;
    symmTensors.clear();
    if(obj.symmTensors.size() > 0)
        symmTensors.reserve(obj.symmTensors.size());
    // Duplicate the symmTensors from obj.
    for(pos = obj.symmTensors.begin(); pos != obj.symmTensors.end(); ++pos)
    {
        avtSymmetricTensorMetaData *oldavtSymmetricTensorMetaData = (avtSymmetricTensorMetaData *)(*pos);
        avtSymmetricTensorMetaData *newavtSymmetricTensorMetaData = new avtSymmetricTensorMetaData(*oldavtSymmetricTensorMetaData);
        symmTensors.push_back(newavtSymmetricTensorMetaData);
    }

    // *** Copy the arrays field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = arrays.begin(); pos != arrays.end(); ++pos)
        delete *pos;
    arrays.clear();
    if(obj.arrays.size() > 0)
        arrays.reserve(obj.arrays.size());
    // Duplicate the arrays from obj.
    for(pos = obj.arrays.begin(); pos != obj.arrays.end(); ++pos)
    {
        avtArrayMetaData *oldavtArrayMetaData = (avtArrayMetaData *)(*pos);
        avtArrayMetaData *newavtArrayMetaData = new avtArrayMetaData(*oldavtArrayMetaData);
        arrays.push_back(newavtArrayMetaData);
    }

    // *** Copy the materials field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = materials.begin(); pos != materials.end(); ++pos)
        delete *pos;
    materials.clear();
    if(obj.materials.size() > 0)
        materials.reserve(obj.materials.size());
    // Duplicate the materials from obj.
    for(pos = obj.materials.begin(); pos != obj.materials.end(); ++pos)
    {
        avtMaterialMetaData *oldavtMaterialMetaData = (avtMaterialMetaData *)(*pos);
        avtMaterialMetaData *newavtMaterialMetaData = new avtMaterialMetaData(*oldavtMaterialMetaData);
        materials.push_back(newavtMaterialMetaData);
    }

    // *** Copy the species field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = species.begin(); pos != species.end(); ++pos)
        delete *pos;
    species.clear();
    if(obj.species.size() > 0)
        species.reserve(obj.species.size());
    // Duplicate the species from obj.
    for(pos = obj.species.begin(); pos != obj.species.end(); ++pos)
    {
        avtSpeciesMetaData *oldavtSpeciesMetaData = (avtSpeciesMetaData *)(*pos);
        avtSpeciesMetaData *newavtSpeciesMetaData = new avtSpeciesMetaData(*oldavtSpeciesMetaData);
        species.push_back(newavtSpeciesMetaData);
    }

    // *** Copy the curves field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = curves.begin(); pos != curves.end(); ++pos)
        delete *pos;
    curves.clear();
    if(obj.curves.size() > 0)
        curves.reserve(obj.curves.size());
    // Duplicate the curves from obj.
    for(pos = obj.curves.begin(); pos != obj.curves.end(); ++pos)
    {
        avtCurveMetaData *oldavtCurveMetaData = (avtCurveMetaData *)(*pos);
        avtCurveMetaData *newavtCurveMetaData = new avtCurveMetaData(*oldavtCurveMetaData);
        curves.push_back(newavtCurveMetaData);
    }

    // *** Copy the labels field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = labels.begin(); pos != labels.end(); ++pos)
        delete *pos;
    labels.clear();
    if(obj.labels.size() > 0)
        labels.reserve(obj.labels.size());
    // Duplicate the labels from obj.
    for(pos = obj.labels.begin(); pos != obj.labels.end(); ++pos)
    {
        avtLabelMetaData *oldavtLabelMetaData = (avtLabelMetaData *)(*pos);
        avtLabelMetaData *newavtLabelMetaData = new avtLabelMetaData(*oldavtLabelMetaData);
        labels.push_back(newavtLabelMetaData);
    }

    // *** Copy the defaultPlots field ***
    // Delete the AttributeGroup objects and clear the vector.
    for(pos = defaultPlots.begin(); pos != defaultPlots.end(); ++pos)
        delete *pos;
    defaultPlots.clear();
    if(obj.defaultPlots.size() > 0)
        defaultPlots.reserve(obj.defaultPlots.size());
    // Duplicate the defaultPlots from obj.
    for(pos = obj.defaultPlots.begin(); pos != obj.defaultPlots.end(); ++pos)
    {
        avtDefaultPlotMetaData *oldavtDefaultPlotMetaData = (avtDefaultPlotMetaData *)(*pos);
        avtDefaultPlotMetaData *newavtDefaultPlotMetaData = new avtDefaultPlotMetaData(*oldavtDefaultPlotMetaData);
        defaultPlots.push_back(newavtDefaultPlotMetaData);
    }

    isSimulation = obj.isSimulation;
    simInfo = obj.simInfo;
314
    suggestedDefaultSILRestriction = obj.suggestedDefaultSILRestriction;
315
    replacementMask = obj.replacementMask;
hrchilds's avatar
hrchilds committed
316

317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
    avtDatabaseMetaData::SelectAll();
}

// Type map format string
const char *avtDatabaseMetaData::TypeMapFormatString = AVTDATABASEMETADATA_TMFS;
const AttributeGroup::private_tmfs_t avtDatabaseMetaData::TmfsStruct = {AVTDATABASEMETADATA_TMFS};


// ****************************************************************************
// Method: avtDatabaseMetaData::avtDatabaseMetaData
//
// Purpose: 
//   Default constructor for the avtDatabaseMetaData class.
//
// Note:       Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation:   omitted
//
// Modifications:
//   
// ****************************************************************************

avtDatabaseMetaData::avtDatabaseMetaData() : 
    AttributeSubject(avtDatabaseMetaData::TypeMapFormatString)
{
    avtDatabaseMetaData::Init();
}

// ****************************************************************************
// Method: avtDatabaseMetaData::avtDatabaseMetaData
//
// Purpose: 
//   Constructor for the derived classes of avtDatabaseMetaData class.
//
// Note:       Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation:   omitted
//
// Modifications:
//   
// ****************************************************************************

avtDatabaseMetaData::avtDatabaseMetaData(private_tmfs_t tmfs) : 
    AttributeSubject(tmfs.tmfs)
{
    avtDatabaseMetaData::Init();
}

// ****************************************************************************
// Method: avtDatabaseMetaData::avtDatabaseMetaData
//
// Purpose: 
//   Copy constructor for the avtDatabaseMetaData class.
//
// Note:       Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation:   omitted
//
// Modifications:
//   
// ****************************************************************************

avtDatabaseMetaData::avtDatabaseMetaData(const avtDatabaseMetaData &obj) : 
    AttributeSubject(avtDatabaseMetaData::TypeMapFormatString)
{
    avtDatabaseMetaData::Copy(obj);
}

// ****************************************************************************
// Method: avtDatabaseMetaData::avtDatabaseMetaData
//
// Purpose: 
//   Copy constructor for derived classes of the avtDatabaseMetaData class.
//
// Note:       Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation:   omitted
//
// Modifications:
//   
// ****************************************************************************

avtDatabaseMetaData::avtDatabaseMetaData(const avtDatabaseMetaData &obj, private_tmfs_t tmfs) : 
    AttributeSubject(tmfs.tmfs)
{
    avtDatabaseMetaData::Copy(obj);
hrchilds's avatar
hrchilds committed
407
408
409
}

// ****************************************************************************
hrchilds's avatar
hrchilds committed
410
// Method: avtDatabaseMetaData::~avtDatabaseMetaData
hrchilds's avatar
hrchilds committed
411
//
hrchilds's avatar
hrchilds committed
412
413
// Purpose: 
//   Destructor for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
414
//
hrchilds's avatar
hrchilds committed
415
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
416
//
hrchilds's avatar
hrchilds committed
417
// Programmer: xml2atts
418
// Creation:   omitted
hrchilds's avatar
hrchilds committed
419
//
hrchilds's avatar
hrchilds committed
420
421
422
423
424
425
426
427
428
429
430
// Modifications:
//   
// ****************************************************************************

avtDatabaseMetaData::~avtDatabaseMetaData()
{
    AttributeGroupVector::iterator pos;

    // Destroy the meshes field.
    for(pos = meshes.begin(); pos != meshes.end(); ++pos)
        delete *pos;
431
432
433
    // Destroy the subsets field.
    for(pos = subsets.begin(); pos != subsets.end(); ++pos)
        delete *pos;
hrchilds's avatar
hrchilds committed
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
    // Destroy the scalars field.
    for(pos = scalars.begin(); pos != scalars.end(); ++pos)
        delete *pos;
    // Destroy the vectors field.
    for(pos = vectors.begin(); pos != vectors.end(); ++pos)
        delete *pos;
    // Destroy the tensors field.
    for(pos = tensors.begin(); pos != tensors.end(); ++pos)
        delete *pos;
    // Destroy the symmTensors field.
    for(pos = symmTensors.begin(); pos != symmTensors.end(); ++pos)
        delete *pos;
    // Destroy the arrays field.
    for(pos = arrays.begin(); pos != arrays.end(); ++pos)
        delete *pos;
    // Destroy the materials field.
    for(pos = materials.begin(); pos != materials.end(); ++pos)
        delete *pos;
    // Destroy the species field.
    for(pos = species.begin(); pos != species.end(); ++pos)
        delete *pos;
    // Destroy the curves field.
    for(pos = curves.begin(); pos != curves.end(); ++pos)
        delete *pos;
    // Destroy the labels field.
    for(pos = labels.begin(); pos != labels.end(); ++pos)
        delete *pos;
    // Destroy the defaultPlots field.
    for(pos = defaultPlots.begin(); pos != defaultPlots.end(); ++pos)
        delete *pos;
}

// ****************************************************************************
// Method: avtDatabaseMetaData::operator = 
hrchilds's avatar
hrchilds committed
468
//
hrchilds's avatar
hrchilds committed
469
470
// Purpose: 
//   Assignment operator for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
471
//
hrchilds's avatar
hrchilds committed
472
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
473
//
hrchilds's avatar
hrchilds committed
474
// Programmer: xml2atts
475
// Creation:   omitted
hrchilds's avatar
hrchilds committed
476
//
hrchilds's avatar
hrchilds committed
477
478
// Modifications:
//   
hrchilds's avatar
hrchilds committed
479
480
// ****************************************************************************

hrchilds's avatar
hrchilds committed
481
482
483
484
avtDatabaseMetaData& 
avtDatabaseMetaData::operator = (const avtDatabaseMetaData &obj)
{
    if (this == &obj) return *this;
485

486
    avtDatabaseMetaData::Copy(obj);
487

hrchilds's avatar
hrchilds committed
488
489
    return *this;
}
hrchilds's avatar
hrchilds committed
490
491

// ****************************************************************************
hrchilds's avatar
hrchilds committed
492
// Method: avtDatabaseMetaData::operator == 
hrchilds's avatar
hrchilds committed
493
//
hrchilds's avatar
hrchilds committed
494
495
// Purpose: 
//   Comparison operator == for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
496
//
hrchilds's avatar
hrchilds committed
497
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
498
//
hrchilds's avatar
hrchilds committed
499
// Programmer: xml2atts
500
// Creation:   omitted
hrchilds's avatar
hrchilds committed
501
//
hrchilds's avatar
hrchilds committed
502
503
// Modifications:
//   
hrchilds's avatar
hrchilds committed
504
505
// ****************************************************************************

hrchilds's avatar
hrchilds committed
506
507
bool
avtDatabaseMetaData::operator == (const avtDatabaseMetaData &obj) const
hrchilds's avatar
hrchilds committed
508
{
hrchilds's avatar
hrchilds committed
509
    bool meshes_equal = (obj.meshes.size() == meshes.size());
510
    for(size_t i = 0; (i < meshes.size()) && meshes_equal; ++i)
hrchilds's avatar
hrchilds committed
511
512
513
514
515
516
    {
        // Make references to avtMeshMetaData from AttributeGroup *.
        const avtMeshMetaData &meshes1 = *((const avtMeshMetaData *)(meshes[i]));
        const avtMeshMetaData &meshes2 = *((const avtMeshMetaData *)(obj.meshes[i]));
        meshes_equal = (meshes1 == meshes2);
    }
hrchilds's avatar
hrchilds committed
517

518
519
520
521
522
523
524
525
526
    bool subsets_equal = (obj.subsets.size() == subsets.size());
    for(size_t i = 0; (i < subsets.size()) && subsets_equal; ++i)
    {
        // Make references to avtSubsetsMetaData from AttributeGroup *.
        const avtSubsetsMetaData &subsets1 = *((const avtSubsetsMetaData *)(subsets[i]));
        const avtSubsetsMetaData &subsets2 = *((const avtSubsetsMetaData *)(obj.subsets[i]));
        subsets_equal = (subsets1 == subsets2);
    }

hrchilds's avatar
hrchilds committed
527
    bool scalars_equal = (obj.scalars.size() == scalars.size());
528
    for(size_t i = 0; (i < scalars.size()) && scalars_equal; ++i)
hrchilds's avatar
hrchilds committed
529
530
531
532
533
534
    {
        // Make references to avtScalarMetaData from AttributeGroup *.
        const avtScalarMetaData &scalars1 = *((const avtScalarMetaData *)(scalars[i]));
        const avtScalarMetaData &scalars2 = *((const avtScalarMetaData *)(obj.scalars[i]));
        scalars_equal = (scalars1 == scalars2);
    }
hrchilds's avatar
hrchilds committed
535

hrchilds's avatar
hrchilds committed
536
    bool vectors_equal = (obj.vectors.size() == vectors.size());
537
    for(size_t i = 0; (i < vectors.size()) && vectors_equal; ++i)
hrchilds's avatar
hrchilds committed
538
539
540
541
542
543
    {
        // Make references to avtVectorMetaData from AttributeGroup *.
        const avtVectorMetaData &vectors1 = *((const avtVectorMetaData *)(vectors[i]));
        const avtVectorMetaData &vectors2 = *((const avtVectorMetaData *)(obj.vectors[i]));
        vectors_equal = (vectors1 == vectors2);
    }
hrchilds's avatar
hrchilds committed
544

hrchilds's avatar
hrchilds committed
545
    bool tensors_equal = (obj.tensors.size() == tensors.size());
546
    for(size_t i = 0; (i < tensors.size()) && tensors_equal; ++i)
hrchilds's avatar
hrchilds committed
547
    {
hrchilds's avatar
hrchilds committed
548
549
550
551
        // Make references to avtTensorMetaData from AttributeGroup *.
        const avtTensorMetaData &tensors1 = *((const avtTensorMetaData *)(tensors[i]));
        const avtTensorMetaData &tensors2 = *((const avtTensorMetaData *)(obj.tensors[i]));
        tensors_equal = (tensors1 == tensors2);
hrchilds's avatar
hrchilds committed
552
    }
hrchilds's avatar
hrchilds committed
553
554

    bool symmTensors_equal = (obj.symmTensors.size() == symmTensors.size());
555
    for(size_t i = 0; (i < symmTensors.size()) && symmTensors_equal; ++i)
hrchilds's avatar
hrchilds committed
556
    {
hrchilds's avatar
hrchilds committed
557
558
559
560
        // Make references to avtSymmetricTensorMetaData from AttributeGroup *.
        const avtSymmetricTensorMetaData &symmTensors1 = *((const avtSymmetricTensorMetaData *)(symmTensors[i]));
        const avtSymmetricTensorMetaData &symmTensors2 = *((const avtSymmetricTensorMetaData *)(obj.symmTensors[i]));
        symmTensors_equal = (symmTensors1 == symmTensors2);
hrchilds's avatar
hrchilds committed
561
    }
hrchilds's avatar
hrchilds committed
562

hrchilds's avatar
hrchilds committed
563
    bool arrays_equal = (obj.arrays.size() == arrays.size());
564
    for(size_t i = 0; (i < arrays.size()) && arrays_equal; ++i)
hrchilds's avatar
hrchilds committed
565
566
567
568
569
570
    {
        // Make references to avtArrayMetaData from AttributeGroup *.
        const avtArrayMetaData &arrays1 = *((const avtArrayMetaData *)(arrays[i]));
        const avtArrayMetaData &arrays2 = *((const avtArrayMetaData *)(obj.arrays[i]));
        arrays_equal = (arrays1 == arrays2);
    }
hrchilds's avatar
hrchilds committed
571

hrchilds's avatar
hrchilds committed
572
    bool materials_equal = (obj.materials.size() == materials.size());
573
    for(size_t i = 0; (i < materials.size()) && materials_equal; ++i)
hrchilds's avatar
hrchilds committed
574
575
576
577
578
579
    {
        // Make references to avtMaterialMetaData from AttributeGroup *.
        const avtMaterialMetaData &materials1 = *((const avtMaterialMetaData *)(materials[i]));
        const avtMaterialMetaData &materials2 = *((const avtMaterialMetaData *)(obj.materials[i]));
        materials_equal = (materials1 == materials2);
    }
hrchilds's avatar
hrchilds committed
580

hrchilds's avatar
hrchilds committed
581
    bool species_equal = (obj.species.size() == species.size());
582
    for(size_t i = 0; (i < species.size()) && species_equal; ++i)
hrchilds's avatar
hrchilds committed
583
    {
hrchilds's avatar
hrchilds committed
584
585
586
587
        // Make references to avtSpeciesMetaData from AttributeGroup *.
        const avtSpeciesMetaData &species1 = *((const avtSpeciesMetaData *)(species[i]));
        const avtSpeciesMetaData &species2 = *((const avtSpeciesMetaData *)(obj.species[i]));
        species_equal = (species1 == species2);
hrchilds's avatar
hrchilds committed
588
    }
hrchilds's avatar
hrchilds committed
589
590

    bool curves_equal = (obj.curves.size() == curves.size());
591
    for(size_t i = 0; (i < curves.size()) && curves_equal; ++i)
hrchilds's avatar
hrchilds committed
592
    {
hrchilds's avatar
hrchilds committed
593
594
595
596
597
598
599
        // Make references to avtCurveMetaData from AttributeGroup *.
        const avtCurveMetaData &curves1 = *((const avtCurveMetaData *)(curves[i]));
        const avtCurveMetaData &curves2 = *((const avtCurveMetaData *)(obj.curves[i]));
        curves_equal = (curves1 == curves2);
    }

    bool labels_equal = (obj.labels.size() == labels.size());
600
    for(size_t i = 0; (i < labels.size()) && labels_equal; ++i)
hrchilds's avatar
hrchilds committed
601
602
603
604
605
    {
        // Make references to avtLabelMetaData from AttributeGroup *.
        const avtLabelMetaData &labels1 = *((const avtLabelMetaData *)(labels[i]));
        const avtLabelMetaData &labels2 = *((const avtLabelMetaData *)(obj.labels[i]));
        labels_equal = (labels1 == labels2);
hrchilds's avatar
hrchilds committed
606
    }
hrchilds's avatar
hrchilds committed
607
608

    bool defaultPlots_equal = (obj.defaultPlots.size() == defaultPlots.size());
609
    for(size_t i = 0; (i < defaultPlots.size()) && defaultPlots_equal; ++i)
hrchilds's avatar
hrchilds committed
610
    {
hrchilds's avatar
hrchilds committed
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
        // Make references to avtDefaultPlotMetaData from AttributeGroup *.
        const avtDefaultPlotMetaData &defaultPlots1 = *((const avtDefaultPlotMetaData *)(defaultPlots[i]));
        const avtDefaultPlotMetaData &defaultPlots2 = *((const avtDefaultPlotMetaData *)(obj.defaultPlots[i]));
        defaultPlots_equal = (defaultPlots1 == defaultPlots2);
    }

    // Create the return value
    return ((hasTemporalExtents == obj.hasTemporalExtents) &&
            (minTemporalExtents == obj.minTemporalExtents) &&
            (maxTemporalExtents == obj.maxTemporalExtents) &&
            (numStates == obj.numStates) &&
            (isVirtualDatabase == obj.isVirtualDatabase) &&
            (mustRepopulateOnStateChange == obj.mustRepopulateOnStateChange) &&
            (mustAlphabetizeVariables == obj.mustAlphabetizeVariables) &&
            (formatCanDoDomainDecomposition == obj.formatCanDoDomainDecomposition) &&
            (useCatchAllMesh == obj.useCatchAllMesh) &&
            (timeStepPath == obj.timeStepPath) &&
            (timeStepNames == obj.timeStepNames) &&
            (cycles == obj.cycles) &&
            (cyclesAreAccurate == obj.cyclesAreAccurate) &&
            (times == obj.times) &&
            (timesAreAccurate == obj.timesAreAccurate) &&
            (databaseName == obj.databaseName) &&
            (fileFormat == obj.fileFormat) &&
            (databaseComment == obj.databaseComment) &&
            (exprList == obj.exprList) &&
            meshes_equal &&
638
            subsets_equal &&
hrchilds's avatar
hrchilds committed
639
640
641
642
643
644
645
646
647
648
649
            scalars_equal &&
            vectors_equal &&
            tensors_equal &&
            symmTensors_equal &&
            arrays_equal &&
            materials_equal &&
            species_equal &&
            curves_equal &&
            labels_equal &&
            defaultPlots_equal &&
            (isSimulation == obj.isSimulation) &&
650
            (simInfo == obj.simInfo) &&
651
652
            (suggestedDefaultSILRestriction == obj.suggestedDefaultSILRestriction) &&
            (replacementMask == obj.replacementMask));
hrchilds's avatar
hrchilds committed
653
}
hrchilds's avatar
hrchilds committed
654
655

// ****************************************************************************
hrchilds's avatar
hrchilds committed
656
// Method: avtDatabaseMetaData::operator != 
hrchilds's avatar
hrchilds committed
657
//
hrchilds's avatar
hrchilds committed
658
659
660
661
662
663
// Purpose: 
//   Comparison operator != for the avtDatabaseMetaData class.
//
// Note:       Autogenerated by xml2atts.
//
// Programmer: xml2atts
664
// Creation:   omitted
hrchilds's avatar
hrchilds committed
665
666
667
668
669
//
// Modifications:
//   
// ****************************************************************************

hrchilds's avatar
hrchilds committed
670
671
bool
avtDatabaseMetaData::operator != (const avtDatabaseMetaData &obj) const
hrchilds's avatar
hrchilds committed
672
{
hrchilds's avatar
hrchilds committed
673
    return !(this->operator == (obj));
hrchilds's avatar
hrchilds committed
674
675
676
}

// ****************************************************************************
hrchilds's avatar
hrchilds committed
677
// Method: avtDatabaseMetaData::TypeName
hrchilds's avatar
hrchilds committed
678
//
hrchilds's avatar
hrchilds committed
679
680
// Purpose: 
//   Type name method for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
681
//
hrchilds's avatar
hrchilds committed
682
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
683
//
hrchilds's avatar
hrchilds committed
684
// Programmer: xml2atts
685
// Creation:   omitted
hrchilds's avatar
hrchilds committed
686
//
hrchilds's avatar
hrchilds committed
687
688
689
690
691
692
693
694
695
696
697
698
// Modifications:
//   
// ****************************************************************************

const std::string
avtDatabaseMetaData::TypeName() const
{
    return "avtDatabaseMetaData";
}

// ****************************************************************************
// Method: avtDatabaseMetaData::CopyAttributes
hrchilds's avatar
hrchilds committed
699
//
hrchilds's avatar
hrchilds committed
700
701
// Purpose: 
//   CopyAttributes method for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
702
//
hrchilds's avatar
hrchilds committed
703
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
704
//
hrchilds's avatar
hrchilds committed
705
// Programmer: xml2atts
706
// Creation:   omitted
hrchilds's avatar
hrchilds committed
707
//
hrchilds's avatar
hrchilds committed
708
709
// Modifications:
//   
hrchilds's avatar
hrchilds committed
710
711
// ****************************************************************************

hrchilds's avatar
hrchilds committed
712
713
714
715
716
bool
avtDatabaseMetaData::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;
hrchilds's avatar
hrchilds committed
717

hrchilds's avatar
hrchilds committed
718
719
720
    // Call assignment operator.
    const avtDatabaseMetaData *tmp = (const avtDatabaseMetaData *)atts;
    *this = *tmp;
hrchilds's avatar
hrchilds committed
721

hrchilds's avatar
hrchilds committed
722
723
    return true;
}
hrchilds's avatar
hrchilds committed
724
725

// ****************************************************************************
hrchilds's avatar
hrchilds committed
726
// Method: avtDatabaseMetaData::CreateCompatible
hrchilds's avatar
hrchilds committed
727
//
hrchilds's avatar
hrchilds committed
728
729
// Purpose: 
//   CreateCompatible method for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
730
//
hrchilds's avatar
hrchilds committed
731
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
732
//
hrchilds's avatar
hrchilds committed
733
// Programmer: xml2atts
734
// Creation:   omitted
hrchilds's avatar
hrchilds committed
735
//
hrchilds's avatar
hrchilds committed
736
737
// Modifications:
//   
hrchilds's avatar
hrchilds committed
738
739
// ****************************************************************************

hrchilds's avatar
hrchilds committed
740
741
742
743
744
745
746
747
748
749
750
751
752
AttributeSubject *
avtDatabaseMetaData::CreateCompatible(const std::string &tname) const
{
    AttributeSubject *retval = 0;
    if(TypeName() == tname)
        retval = new avtDatabaseMetaData(*this);
    // Other cases could go here too. 

    return retval;
}

// ****************************************************************************
// Method: avtDatabaseMetaData::NewInstance
hrchilds's avatar
hrchilds committed
753
//
hrchilds's avatar
hrchilds committed
754
755
// Purpose: 
//   NewInstance method for the avtDatabaseMetaData class.
hrchilds's avatar
hrchilds committed
756
//
hrchilds's avatar
hrchilds committed
757
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
758
//
hrchilds's avatar
hrchilds committed
759
// Programmer: xml2atts
760
// Creation:   omitted
hrchilds's avatar
hrchilds committed
761
//
hrchilds's avatar
hrchilds committed
762
763
// Modifications:
//   
hrchilds's avatar
hrchilds committed
764
765
// ****************************************************************************

hrchilds's avatar
hrchilds committed
766
767
AttributeSubject *
avtDatabaseMetaData::NewInstance(bool copy) const
hrchilds's avatar
hrchilds committed
768
{
hrchilds's avatar
hrchilds committed
769
770
771
    AttributeSubject *retval = 0;
    if(copy)
        retval = new avtDatabaseMetaData(*this);
hrchilds's avatar
hrchilds committed
772
    else
hrchilds's avatar
hrchilds committed
773
        retval = new avtDatabaseMetaData;
hrchilds's avatar
hrchilds committed
774

hrchilds's avatar
hrchilds committed
775
776
    return retval;
}
hrchilds's avatar
hrchilds committed
777
778

// ****************************************************************************
hrchilds's avatar
hrchilds committed
779
// Method: avtDatabaseMetaData::SelectAll
hrchilds's avatar
hrchilds committed
780
//
hrchilds's avatar
hrchilds committed
781
782
// Purpose: 
//   Selects all attributes.
hrchilds's avatar
hrchilds committed
783
//
hrchilds's avatar
hrchilds committed
784
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
785
//
hrchilds's avatar
hrchilds committed
786
// Programmer: xml2atts
787
// Creation:   omitted
hrchilds's avatar
hrchilds committed
788
//
hrchilds's avatar
hrchilds committed
789
790
791
792
793
794
795
// Modifications:
//   
// ****************************************************************************

void
avtDatabaseMetaData::SelectAll()
{
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
    Select(ID_hasTemporalExtents,             (void *)&hasTemporalExtents);
    Select(ID_minTemporalExtents,             (void *)&minTemporalExtents);
    Select(ID_maxTemporalExtents,             (void *)&maxTemporalExtents);
    Select(ID_numStates,                      (void *)&numStates);
    Select(ID_isVirtualDatabase,              (void *)&isVirtualDatabase);
    Select(ID_mustRepopulateOnStateChange,    (void *)&mustRepopulateOnStateChange);
    Select(ID_mustAlphabetizeVariables,       (void *)&mustAlphabetizeVariables);
    Select(ID_formatCanDoDomainDecomposition, (void *)&formatCanDoDomainDecomposition);
    Select(ID_useCatchAllMesh,                (void *)&useCatchAllMesh);
    Select(ID_timeStepPath,                   (void *)&timeStepPath);
    Select(ID_timeStepNames,                  (void *)&timeStepNames);
    Select(ID_cycles,                         (void *)&cycles);
    Select(ID_cyclesAreAccurate,              (void *)&cyclesAreAccurate);
    Select(ID_times,                          (void *)&times);
    Select(ID_timesAreAccurate,               (void *)&timesAreAccurate);
    Select(ID_databaseName,                   (void *)&databaseName);
    Select(ID_fileFormat,                     (void *)&fileFormat);
    Select(ID_databaseComment,                (void *)&databaseComment);
    Select(ID_exprList,                       (void *)&exprList);
    Select(ID_meshes,                         (void *)&meshes);
816
    Select(ID_subsets,                        (void *)&subsets);
817
818
819
820
821
822
823
824
825
826
827
828
829
    Select(ID_scalars,                        (void *)&scalars);
    Select(ID_vectors,                        (void *)&vectors);
    Select(ID_tensors,                        (void *)&tensors);
    Select(ID_symmTensors,                    (void *)&symmTensors);
    Select(ID_arrays,                         (void *)&arrays);
    Select(ID_materials,                      (void *)&materials);
    Select(ID_species,                        (void *)&species);
    Select(ID_curves,                         (void *)&curves);
    Select(ID_labels,                         (void *)&labels);
    Select(ID_defaultPlots,                   (void *)&defaultPlots);
    Select(ID_isSimulation,                   (void *)&isSimulation);
    Select(ID_simInfo,                        (void *)&simInfo);
    Select(ID_suggestedDefaultSILRestriction, (void *)&suggestedDefaultSILRestriction);
830
    Select(ID_replacementMask,                (void *)&replacementMask);
hrchilds's avatar
hrchilds committed
831
832
833
834
}

// ****************************************************************************
// Method: avtDatabaseMetaData::CreateSubAttributeGroup
hrchilds's avatar
hrchilds committed
835
//
hrchilds's avatar
hrchilds committed
836
837
// Purpose: 
//   Contains database metadata attributes
hrchilds's avatar
hrchilds committed
838
//
hrchilds's avatar
hrchilds committed
839
// Note:       Autogenerated by xml2atts.
hrchilds's avatar
hrchilds committed
840
//
hrchilds's avatar
hrchilds committed
841
// Programmer: xml2atts
842
// Creation:   omitted
hrchilds's avatar
hrchilds committed
843
//
hrchilds's avatar
hrchilds committed
844
845
// Modifications:
//   
hrchilds's avatar
hrchilds committed
846
847
// ****************************************************************************

hrchilds's avatar
hrchilds committed
848
849
AttributeGroup *
avtDatabaseMetaData::CreateSubAttributeGroup(int attr_id)
hrchilds's avatar
hrchilds committed
850
{
hrchilds's avatar
hrchilds committed
851
852
    AttributeGroup *retval = 0;
    switch(attr_id)
hrchilds's avatar
hrchilds committed
853
    {
854
    case ID_meshes:
hrchilds's avatar
hrchilds committed
855
        retval = new avtMeshMetaData;
hrchilds's avatar
hrchilds committed
856
        break;
857
858
859
    case ID_subsets:
        retval = new avtSubsetsMetaData;
        break;
860
    case ID_scalars:
hrchilds's avatar
hrchilds committed
861
        retval = new avtScalarMetaData;
hrchilds's avatar
hrchilds committed
862
        break;
863
    case ID_vectors:
hrchilds's avatar
hrchilds committed
864
        retval = new avtVectorMetaData;
hrchilds's avatar
hrchilds committed
865
        break;
866
    case ID_tensors:
hrchilds's avatar
hrchilds committed
867
        retval = new avtTensorMetaData;
hrchilds's avatar
hrchilds committed
868
        break;
869
    case ID_symmTensors:
hrchilds's avatar
hrchilds committed
870
        retval = new avtSymmetricTensorMetaData;
hrchilds's avatar
hrchilds committed
871
        break;
872
    case ID_arrays:
hrchilds's avatar
hrchilds committed
873
        retval = new avtArrayMetaData;
hrchilds's avatar
hrchilds committed
874
        break;
875
    case ID_materials:
hrchilds's avatar
hrchilds committed
876
        retval = new avtMaterialMetaData;
hrchilds's avatar
hrchilds committed
877
        break;
878
    case ID_species:
hrchilds's avatar
hrchilds committed
879
880
        retval = new avtSpeciesMetaData;
        break;
881
    case ID_curves:
hrchilds's avatar
hrchilds committed
882
883
        retval = new avtCurveMetaData;
        break;
884
    case ID_labels:
hrchilds's avatar
hrchilds committed
885
886
        retval = new avtLabelMetaData;
        break;
887
    case ID_defaultPlots:
hrchilds's avatar
hrchilds committed
888
889
        retval = new avtDefaultPlotMetaData;
        break;
hrchilds's avatar
hrchilds committed
890
    }
hrchilds's avatar
hrchilds committed
891

hrchilds's avatar
hrchilds committed
892
893
    return retval;
}
hrchilds's avatar
hrchilds committed
894

hrchilds's avatar
hrchilds committed
895
896
897
///////////////////////////////////////////////////////////////////////////////
// Set property methods
///////////////////////////////////////////////////////////////////////////////
hrchilds's avatar
hrchilds committed
898

hrchilds's avatar
hrchilds committed
899
900
901
902
void
avtDatabaseMetaData::SetHasTemporalExtents(bool hasTemporalExtents_)
{
    hasTemporalExtents = hasTemporalExtents_;
903
    Select(ID_hasTemporalExtents, (void *)&hasTemporalExtents);
hrchilds's avatar
hrchilds committed
904
}
hrchilds's avatar
hrchilds committed
905

hrchilds's avatar
hrchilds committed
906
907
908
909
void
avtDatabaseMetaData::SetMinTemporalExtents(double minTemporalExtents_)
{
    minTemporalExtents = minTemporalExtents_;
910
    Select(ID_minTemporalExtents, (void *)&minTemporalExtents);
hrchilds's avatar
hrchilds committed
911
912
}

hrchilds's avatar
hrchilds committed
913
914
915
916
void
avtDatabaseMetaData::SetMaxTemporalExtents(double maxTemporalExtents_)
{
    maxTemporalExtents = maxTemporalExtents_;
917
    Select(ID_maxTemporalExtents, (void *)&maxTemporalExtents);
hrchilds's avatar
hrchilds committed
918
}
hrchilds's avatar
hrchilds committed
919
920

// ****************************************************************************
hrchilds's avatar
hrchilds committed
921
//  Method: avtDatabaseMetaData::SetNumStates
hrchilds's avatar
hrchilds committed
922
923
//
//  Arguments:
hrchilds's avatar
hrchilds committed
924
//      int   the number of states
hrchilds's avatar
hrchilds committed
925
926
//
//  Programmer: Jeremy Meredith
hrchilds's avatar
hrchilds committed
927
//  Creation:   September 12, 2000
hrchilds's avatar
hrchilds committed
928
929
//
//  Modifications:
hrchilds's avatar
hrchilds committed
930
931
//    Hank Childs, Mon Mar 11 10:00:14 PST 2002 
//    Set up boolean vectors dependent on number of states.
hrchilds's avatar
hrchilds committed
932
//
hrchilds's avatar
hrchilds committed
933
934
//    Brad Whitlock, Tue Mar 25 14:32:13 PST 2003
//    I added the time step names.
hrchilds's avatar
hrchilds committed
935
//
hrchilds's avatar
hrchilds committed
936
937
// ****************************************************************************

hrchilds's avatar
hrchilds committed
938
939
void
avtDatabaseMetaData::SetNumStates(int n)
hrchilds's avatar
hrchilds committed
940
{
hrchilds's avatar
hrchilds committed
941
942
943
944
945
946
947
948
949
950
951
952
953
954
    numStates = n;
    cyclesAreAccurate.clear();
    timesAreAccurate.clear();
    cycles.clear();
    times.clear();
    timeStepNames.clear();
    for (int i = 0 ; i < numStates ; i++)
    {
        timeStepNames.push_back("");
        cyclesAreAccurate.push_back(0);
        timesAreAccurate.push_back(0);
        cycles.push_back(0);
        times.push_back(0.);
    }
hrchilds's avatar
hrchilds committed
955
956
}

hrchilds's avatar
hrchilds committed
957
958
void
avtDatabaseMetaData::SetIsVirtualDatabase(bool isVirtualDatabase_)
hrchilds's avatar
hrchilds committed
959
{
hrchilds's avatar
hrchilds committed
960
    isVirtualDatabase = isVirtualDatabase_;
961
    Select(ID_isVirtualDatabase, (void *)&isVirtualDatabase);
hrchilds's avatar
hrchilds committed
962
963
}

hrchilds's avatar
hrchilds committed
964
965
void
avtDatabaseMetaData::SetMustRepopulateOnStateChange(bool mustRepopulateOnStateChange_)
hrchilds's avatar
hrchilds committed
966
{
hrchilds's avatar
hrchilds committed
967
    mustRepopulateOnStateChange = mustRepopulateOnStateChange_;
968
    Select(ID_mustRepopulateOnStateChange, (void *)&mustRepopulateOnStateChange);
hrchilds's avatar
hrchilds committed
969
970
}

hrchilds's avatar
hrchilds committed
971
972
973
974
void
avtDatabaseMetaData::SetMustAlphabetizeVariables(bool mustAlphabetizeVariables_)
{
    mustAlphabetizeVariables = mustAlphabetizeVariables_;
975
    Select(ID_mustAlphabetizeVariables, (void *)&mustAlphabetizeVariables);
hrchilds's avatar
hrchilds committed
976
}
hrchilds's avatar
hrchilds committed
977
978

// ****************************************************************************
hrchilds's avatar
hrchilds committed
979
//  Method: avtDatabaseMetaData::SetFormatCanDoDomainDecomposition
hrchilds's avatar
hrchilds committed
980
//
hrchilds's avatar
hrchilds committed
981
982
983
984
985
986
987
988
989
//  Purpose:
//     Sets flag indicating that format can do domain decomposition. This
//     means all meshes should have numBlocks set to 1. Upon each attempt to
//     get data from the database, the format can decide how to decompose
//     the data across processors. This also means that when VisIt
//     "load-balances" blocks (i.e. domains) across processors, it will do so
//     by assigning the one and only block to each and every processor. It
//     is up to the plugin to decide which portion of the whole it will
//     actually return in a request to GetMesh(), GetVar(), ...
hrchilds's avatar
hrchilds committed
990
//
hrchilds's avatar
hrchilds committed
991
992
//  Programmer:  Mark C. Miller
//  Creation:    September 20, 2004 
hrchilds's avatar
hrchilds committed
993
994
// ****************************************************************************

hrchilds's avatar
hrchilds committed
995
996
void
avtDatabaseMetaData::SetFormatCanDoDomainDecomposition(bool can)
hrchilds's avatar
hrchilds committed
997
{
hrchilds's avatar
hrchilds committed
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
    if (can)
    {
        // see if there are any meshes with other than a single block 
        bool someMeshesHaveOtherThanOneBlock = false;
        for (int i = 0; i < GetNumMeshes(); i++)
        {
            if (GetMeshes(i).numBlocks != 1)
            {
                someMeshesHaveOtherThanOneBlock = true;
                break;
            }
        }
hrchilds's avatar
hrchilds committed
1010

hrchilds's avatar
hrchilds committed
1011
1012
1013
1014
1015
1016
        if (someMeshesHaveOtherThanOneBlock)
        {
            EXCEPTION1(ImproperUseException, "Format cannot do domain "
                "decomposition with meshes having other than a single block");
        }
    }
hrchilds's avatar
hrchilds committed
1017

hrchilds's avatar
hrchilds committed
1018
1019
    formatCanDoDomainDecomposition = can;
}
hrchilds's avatar
hrchilds committed
1020

hrchilds's avatar
hrchilds committed
1021
1022
void
avtDatabaseMetaData::SetUseCatchAllMesh(bool useCatchAllMesh_)
hrchilds's avatar
hrchilds committed
1023
{
hrchilds's avatar
hrchilds committed
1024
    useCatchAllMesh = useCatchAllMesh_;
1025
    Select(ID_useCatchAllMesh, (void *)&useCatchAllMesh);
hrchilds's avatar
hrchilds committed
1026
1027
}

hrchilds's avatar
hrchilds committed
1028
1029
1030
1031
void
avtDatabaseMetaData::SetTimeStepPath(const std::string &timeStepPath_)
{
    timeStepPath = timeStepPath_;
1032
    Select(ID_timeStepPath, (void *)&timeStepPath);
hrchilds's avatar
hrchilds committed
1033
}
hrchilds's avatar
hrchilds committed
1034

hrchilds's avatar
hrchilds committed
1035
1036
1037
1038
void
avtDatabaseMetaData::SetTimeStepNames(const stringVector &timeStepNames_)
{
    timeStepNames = timeStepNames_;
1039
    Select(ID_timeStepNames, (void *)&timeStepNames);
hrchilds's avatar
hrchilds committed
1040
}
hrchilds's avatar
hrchilds committed
1041

hrchilds's avatar
hrchilds committed
1042
1043
1044
1045
void
avtDatabaseMetaData::SetCycles(const intVector &cycles_)
{
    cycles = cycles_;
1046
    Select(ID_cycles, (void *)&cycles);
hrchilds's avatar
hrchilds committed
1047
1048
}

hrchilds's avatar
hrchilds committed
1049
1050
1051
1052
void
avtDatabaseMetaData::SetCyclesAreAccurate(const intVector &cyclesAreAccurate_)
{
    cyclesAreAccurate = cyclesAreAccurate_;
1053
    Select(ID_cyclesAreAccurate, (void *)&cyclesAreAccurate);
hrchilds's avatar
hrchilds committed
1054
}
hrchilds's avatar
hrchilds committed
1055

hrchilds's avatar
hrchilds committed
1056
1057
1058
1059
void
avtDatabaseMetaData::SetTimes(const doubleVector &times_)
{
    times = times_;
1060
    Select(ID_times, (void *)&times);
hrchilds's avatar
hrchilds committed
1061
}
hrchilds's avatar
hrchilds committed
1062
1063

void
hrchilds's avatar
hrchilds committed
1064
avtDatabaseMetaData::SetTimesAreAccurate(const intVector &timesAreAccurate_)
hrchilds's avatar
hrchilds committed
1065
{
hrchilds's avatar
hrchilds committed
1066
    timesAreAccurate = timesAreAccurate_;
1067
    Select(ID_timesAreAccurate, (void *)&timesAreAccurate);
hrchilds's avatar
hrchilds committed
1068
1069
}

hrchilds's avatar
hrchilds committed
1070
1071
1072
1073
void
avtDatabaseMetaData::SetDatabaseName(const std::string &databaseName_)
{
    databaseName = databaseName_;
1074
    Select(ID_databaseName, (void *)&databaseName);
hrchilds's avatar
hrchilds committed
1075
}
hrchilds's avatar
hrchilds committed
1076

hrchilds's avatar
hrchilds committed
1077
1078
1079
1080
void
avtDatabaseMetaData::SetFileFormat(const std::string &fileFormat_)
{
    fileFormat = fileFormat_;
1081
    Select(ID_fileFormat, (void *)&fileFormat);
hrchilds's avatar
hrchilds committed
1082
}
hrchilds's avatar
hrchilds committed
1083
1084

void
hrchilds's avatar
hrchilds committed
1085
avtDatabaseMetaData::SetDatabaseComment(const std::string &databaseComment_)
hrchilds's avatar
hrchilds committed
1086
{
hrchilds's avatar
hrchilds committed
1087
    databaseComment = databaseComment_;
1088
    Select(ID_databaseComment, (void *)&databaseComment);
hrchilds's avatar
hrchilds committed
1089
1090
}

hrchilds's avatar
hrchilds committed
1091
1092
1093
1094
void
avtDatabaseMetaData::SetExprList(const ExpressionList &exprList_)
{
    exprList = exprList_;
1095
    Select(ID_exprList, (void *)&exprList);
hrchilds's avatar
hrchilds committed
1096
}
hrchilds's avatar
hrchilds committed
1097

hrchilds's avatar
hrchilds committed
1098
1099
1100
1101
void
avtDatabaseMetaData::SetIsSimulation(bool isSimulation_)
{
    isSimulation = isSimulation_;
1102
    Select(ID_isSimulation, (void *)&isSimulation);
hrchilds's avatar
hrchilds committed
1103
}
hrchilds's avatar
hrchilds committed
1104
1105

void
hrchilds's avatar
hrchilds committed
1106
avtDatabaseMetaData::SetSimInfo(const avtSimulationInformation &simInfo_)
hrchilds's avatar
hrchilds committed
1107
{
hrchilds's avatar
hrchilds committed
1108
    simInfo = simInfo_;
1109
1110
1111
1112
1113
1114
1115
1116
    Select(ID_simInfo, (void *)&simInfo);
}

void
avtDatabaseMetaData::SetSuggestedDefaultSILRestriction(const stringVector &suggestedDefaultSILRestriction_)
{
    suggestedDefaultSILRestriction = suggestedDefaultSILRestriction_;
    Select(ID_suggestedDefaultSILRestriction, (void *)&suggestedDefaultSILRestriction);
hrchilds's avatar
hrchilds committed
1117
}
hrchilds's avatar
hrchilds committed
1118

1119
1120
1121
1122
1123
1124
1125
void
avtDatabaseMetaData::SetReplacementMask(int replacementMask_)
{
    replacementMask = replacementMask_;
    Select(ID_replacementMask, (void *)&replacementMask);
}

hrchilds's avatar
hrchilds committed
1126
1127
1128
///////////////////////////////////////////////////////////////////////////////
// Get property methods
///////////////////////////////////////////////////////////////////////////////
hrchilds's avatar
hrchilds committed
1129

hrchilds's avatar
hrchilds committed
1130
1131
1132
1133
1134
bool
avtDatabaseMetaData::GetHasTemporalExtents() const
{
    return hasTemporalExtents;
}
hrchilds's avatar
hrchilds committed
1135

hrchilds's avatar
hrchilds committed
1136
1137
1138
1139
1140
double
avtDatabaseMetaData::GetMinTemporalExtents() const
{
    return minTemporalExtents;
}
hrchilds's avatar
hrchilds committed
1141

hrchilds's avatar
hrchilds committed
1142
1143
1144
1145
1146
double
avtDatabaseMetaData::GetMaxTemporalExtents() const
{
    return maxTemporalExtents;
}
hrchilds's avatar
hrchilds committed
1147

hrchilds's avatar
hrchilds committed
1148
1149
1150
1151
1152
int
avtDatabaseMetaData::GetNumStates() const
{
    return numStates;
}
hrchilds's avatar
hrchilds committed
1153

hrchilds's avatar
hrchilds committed
1154
1155
1156
1157
1158
bool
avtDatabaseMetaData::GetIsVirtualDatabase() const
{
    return isVirtualDatabase;
}
hrchilds's avatar
hrchilds committed
1159

hrchilds's avatar
hrchilds committed
1160
1161
1162
1163
1164
bool
avtDatabaseMetaData::GetMustRepopulateOnStateChange() const
{
    return mustRepopulateOnStateChange;
}
hrchilds's avatar
hrchilds committed
1165

hrchilds's avatar
hrchilds committed
1166
1167
1168
1169
bool
avtDatabaseMetaData::GetMustAlphabetizeVariables() const
{
    return mustAlphabetizeVariables;
hrchilds's avatar
hrchilds committed
1170
1171
}

hrchilds's avatar
hrchilds committed
1172
1173
1174
1175
1176
bool
avtDatabaseMetaData::GetFormatCanDoDomainDecomposition() const
{
    return formatCanDoDomainDecomposition;
}