acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
address_array.h
1
#pragma once
2
3
4
#include "acme/prototype/collection/raw_array.h"
5
#include "acme/prototype/collection/comparable_eq_array.h"
6
#include "acme/prototype/collection/comparable_array.h"
7
8
9
template
<
typename
POINTER,
class
ARRAY_TYPE >
10
class
address_array_base
:
11
public
ARRAY_TYPE
12
{
13
public
:
14
15
16
using
BASE_ARRAY = ARRAY_TYPE;
17
18
19
using
BASE_ARRAY::BASE_ARRAY;
20
using
BASE_ARRAY::operator =;
21
22
23
//inline address_array_base() {}
24
//inline address_array_base(const address_array_base & a) { this->operator = (a); }
25
//inline address_array_base(address_array_base && a) { this->operator = (::transfer(a)); }
26
27
28
//inline address_array_base & operator = (const address_array_base & a) { this->ARRAY_TYPE::operator = (a); return *this; }
29
//inline address_array_base & operator = (address_array_base && a) { this->ARRAY_TYPE::operator = (::transfer(a)); return *this; }
30
31
32
::collection::index add(POINTER newElement) {
return
ARRAY_TYPE::add(newElement); }
33
::collection::index append(
const
address_array_base
& src) {
return
ARRAY_TYPE::append(src); }
34
35
36
inline
POINTER & element_at(::collection::index i) {
return
(POINTER &)ARRAY_TYPE::element_at(i); }
37
inline
POINTER element_at(::collection::index i)
const
{
return
(POINTER)ARRAY_TYPE::element_at(i); }
38
39
40
inline
POINTER & element_at_grow(::collection::index i) {
return
(POINTER &)ARRAY_TYPE::element_at_grow(i); }
41
42
43
inline
POINTER & first(::collection::index i = 0) {
return
(POINTER &)ARRAY_TYPE::first(i); }
44
inline
POINTER first(::collection::index i = 0)
const
{
return
(POINTER)ARRAY_TYPE::first(i); }
45
46
47
inline
POINTER & last(::collection::index i = -1) {
return
(POINTER &)ARRAY_TYPE::last(i); }
48
inline
POINTER last(::collection::index i = 0)
const
{
return
(POINTER)ARRAY_TYPE::last(i); }
49
50
51
inline
POINTER* get_data() {
return
(POINTER*)ARRAY_TYPE::get_data(); }
52
inline
POINTER* get_data()
const
{
return
(POINTER*)ARRAY_TYPE::get_data(); }
53
54
55
};
56
57
58
59
//class CLASS_DECL_ACME object_ptra :
60
// virtual public ::address_array_base < matter * >
61
//{
62
//public:
63
//
64
// typedef ::address_array_base < matter * > BASE_TYPE;
65
//
66
// inline object_ptra() {}
67
// inline object_ptra(::particle * pparticle) : ::matter(pparticle) { }
68
// inline object_ptra(const object_ptra & a) : ::matter(a), BASE_TYPE(a) { }
69
// inline object_ptra(const BASE_TYPE & a) : ::matter((const ::matter & )a), BASE_TYPE(a) { }
70
// inline object_ptra(object_ptra && a): ::matter(a), BASE_TYPE(::transfer(a)) { }
71
//
72
// inline object_ptra & operator = (const object_ptra & a) { this->BASE_TYPE::operator = (a); return *this; }
73
// inline object_ptra & operator = (const BASE_TYPE & a) { this->BASE_TYPE::operator = (a); return *this; }
74
// inline object_ptra & operator = (object_ptra && a) { this->BASE_TYPE::operator = (::transfer(a)); return *this; }
75
//
76
//
77
//};
78
79
80
81
82
83
84
85
86
address_array_base
Definition
address_array.h:12
prototype
collection
address_array.h
Generated by
1.17.0