1254721Semaste//===-- OptionGroupUInt64.cpp ----------------------------------*- C++ -*-===//
2254721Semaste//
3254721Semaste//                     The LLVM Compiler Infrastructure
4254721Semaste//
5254721Semaste// This file is distributed under the University of Illinois Open Source
6254721Semaste// License. See LICENSE.TXT for details.
7254721Semaste//
8254721Semaste//===----------------------------------------------------------------------===//
9254721Semaste
10254721Semaste#include "lldb/Interpreter/OptionGroupUInt64.h"
11254721Semaste
12254721Semaste// C Includes
13254721Semaste// C++ Includes
14254721Semaste// Other libraries and framework includes
15254721Semaste// Project includes
16254721Semaste
17254721Semasteusing namespace lldb;
18254721Semasteusing namespace lldb_private;
19254721Semaste
20254721SemasteOptionGroupUInt64::OptionGroupUInt64 (uint32_t usage_mask,
21254721Semaste                                        bool required,
22254721Semaste                                        const char *long_option,
23254721Semaste                                        int short_option,
24254721Semaste                                        uint32_t completion_type,
25254721Semaste                                        lldb::CommandArgumentType argument_type,
26254721Semaste                                        const char *usage_text,
27254721Semaste                                        uint64_t default_value) :
28254721Semaste    m_value (default_value, default_value)
29254721Semaste{
30254721Semaste    m_option_definition.usage_mask = usage_mask;
31254721Semaste    m_option_definition.required = required;
32254721Semaste    m_option_definition.long_option = long_option;
33254721Semaste    m_option_definition.short_option = short_option;
34263363Semaste    m_option_definition.option_has_arg = OptionParser::eRequiredArgument;
35254721Semaste    m_option_definition.enum_values = NULL;
36254721Semaste    m_option_definition.completion_type = completion_type;
37254721Semaste    m_option_definition.argument_type = argument_type;
38254721Semaste    m_option_definition.usage_text = usage_text;
39254721Semaste}
40254721Semaste
41254721SemasteOptionGroupUInt64::~OptionGroupUInt64 ()
42254721Semaste{
43254721Semaste}
44254721Semaste
45254721SemasteError
46254721SemasteOptionGroupUInt64::SetOptionValue (CommandInterpreter &interpreter,
47254721Semaste                                   uint32_t option_idx,
48254721Semaste                                   const char *option_arg)
49254721Semaste{
50254721Semaste    Error error (m_value.SetValueFromCString (option_arg));
51254721Semaste    return error;
52254721Semaste}
53254721Semaste
54254721Semastevoid
55254721SemasteOptionGroupUInt64::OptionParsingStarting (CommandInterpreter &interpreter)
56254721Semaste{
57254721Semaste    m_value.Clear();
58254721Semaste}
59