1 //===-- TypeFormat.h ----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_TypeFormat_h_
11 #define lldb_TypeFormat_h_
18 // Other libraries and framework includes
21 #include "lldb/lldb-public.h"
22 #include "lldb/lldb-enumerations.h"
24 #include "lldb/Core/ValueObject.h"
26 namespace lldb_private {
35 m_flags (lldb::eTypeOptionCascade)
38 Flags (const Flags& other) :
39 m_flags (other.m_flags)
42 Flags (uint32_t value) :
47 operator = (const Flags& rhs)
50 m_flags = rhs.m_flags;
56 operator = (const uint32_t& rhs)
72 return (m_flags & lldb::eTypeOptionCascade) == lldb::eTypeOptionCascade;
76 SetCascades (bool value = true)
79 m_flags |= lldb::eTypeOptionCascade;
81 m_flags &= ~lldb::eTypeOptionCascade;
86 GetSkipPointers () const
88 return (m_flags & lldb::eTypeOptionSkipPointers) == lldb::eTypeOptionSkipPointers;
92 SetSkipPointers (bool value = true)
95 m_flags |= lldb::eTypeOptionSkipPointers;
97 m_flags &= ~lldb::eTypeOptionSkipPointers;
102 GetSkipReferences () const
104 return (m_flags & lldb::eTypeOptionSkipReferences) == lldb::eTypeOptionSkipReferences;
108 SetSkipReferences (bool value = true)
111 m_flags |= lldb::eTypeOptionSkipReferences;
113 m_flags &= ~lldb::eTypeOptionSkipReferences;
124 SetValue (uint32_t value)
133 TypeFormatImpl (lldb::Format f = lldb::eFormatInvalid,
134 const Flags& flags = Flags());
136 typedef std::shared_ptr<TypeFormatImpl> SharedPointer;
137 typedef bool(*ValueCallback)(void*, ConstString, const lldb::TypeFormatImplSP&);
146 return m_flags.GetCascades();
149 SkipsPointers () const
151 return m_flags.GetSkipPointers();
154 SkipsReferences () const
156 return m_flags.GetSkipReferences();
160 SetCascades (bool value)
162 m_flags.SetCascades(value);
166 SetSkipsPointers (bool value)
168 m_flags.SetSkipPointers(value);
172 SetSkipsReferences (bool value)
174 m_flags.SetSkipReferences(value);
184 SetFormat (lldb::Format fmt)
192 return m_flags.GetValue();
196 SetOptions (uint32_t value)
198 m_flags.SetValue(value);
204 return m_my_revision;
212 lldb::Format m_format;
213 uint32_t m_my_revision;
216 DISALLOW_COPY_AND_ASSIGN(TypeFormatImpl);
218 } // namespace lldb_private
220 #endif // lldb_TypeFormat_h_