Field3D
SparseFile::FileReferences Class Reference

#include <SparseFile.h>

Public Member Functions

template<class Data_T >
int append (const Reference< Data_T > &ref)
 Appends a reference to the collection. This is specialized so that the correct data member is accessed.
 
template<>
int append (const Reference< half > &ref)
 
template<>
int append (const Reference< V3h > &ref)
 
template<>
int append (const Reference< float > &ref)
 
template<>
int append (const Reference< V3f > &ref)
 
template<>
int append (const Reference< double > &ref)
 
template<>
int append (const Reference< V3d > &ref)
 
template<class Data_T >
int numRefs () const
 Returns the number of file references of the corresponding collection.
 
template<class Data_T >
Reference< Data_T > & ref (int idx)
 Returns a reference to the index. This is specialized so that the correct data member is accessed.
 

Private Attributes

std::vector< Reference< double > > m_dRefs
 
std::vector< Reference< float > > m_fRefs
 
std::vector< Reference< half > > m_hRefs
 
std::vector< Reference< V3d > > m_vdRefs
 
std::vector< Reference< V3f > > m_vfRefs
 
std::vector< Reference< V3h > > m_vhRefs
 

Detailed Description

Definition at line 206 of file SparseFile.h.

Member Function Documentation

template<class Data_T >
Reference< Data_T > & SparseFile::FileReferences::ref ( int  idx)
inline

Returns a reference to the index. This is specialized so that the correct data member is accessed.

Definition at line 749 of file SparseFile.h.

Referenced by SparseFileManager::deallocateBlock(), SparseFileManager::numLoadedBlocks(), SparseFileManager::resetCacheStatistics(), SparseFileManager::totalLoadedBlocks(), and SparseFileManager::totalLoads().

{
return m_hRefs[idx];
}
template<class Data_T >
int SparseFile::FileReferences::append ( const Reference< Data_T > &  ref)

Appends a reference to the collection. This is specialized so that the correct data member is accessed.

Definition at line 920 of file SparseFile.h.

References Msg::print(), and Msg::SevWarning.

{
assert(false && "Do not use memory limiting on sparse fields that aren't "
"simple scalars or vectors!");
"FileReferences::append(): Do not use memory limiting on sparse "
"fields that aren't simple scalars or vectors!");
return -1;
}
template<class Data_T >
int SparseFile::FileReferences::numRefs ( ) const
inline

Returns the number of file references of the corresponding collection.

Definition at line 856 of file SparseFile.h.

Referenced by SparseFileManager::numLoadedBlocks(), SparseFileManager::resetCacheStatistics(), SparseFileManager::totalLoadedBlocks(), and SparseFileManager::totalLoads().

{
return m_hRefs.size();
}
template<>
int SparseFile::FileReferences::append ( const Reference< half > &  ref)
inline

Definition at line 802 of file SparseFile.h.

{
m_hRefs.push_back(ref);
return m_hRefs.size() - 1;
}
template<>
int SparseFile::FileReferences::append ( const Reference< V3h > &  ref)
inline

Definition at line 811 of file SparseFile.h.

{
m_vhRefs.push_back(ref);
return m_vhRefs.size() - 1;
}
template<>
int SparseFile::FileReferences::append ( const Reference< float > &  ref)
inline

Definition at line 820 of file SparseFile.h.

{
m_fRefs.push_back(ref);
return m_fRefs.size() - 1;
}
template<>
int SparseFile::FileReferences::append ( const Reference< V3f > &  ref)
inline

Definition at line 829 of file SparseFile.h.

{
m_vfRefs.push_back(ref);
return m_vfRefs.size() - 1;
}
template<>
int SparseFile::FileReferences::append ( const Reference< double > &  ref)
inline

Definition at line 838 of file SparseFile.h.

{
m_dRefs.push_back(ref);
return m_dRefs.size() - 1;
}
template<>
int SparseFile::FileReferences::append ( const Reference< V3d > &  ref)
inline

Definition at line 847 of file SparseFile.h.

{
m_vdRefs.push_back(ref);
return m_vdRefs.size() - 1;
}

Member Data Documentation

std::vector<Reference<half> > SparseFile::FileReferences::m_hRefs
private

Definition at line 230 of file SparseFile.h.

std::vector<Reference<V3h> > SparseFile::FileReferences::m_vhRefs
private

Definition at line 231 of file SparseFile.h.

std::vector<Reference<float> > SparseFile::FileReferences::m_fRefs
private

Definition at line 232 of file SparseFile.h.

std::vector<Reference<V3f> > SparseFile::FileReferences::m_vfRefs
private

Definition at line 233 of file SparseFile.h.

std::vector<Reference<double> > SparseFile::FileReferences::m_dRefs
private

Definition at line 234 of file SparseFile.h.

std::vector<Reference<V3d> > SparseFile::FileReferences::m_vdRefs
private

Definition at line 235 of file SparseFile.h.


The documentation for this class was generated from the following file: