nx_metadata_sdk  1.0
Metadata SDK
string.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <string>
6 
7 #include <nx/sdk/helpers/ref_countable.h>
8 #include <nx/sdk/i_string.h>
9 
10 namespace nx::sdk {
11 
12 class String: public RefCountable<IString>
13 {
14 public:
15  String() = default;
16  String(std::string s);
17 
19  String(const char* s);
20 
21  virtual const char* str() const override;
22 
23  void setString(std::string s);
24 
26  void setString(const char* s);
27 
28  int size() const;
29 
30  bool empty() const;
31 
32 private:
33  std::string m_string;
34 };
35 
36 } // namespace nx::sdk
virtual const char * str() const override
Definition: string.cpp:17
Definition: string.h:12
Definition: device_agent.h:12
Definition: ref_countable.h:83