CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
CppAD::cg::SmartVectorPointer< Base > Class Template Reference

#include <smart_containers.hpp>

Collaboration diagram for CppAD::cg::SmartVectorPointer< Base >:
Collaboration graph

Public Types

using iterator = typename std::vector< Base * >::iterator
 
using const_iterator = typename std::vector< Base * >::const_iterator
 
using reverse_iterator = typename std::vector< Base * >::reverse_iterator
 
using const_reverse_iterator = typename std::vector< Base * >::const_reverse_iterator
 

Public Member Functions

 SmartVectorPointer (size_t size)
 
 SmartVectorPointer (std::vector< Base * > &v_)
 
size_t size () const
 
bool empty () const
 
void reserve (size_t n)
 
void push_back (Base *x)
 
Base * operator[] (size_t n) const
 
Base *& operator[] (size_t n)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
std::vector< Base * > release ()
 

Public Attributes

std::vector< Base * > v
 

Detailed Description

template<class Base>
class CppAD::cg::SmartVectorPointer< Base >

Smart vector of pointers. Deletes all vector values on destruction.

Definition at line 26 of file smart_containers.hpp.

Member Typedef Documentation

◆ const_iterator

template<class Base >
using CppAD::cg::SmartVectorPointer< Base >::const_iterator = typename std::vector<Base*>::const_iterator

Definition at line 29 of file smart_containers.hpp.

◆ const_reverse_iterator

template<class Base >
using CppAD::cg::SmartVectorPointer< Base >::const_reverse_iterator = typename std::vector<Base*>::const_reverse_iterator

Definition at line 31 of file smart_containers.hpp.

◆ iterator

template<class Base >
using CppAD::cg::SmartVectorPointer< Base >::iterator = typename std::vector<Base*>::iterator

Definition at line 28 of file smart_containers.hpp.

◆ reverse_iterator

template<class Base >
using CppAD::cg::SmartVectorPointer< Base >::reverse_iterator = typename std::vector<Base*>::reverse_iterator

Definition at line 30 of file smart_containers.hpp.

Constructor & Destructor Documentation

◆ SmartVectorPointer() [1/3]

template<class Base >
CppAD::cg::SmartVectorPointer< Base >::SmartVectorPointer ( )
inline

Definition at line 34 of file smart_containers.hpp.

◆ SmartVectorPointer() [2/3]

template<class Base >
CppAD::cg::SmartVectorPointer< Base >::SmartVectorPointer ( size_t  size)
inline

Definition at line 37 of file smart_containers.hpp.

◆ SmartVectorPointer() [3/3]

template<class Base >
CppAD::cg::SmartVectorPointer< Base >::SmartVectorPointer ( std::vector< Base * > &  v_)
inline

Definition at line 41 of file smart_containers.hpp.

◆ ~SmartVectorPointer()

template<class Base >
virtual CppAD::cg::SmartVectorPointer< Base >::~SmartVectorPointer ( )
inlinevirtual

Definition at line 107 of file smart_containers.hpp.

Member Function Documentation

◆ begin() [1/2]

template<class Base >
iterator CppAD::cg::SmartVectorPointer< Base >::begin ( )
inline

Definition at line 69 of file smart_containers.hpp.

◆ begin() [2/2]

template<class Base >
const_iterator CppAD::cg::SmartVectorPointer< Base >::begin ( ) const
inline

Definition at line 73 of file smart_containers.hpp.

◆ empty()

template<class Base >
bool CppAD::cg::SmartVectorPointer< Base >::empty ( ) const
inline

Definition at line 49 of file smart_containers.hpp.

◆ end() [1/2]

template<class Base >
iterator CppAD::cg::SmartVectorPointer< Base >::end ( )
inline

Definition at line 77 of file smart_containers.hpp.

◆ end() [2/2]

template<class Base >
const_iterator CppAD::cg::SmartVectorPointer< Base >::end ( ) const
inline

Definition at line 81 of file smart_containers.hpp.

◆ operator[]() [1/2]

template<class Base >
Base *& CppAD::cg::SmartVectorPointer< Base >::operator[] ( size_t  n)
inline

Definition at line 65 of file smart_containers.hpp.

◆ operator[]() [2/2]

template<class Base >
Base * CppAD::cg::SmartVectorPointer< Base >::operator[] ( size_t  n) const
inline

Definition at line 61 of file smart_containers.hpp.

◆ push_back()

template<class Base >
void CppAD::cg::SmartVectorPointer< Base >::push_back ( Base *  x)
inline

Definition at line 57 of file smart_containers.hpp.

◆ rbegin() [1/2]

template<class Base >
reverse_iterator CppAD::cg::SmartVectorPointer< Base >::rbegin ( )
inline

Definition at line 85 of file smart_containers.hpp.

◆ rbegin() [2/2]

template<class Base >
const_reverse_iterator CppAD::cg::SmartVectorPointer< Base >::rbegin ( ) const
inline

Definition at line 89 of file smart_containers.hpp.

◆ release()

template<class Base >
std::vector< Base * > CppAD::cg::SmartVectorPointer< Base >::release ( )
inline

Definition at line 101 of file smart_containers.hpp.

◆ rend() [1/2]

template<class Base >
reverse_iterator CppAD::cg::SmartVectorPointer< Base >::rend ( )
inline

Definition at line 93 of file smart_containers.hpp.

◆ rend() [2/2]

template<class Base >
const_reverse_iterator CppAD::cg::SmartVectorPointer< Base >::rend ( ) const
inline

Definition at line 97 of file smart_containers.hpp.

◆ reserve()

template<class Base >
void CppAD::cg::SmartVectorPointer< Base >::reserve ( size_t  n)
inline

Definition at line 53 of file smart_containers.hpp.

◆ size()

template<class Base >
size_t CppAD::cg::SmartVectorPointer< Base >::size ( ) const
inline

Definition at line 45 of file smart_containers.hpp.

Member Data Documentation

◆ v

template<class Base >
std::vector<Base*> CppAD::cg::SmartVectorPointer< Base >::v

Definition at line 32 of file smart_containers.hpp.


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