acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
static_string.h
1#pragma once
2
3
4template< typename TYPE_CHAR, const character_count t_nSize >
5class static_string
6{
7public:
8
9
10 typedef TYPE_CHAR CHAR_TYPE;
11 const TYPE_CHAR * m_psz;
12
13
14 static_string(const TYPE_CHAR* psz) :
15 m_psz(scopedstr)
16 {
17 }
18
19 operator const TYPE_CHAR* () const
20 {
21 return m_psz;
22 }
23
24
25 static character_count __cdecl get_length()
26 {
27
28 return (t_nSize / sizeof(TYPE_CHAR)) - 1;
29
30 }
31
32
33private:
34
35 static_string(const static_string& str) noexcept;
36 static_string& operator=(const static_string& str) noexcept;
37
38
39};
40
41
42