VTK
dox
IO
ADIOS
ADIOSAttribute.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: ADIOSAttribute.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
#ifndef _ADIOSAttribute_h
16
#define _ADIOSAttribute_h
17
18
#include <string>
19
#include <vector>
20
21
#include <adios_read.h>
22
23
#include "
ADIOSUtilities.h
"
24
25
namespace
ADIOS
26
{
27
28
class
Attribute
29
{
30
public
:
31
Attribute
(ADIOS_FILE *f,
int
id
);
32
~Attribute
(
void
);
33
34
const
int
&
GetId
()
const
;
35
const
ADIOS_DATATYPES&
GetType
()
const
;
36
const
std::string
&
GetName
(
void
)
const
;
37
38
template
<
typename
T>
39
const
T
GetValue
()
const
40
{
41
ReadError::TestEq
(this->
Type
, Type::NativeToADIOS<T>(),
"Invalid type"
);
42
43
return
*
reinterpret_cast<
const
T*
>
(this->
Value
);
44
}
45
46
protected
:
47
int
Id
;
48
ADIOS_DATATYPES
Type
;
49
std::string
Name
;
50
void
*
Value
;
51
};
52
template
<>
const
std::string
Attribute::GetValue<std::string>()
const
;
53
54
}
// End namespace ADIOS
55
#endif // _ADIOSAttribute_h
56
// VTK-HeaderTest-Exclude: ADIOSAttribute.h
ADIOS::Attribute::Id
int Id
Definition:
ADIOSAttribute.h:47
ADIOS::Attribute::GetName
const std::string & GetName(void) const
ADIOSUtilities.h
ADIOS::Attribute::GetValue
const T GetValue() const
Definition:
ADIOSAttribute.h:39
ADIOS::Attribute::Value
void * Value
Definition:
ADIOSAttribute.h:50
ADIOS::ReadError::TestEq
static void TestEq(const T &expected, const T &actual, const std::string &msg="")
Definition:
ADIOSUtilities.h:78
ADIOS::Attribute::GetType
const ADIOS_DATATYPES & GetType() const
ADIOS::Attribute
Definition:
ADIOSAttribute.h:29
ADIOS::Attribute::Name
std::string Name
Definition:
ADIOSAttribute.h:49
ADIOS::Attribute::GetId
const int & GetId() const
ADIOS::Attribute::Attribute
Attribute(ADIOS_FILE *f, int id)
vtkX3D::string
@ string
Definition:
vtkX3D.h:490
ADIOS
Definition:
ADIOSAttribute.h:26
ADIOS::Attribute::Type
ADIOS_DATATYPES Type
Definition:
ADIOSAttribute.h:48
ADIOS::Attribute::~Attribute
~Attribute(void)
Generated by
1.8.20