plebble
ko.h
Go to the documentation of this file.
1 /*
2 -------------------------------------------------------------------------------
3  PLEBBLE
4 -------------------------------------------------------------------------------
5  Copyright (C) 2019-2020 KATLAS Technology. (http://katlastechnology.com)
6  Copyright (C) 2017-2020 Marcos Mayorga. (mm@mm-studios.com)
7 
8  This file is part of our Plebble(R) Platform.
9 
10  The code below cannot be copied, used for any purpose other than the one
11  agreed and/or distributed without the express permission of
12  KATLAS Technology.
13 -------------------------------------------------------------------------------
14 
15 
16 */
17 
18 #ifndef USGOV_c418653234ebbe92143048ad477d0639e9d9d99fe73d8dbd7f140dd11d666c33
19 #define USGOV_c418653234ebbe92143048ad477d0639e9d9d99fe73d8dbd7f140dd11d666c33
20 
21 #include <iostream>
22 #include <string>
23 
24 namespace us {
25 
26  typedef char ko_t; //:char {};
27  typedef const ko_t* ko;
28  static constexpr ko ok=nullptr;
29 
30  static bool is_ko(const std::string&s) {
31  if (s.size()<3) return false;
32  return s[0]=='K' && s[1]=='O' && s[2]==' ';
33  }
34 
35  inline static bool is_ko(ko o) { return o!=ok; }
36  inline static bool is_ok(ko o) { return o==ok; }
37 
38 }
39 
40 //inline std::ostream& operator << (std::ostream& os, us::ko o) { os << (const char*) o; return os; }
41 
42 
43 
44 #endif
45 
46 
47 
us::is_ko
static bool is_ko(const std::string &s)
Definition: ko.h:30
us.ko
Definition: ko.java:20
us
Definition: daemon.h:22
us::is_ok
static bool is_ok(ko o)
Definition: ko.h:36
us::ko
const ko_t * ko
Definition: ko.h:27
us::ok
static constexpr ko ok
Definition: ko.h:28
us::ko_t
char ko_t
Definition: ko.h:26