acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
path_object.h
1#pragma once
2
3
4#include "acme/prototype/prototype/pointer.h"
5#include "path.h"
6
7
8namespace file
9{
10
11
12 class path_object :
13 public particle,
14 public path
15 {
16 public:
17
18 inline path_object();
19 //path_object(::matter*);
20 inline path_object(const ::file::path_object & pathobject):path_object((const::file::path & )pathobject){}
21 inline path_object(const ::file::path& path);
22 inline path_object(::file::path&& path);
23 inline ~path_object() override;
24
25
26 inline virtual character_count sz_len() const override;
27 inline virtual void to_sz(char_pointer sz, character_count size) const override;
28
29 //using matter::set_flag;
30 //using matter::has_flag;
31
32 //using path::set;
33 //using path::has;
34
35 };
36
37
38 using path_pointer = ::pointer<path_object>;
39
40
41} // namespace file
42
43
44
45
46namespace file
47{
48
49
50 //interlocked_count g_interlockedcountFilePathObject;
51
52
53 inline path_object::path_object()
54 {
55
56 // g_interlockedcountFilePathObject++;
57
58 //informationf("----::file::path_object (count=" + as_string(g_interlockedcountFilePathObject.operator ::i64) + ")\n");
59
60 }
61
62
63 //inline path_object::path_object(::matter*)
64 //{
65
66 // //g_interlockedcountFilePathObject++;
67
68 // //informationf("----::file::path_object (count=" + as_string(g_interlockedcountFilePathObject.operator ::i64) + ")\n");
69
70 //}
71
72
73 inline path_object::path_object(const ::file::path& path) :
74 ::file::path(path)
75 {
76
77 //g_interlockedcountFilePathObject++;
78
79 //informationf("----::file::path_object (count=" + as_string(g_interlockedcountFilePathObject.operator ::i64) + ")\n");
80
81 }
82
83
84 inline path_object::path_object(::file::path&& path) :
85 ::file::path(::transfer(path))
86 {
87
88 //g_interlockedcountFilePathObject++;
89
90 //informationf("----::file::path_object (count=" + as_string(g_interlockedcountFilePathObject.operator ::i64) + ")\n");
91
92 }
93
94
95 inline path_object::~path_object()
96 {
97
98 //g_interlockedcountFilePathObject--;
99
100 }
101
102
103 /*void path_object::exchange(::stream& s)
104 {
105
106 s.exchange(atom::e_type_null, (::file::path&) * this);
107
108 }*/
109
110
111 inline character_count path_object::sz_len() const
112 {
113
114 return length() + 1;
115
116 }
117
118
119 inline void path_object::to_sz(char_pointer sz, character_count len) const
120 {
121
122 ansi_ncpy(sz, c_str(), len);
123
124 }
125
126
127 //string path_object::to_string() const
128 //{
129
130 // return (::string) *this;
131
132 //}
133
134
135} // namespace file
136
137
138
139
140
141
Definition file.h:33
Definition path.h:52
Definition filesystem.h:16