mapped_ptr_vector< T, StringCompareT > Class Template Reference

`#include <mapped_ptr_vector.h>`

Inheritance diagram for mapped_ptr_vector< T, StringCompareT >:
Collaboration diagram for mapped_ptr_vector< T, StringCompareT >:

## Public Member Functions

| mapped_ptr_vector ()
| mapped_ptr_vector (const StringCompareT &cmp)
| mapped_ptr_vector (const mapped_ptr_vector &inMappedVector)
| ~mapped_ptr_vector ()
void | operator= (const mapped_ptr_vector &inMappedVector)
unsigned int | size () const
bool | empty () const
void | clear ()
bool | operator== (const mapped_ptr_vector &inMappedVector)
void | push_back (T *inP, const unsigned int fileIndex=0)
void | push_back (const std::string &name, const unsigned int fileIndex=0)
void | push_back (const std::vector< std::string > &names, const std::vector< unsigned int > &fileIndices)
void | push_back (const std::vector< std::string > &names)
void | set (T *inP)
| Associate the object pointer to already entered object name. More...
T & | operator[] (unsigned int index)
T & | operator[] (const std::string &name)
unsigned int | find (const std::string &name)
void | rename (const std::string &oldName, const std::string &newName)
void | erase (const std::string &name)
| Removes object pointer. More...
bool | is_read (const std::string &name)
| Is object de-serialized. More...
void | read (const std::string &name)
| De-serialize the object. More...
unsigned int | write (const std::string &name)
| Serialize the object. More...
std::pair< unsigned int, unsigned int > | get_indices (const std::string &name)
std::string | get_name (const unsigned int index)
void | get_sorted_indices (std::vector< unsigned int > &sortedIndices)

## Detailed Description

### template<typename T, typename StringCompareT = std::less<std::string>>
class mapped_ptr_vector< T, StringCompareT >

This is a container of pointers to objects. The container maintains the order of the inserted elements (as vector does), but it provides for efficient element access, search, serialization and deserialization. Object names must be unique, i.e., for any two object names in the container operator==() must yield false.

## Constructor & Destructor Documentation

template<typename T , typename StringCompareT >

mapped_ptr_vector< T, StringCompareT >::mapped_ptr_vector | ( |  | ) |

template<typename T , typename StringCompareT>

mapped_ptr_vector< T, StringCompareT >::mapped_ptr_vector | ( | const StringCompareT & | cmp | ) |

template<typename T , typename StringCompareT>

mapped_ptr_vector< T, StringCompareT >::mapped_ptr_vector | ( | const mapped_ptr_vector< T, StringCompareT > & | inMappedVector | ) |

template<typename T , typename StringCompareT >

mapped_ptr_vector< T, StringCompareT >::~mapped_ptr_vector | ( |  | ) |

## Member Function Documentation

template<typename T , typename StringCompareT >

void mapped_ptr_vector< T, StringCompareT >::clear | ( |  | ) |

template<typename T , typename StringCompareT >

bool mapped_ptr_vector< T, StringCompareT >::empty | ( |  | ) | const

template<typename T, typename StringCompareT = std::less<std::string>>

void mapped_ptr_vector< T, StringCompareT >::erase | ( | const std::string & | name | ) |

Removes object pointer.

template<typename T, typename StringCompareT = std::less<std::string>>

unsigned int mapped_ptr_vector< T, StringCompareT >::find | ( | const std::string & | name | ) |

template<typename T, typename StringCompareT = std::less<std::string>>

pair< unsigned int, unsigned int > mapped_ptr_vector< T, StringCompareT >::get_indices | ( | const std::string & | name | ) |

template<typename T , typename StringCompareT >

string mapped_ptr_vector< T, StringCompareT >::get_name | ( | const unsigned int | index | ) |

template<typename T, typename StringCompareT = std::less<std::string>>

void mapped_ptr_vector< T, StringCompareT >::get_sorted_indices | ( | std::vector< unsigned int > & | sortedIndices | ) |

template<typename T, typename StringCompareT = std::less<std::string>>

bool mapped_ptr_vector< T, StringCompareT >::is_read | ( | const std::string & | name | ) |

Is object de-serialized.

template<typename T , typename StringCompareT >

void mapped_ptr_vector< T, StringCompareT >::operator= | ( | const mapped_ptr_vector< T, StringCompareT > & | inMappedVector | ) |

template<typename T , typename StringCompareT >

bool mapped_ptr_vector< T, StringCompareT >::operator== | ( | const mapped_ptr_vector< T, StringCompareT > & | inMappedVector | ) |

template<typename T , typename StringCompareT >

T & mapped_ptr_vector< T, StringCompareT >::operator[] | ( | unsigned int | index | ) |

template<typename T, typename StringCompareT = std::less<std::string>>

T& mapped_ptr_vector< T, StringCompareT >::operator[] | ( | const std::string & | name | ) |

template<typename T, typename StringCompareT >

void mapped_ptr_vector< T, StringCompareT >::push_back | ( | T * | inP,
|  | const unsigned int | fileIndex = `0`
| ) |  |

template<typename T, typename StringCompareT = std::less<std::string>>

void mapped_ptr_vector< T, StringCompareT >::push_back | ( | const std::string & | name,
|  | const unsigned int | fileIndex = `0`
| ) |  |

template<typename T, typename StringCompareT = std::less<std::string>>

void mapped_ptr_vector< T, StringCompareT >::push_back | ( | const std::vector< std::string > & | names,
|  | const std::vector< unsigned int > & | fileIndices
| ) |  |

template<typename T, typename StringCompareT = std::less<std::string>>

void mapped_ptr_vector< T, StringCompareT >::push_back | ( | const std::vector< std::string > & | names | ) |

template<typename T, typename StringCompareT = std::less<std::string>>

void mapped_ptr_vector< T, StringCompareT >::read | ( | const std::string & | name | ) |

De-serialize the object.

template<typename T, typename StringCompareT = std::less<std::string>>

void mapped_ptr_vector< T, StringCompareT >::rename | ( | const std::string & | oldName,
|  | const std::string & | newName
| ) |  |

template<typename T, typename StringCompareT >

void mapped_ptr_vector< T, StringCompareT >::set | ( | T * | inP | ) |

Associate the object pointer to already entered object name.

template<typename T , typename StringCompareT >

unsigned int mapped_ptr_vector< T, StringCompareT >::size | ( |  | ) | const

Referenced by TableFile::GetNumBlocks().

template<typename T, typename StringCompareT = std::less<std::string>>

unsigned int mapped_ptr_vector< T, StringCompareT >::write | ( | const std::string & | name | ) |

Serialize the object.

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

- rcsb/mapped_ptr_vector.h
- rcsb/mapped_ptr_vector.C