FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fei_Pattern.hpp
Go to the documentation of this file.
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _fei_Pattern_hpp_
10 #define _fei_Pattern_hpp_
11 
12 #include "fei_macros.hpp"
13 
14 #include <vector>
15 
16 namespace snl_fei {
17  class RecordCollection;
18 }
19 
20 namespace fei {
21 
29  class Pattern {
30  public:
33 
35  Pattern(int numIDs, int idType, snl_fei::RecordCollection* records);
36 
40  Pattern(int numIDs, int idType, snl_fei::RecordCollection* records,
41  int fieldID, int fieldSize);
42 
46  Pattern(int numIDs, int idType, snl_fei::RecordCollection* records,
47  const int* numFieldsPerID,
48  const int* fieldIDs, const int* fieldSizes);
49 
53  Pattern(int numIDs, const int* idTypes, snl_fei::RecordCollection*const* records,
54  const int* numFieldsPerID,
55  const int* fieldIDs, const int* fieldSizes);
56 
57  virtual ~Pattern();
58 
61  PatternType getPatternType() const { return( type_ ); }
62 
64  int getNumIDs() const { return( numIDs_ ); }
65 
67  const int* getIDTypes() const { return( idTypes_ ); }
68 
71 
73  const int* getNumFieldsPerID() const { return( numFieldsPerID_ ); }
74 
76  const int* getFieldIDs() const { return( fieldIDs_ ); }
77 
79  const int* getNumIndicesPerID() const
80  {
81  return( numIndicesPerID_ );
82  }
83 
85  int getTotalNumFields() const { return( totalNumFields_ ); }
86 
92  int getNumIndices() const { return( numIndices_ ); }
93 
96  bool operator==(const Pattern& rhs) const;
97 
100  bool operator!=(const Pattern& rhs) const;
101 
102  private:
104  int numIDs_;
107  std::vector<int> data_;
108  std::vector<snl_fei::RecordCollection*> recordCollections_;
109 
110  const int* idTypes_;
111  const int* numFieldsPerID_;
112  const int* fieldIDs_;
113  const int* numIndicesPerID_;
114  };
115 
116 } //namespace fei
117 
118 #endif // _fei_Pattern_hpp_
119 
bool operator==(const Pattern &rhs) const
snl_fei::RecordCollection *const * getRecordCollections() const
Definition: fei_Pattern.hpp:70
const int * getIDTypes() const
Definition: fei_Pattern.hpp:67
int getNumIndices() const
Definition: fei_Pattern.hpp:92
const int * getNumFieldsPerID() const
Definition: fei_Pattern.hpp:73
const int * getFieldIDs() const
Definition: fei_Pattern.hpp:76
int getTotalNumFields() const
Definition: fei_Pattern.hpp:85
std::vector< int > data_
const int * numFieldsPerID_
const int * idTypes_
PatternType getPatternType() const
Definition: fei_Pattern.hpp:61
std::vector< snl_fei::RecordCollection * > recordCollections_
const int * fieldIDs_
const int * getNumIndicesPerID() const
Definition: fei_Pattern.hpp:79
int getNumIDs() const
Definition: fei_Pattern.hpp:64
const int * numIndicesPerID_
PatternType type_
Pattern(int numIDs, int idType, snl_fei::RecordCollection *records)
Definition: fei_Pattern.cpp:12
bool operator!=(const Pattern &rhs) const
virtual ~Pattern()