acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
path_array.h
1
// Created by camilo on 2022-03-13 20:26 <3ThomasBorregaardSorensen!!
2
// Mummy prepared - hinted that was sort of easy, lot of steps though :)
3
// Fish with Lemon, Tofu with premium soy sauce, grind ginger and chive,
4
// japanese rice, fried egg-plant, some see weed leafs and cola extra coffee.
5
#pragma once
6
7
8
#include "acme/prototype/collection/string_array.h"
9
#include "acme/filesystem/filesystem/path.h"
10
#include "acme/prototype/prototype/atom.h"
11
12
13
namespace
file
14
{
15
16
17
class
CLASS_DECL_ACME
path_array_base
:
18
public
::string_base_array < ::file::path, string, e_type_string_array >
19
{
20
public
:
21
22
using
BASE_ARRAY = ::string_base_array < ::file::path, string, e_type_string_array >;
23
24
25
using
BASE_ARRAY::BASE_ARRAY;
26
using
BASE_ARRAY::operator =;
27
28
29
//using ::string_base_array < ::file::path, string, e_type_string_array >::string_base_array;
30
31
32
// path_array(){}
33
// path_array(const ::file::path_array_base & array):
34
// ::string_base_array < ::file::path, string, e_type_string_array >(array)
35
// {}
36
// path_array(::file::path_array_base&& array) :
37
// ::string_base_array < ::file::path, string, e_type_string_array >(::transfer(array))
38
// {
39
// }
40
//~path_array() override {}
41
42
43
virtual
void
patch_base_path(const ::file::path & pathBase);
44
45
46
// path_array& operator=(const ::file::path_array_base& array)
47
// {
48
//
49
// ::string_base_array < ::file::path, string, e_type_string_array >::operator =(array);
50
//
51
// return *this;
52
//
53
// }
54
//
55
//
56
// path_array& operator=(::file::path_array_base&& array)
57
// {
58
//
59
// ::string_base_array < ::file::path, string, e_type_string_array >::operator =(::transfer(array));
60
//
61
// return *this;
62
//
63
// }
64
65
66
};
67
68
69
class
CLASS_DECL_ACME
path_array
:
70
public
::array_particle < ::file::path_array_base >
71
{
72
public
:
73
74
75
using
BASE_ARRAY =
::array_particle< ::file::path_array_base >
;
76
77
78
using
BASE_ARRAY::BASE_ARRAY;
79
using
BASE_ARRAY::operator =;
80
81
82
};
83
84
85
}
// namespace file
86
87
88
template
< prototype_array ARRAY >
89
inline ::file::path_array_base operator / (const ::file::path & pathBase,
const
ARRAY & straRelativeItems)
90
{
91
92
::file::path_array_base
a;
93
94
for
(
auto
& strRelative : straRelativeItems)
95
{
96
97
a.add(pathBase / strRelative);
98
99
}
100
101
return ::transfer(a);
102
103
}
104
105
106
107
CLASS_DECL_ACME ::file::path_array_base & ascendants_path(const ::file::path & pathBase,
::file::path_array_base
& pathaFolder,
::file::path_array_base
* ppathaRelative =
nullptr
);
108
CLASS_DECL_ACME ::file::path_array_base ascendants_path(const ::file::path & pathBase);
109
CLASS_DECL_ACME ::file::path_array_base & ascendants_path(
::file::path_array_base
& patha, const ::file::path& pathBase);
110
//CLASS_DECL_ACME ::string_array_base ascendants_name(const ::file::path & pathBase);
111
//CLASS_DECL_ACME ::string_array_base & ascendants_name(::string_array_base & stra, const ::file::path& pathBase);
112
113
114
array_particle< ::file::path_array_base >
file::path_array_base
Definition
path_array.h:19
file::path_array
Definition
path_array.h:71
file
Definition
filesystem.h:16
filesystem
filesystem
path_array.h
Generated by
1.17.0