OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [libdbg64g/] [services/] [console/] [autocompleter.h] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Auto-complete class declaration.
6
 */
7
 
8
#ifndef __DEBUGGER_AUTOCOMPLETER_H__
9
#define __DEBUGGER_AUTOCOMPLETER_H__
10
 
11
#include "iclass.h"
12
#include "iservice.h"
13
#include "coreservices/iautocomplete.h"
14
#include "coreservices/isocinfo.h"
15
#include <string>
16
#include <stdarg.h>
17
 
18
namespace debugger {
19
 
20
class AutoCompleter : public IService,
21
                      public IAutoComplete {
22
public:
23
    explicit AutoCompleter(const char *name);
24
    virtual ~AutoCompleter();
25
 
26
    /** IService interface */
27
    virtual void postinitService();
28
 
29
    /** IAutoComplete */
30
    virtual bool processKey(uint32_t qt_key, AttributeType *cmd,
31
                            AttributeType *cursor);
32
 
33
 
34
private:
35
    void addToHistory(const char *cmd);
36
 
37
private:
38
    //AttributeType console_;
39
    AttributeType socInfo_;
40
    AttributeType history_;
41
    AttributeType history_size_;
42
 
43
    std::string cmdLine_;
44
    unsigned carretPos_;
45
    ISocInfo *info_;
46
 
47
    // History switching
48
    std::string unfinshedLine_; // store the latest whe we look through history
49
    unsigned history_idx_;
50
};
51
 
52
DECLARE_CLASS(AutoCompleter)
53
 
54
}  // namespace debugger
55
 
56
#endif  // __DEBUGGER_AUTOCOMPLETER_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.