MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / DottedPairImpl

Class DottedPairImpl

inst/include/Rcpp/DottedPairImpl.h:24–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23 template <typename CLASS>
24 class DottedPairImpl {
25 public:
26
27 /**
28 * wraps an object and add it at the end of the pairlist
29 * (this require traversing the entire pairlist)
30 *
31 * @param object anything that can be wrapped by one
32 * of the wrap functions, named objects (instances of traits::named_object<>
33 * are treated specially
34 */
35 template <typename T>
36 void push_back( const T& object) ;
37
38 /**
39 * wraps an object and add it in front of the pairlist.
40 *
41 * @param object anything that can be wrapped by one
42 * of the wrap functions, or an object of class Named
43 */
44 template <typename T>
45 void push_front( const T& object) ;
46
47 /**
48 * insert an object at the given position, pushing other objects
49 * to the tail of the list
50 *
51 * @param index index (0-based) where to insert
52 * @param object object to wrap
53 */
54 template <typename T>
55 void insert( const size_t& index, const T& object) ;
56
57 /**
58 * replaces an element of the list
59 *
60 * @param index position
61 * @param object object that can be wrapped
62 */
63 template <typename T>
64 void replace( const int& index, const T& object ) ;
65
66 inline R_xlen_t length() const {
67 return ::Rf_xlength(static_cast<const CLASS&>(*this).get__()) ;
68 }
69
70 inline R_xlen_t size() const {
71 return ::Rf_xlength(static_cast<const CLASS&>(*this).get__()) ;
72 }
73
74 /**
75 * Remove the element at the given position
76 *
77 * @param index position where the element is to be removed
78 */
79 void remove( const size_t& index );
80
81 template <typename T>

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.45
push_frontMethod · 0.45

Tested by

no test coverage detected