1 //===-- SWIG Interface for SBStructuredData ---------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 namespace lldb { 10 11 %feature("docstring", 12 "A class representing a StructuredData event. 13 14 This class wraps the event type generated by StructuredData 15 features." 16 ) SBStructuredData; 17 class SBStructuredData 18 { 19 public: 20 SBStructuredData(); 21 22 SBStructuredData(const lldb::SBStructuredData &rhs); 23 24 SBStructuredData(const lldb::EventSP &event_sp); 25 26 ~SBStructuredData(); 27 28 bool 29 IsValid() const; 30 31 explicit operator bool() const; 32 33 void 34 Clear(); 35 36 lldb::StructuredDataType GetType() const; 37 38 size_t GetSize() const; 39 40 bool GetKeys(lldb::SBStringList &keys) const; 41 42 lldb::SBStructuredData GetValueForKey(const char *key) const; 43 44 lldb::SBStructuredData GetItemAtIndex(size_t idx) const; 45 46 uint64_t GetIntegerValue(uint64_t fail_value = 0) const; 47 48 double GetFloatValue(double fail_value = 0.0) const; 49 50 bool GetBooleanValue(bool fail_value = false) const; 51 52 size_t GetStringValue(char *dst, size_t dst_len) const; 53 54 lldb::SBError 55 GetAsJSON(lldb::SBStream &stream) const; 56 57 lldb::SBError 58 GetDescription(lldb::SBStream &stream) const; 59 60 lldb::SBError 61 SetFromJSON(lldb::SBStream &stream); 62 }; 63 } 64