- Timestamp:
- 06/27/13 20:11:41 (11 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/InterpreterV8.cc
r16833 r16936 2360 2360 V8::SetFlagsFromString(argv.c_str(), argv.size()); 2361 2361 } 2362 2363 /* 2364 const string argv1 = "--prof"; 2365 const string argv2 = "--noprof-lazy"; 2366 2367 V8::SetFlagsFromString(argv1.c_str(), argv1.size()); 2368 V8::SetFlagsFromString(argv2.c_str(), argv2.size()); 2369 */ 2362 2370 2363 2371 This = this; … … 2672 2680 2673 2681 #ifdef HAVE_SQL 2674 // ...and close all database 2682 // ...and close all database handles 2675 2683 for (auto it=fDatabases.begin(); it!=fDatabases.end(); it++) 2676 2684 delete *it; … … 2693 2701 } 2694 2702 2703 vector<string> InterpreterV8::JsGetCommandList(const char *, int) const 2704 { 2705 vector<string> rc; 2706 2707 rc.emplace_back("for ("); 2708 rc.emplace_back("while ("); 2709 rc.emplace_back("if ("); 2710 rc.emplace_back("switch ("); 2711 rc.emplace_back("case "); 2712 rc.emplace_back("var "); 2713 rc.emplace_back("function "); 2714 rc.emplace_back("Date("); 2715 rc.emplace_back("new Date("); 2716 rc.emplace_back("'use strict';"); 2717 2718 2719 rc.emplace_back("dim.log("); 2720 rc.emplace_back("dim.alarm("); 2721 rc.emplace_back("dim.wait("); 2722 rc.emplace_back("dim.send("); 2723 rc.emplace_back("dim.state("); 2724 rc.emplace_back("dim.version"); 2725 rc.emplace_back("dim.getStates("); 2726 rc.emplace_back("dim.getDescription("); 2727 rc.emplace_back("dim.getServices("); 2728 2729 rc.emplace_back("dimctrl.defineState("); 2730 rc.emplace_back("dimctrl.setState("); 2731 rc.emplace_back("dimctrl.getState("); 2732 rc.emplace_back("dimctrl.setInterruptHandler("); 2733 rc.emplace_back("dimctrl.triggerInterrupt("); 2734 2735 rc.emplace_back("v8.sleep("); 2736 rc.emplace_back("v8.timeout("); 2737 rc.emplace_back("v8.version()"); 2738 2739 rc.emplace_back("console.out("); 2740 rc.emplace_back("console.warn("); 2741 2742 rc.emplace_back("include("); 2743 rc.emplace_back("exit()"); 2744 2745 #ifdef HAVE_SQL 2746 rc.emplace_back("Database("); 2747 rc.emplace_back("new Database("); 2748 2749 rc.emplace_back(".table"); 2750 rc.emplace_back(".user"); 2751 rc.emplace_back(".database"); 2752 rc.emplace_back(".port"); 2753 rc.emplace_back(".query"); 2695 2754 #endif 2696 2755 2756 rc.emplace_back("Subscription("); 2757 rc.emplace_back("new Subscription("); 2758 2759 rc.emplace_back("Thread("); 2760 rc.emplace_back("new Thread("); 2761 2762 rc.emplace_back("File("); 2763 rc.emplace_back("new File("); 2764 2765 rc.emplace_back("Event("); 2766 rc.emplace_back("new Event("); 2767 2768 rc.emplace_back("Description("); 2769 rc.emplace_back("new Description("); 2770 2771 #ifdef HAVE_MAILX 2772 rc.emplace_back("Mail("); 2773 rc.emplace_back("new Mail("); 2774 2775 rc.emplace_back(".subject"); 2776 rc.emplace_back(".receipients"); 2777 rc.emplace_back(".attachments"); 2778 rc.emplace_back(".bcc"); 2779 rc.emplace_back(".cc"); 2780 rc.emplace_back(".text"); 2781 rc.emplace_back(".send("); 2782 #endif 2783 2784 #ifdef HAVE_NOVA 2785 rc.emplace_back("Sky("); 2786 rc.emplace_back("new Sky("); 2787 2788 rc.emplace_back("Sky.dist"); 2789 rc.emplace_back("Local("); 2790 2791 rc.emplace_back("new Local("); 2792 rc.emplace_back("Local.dist"); 2793 2794 rc.emplace_back("Moon("); 2795 rc.emplace_back("new Moon("); 2796 rc.emplace_back("Moon.disk("); 2797 rc.emplace_back("Moon.horizon("); 2798 2799 rc.emplace_back("Sun.horizon("); 2800 2801 rc.emplace_back(".zd"); 2802 rc.emplace_back(".az"); 2803 rc.emplace_back(".ra"); 2804 rc.emplace_back(".dec"); 2805 2806 rc.emplace_back(".toLocal("); 2807 rc.emplace_back(".toSky("); 2808 rc.emplace_back(".rise"); 2809 rc.emplace_back(".set"); 2810 rc.emplace_back(".transit"); 2811 rc.emplace_back(".isUp"); 2812 2813 rc.emplace_back("horizon"); 2814 rc.emplace_back("civil"); 2815 rc.emplace_back("nautical"); 2816 rc.emplace_back("astronomical"); 2817 #endif 2818 2819 rc.emplace_back(".server"); 2820 rc.emplace_back(".service"); 2821 rc.emplace_back(".name"); 2822 rc.emplace_back(".isCommand"); 2823 rc.emplace_back(".format"); 2824 rc.emplace_back(".description"); 2825 rc.emplace_back(".unit"); 2826 rc.emplace_back(".delim"); 2827 rc.emplace_back(".isOpen"); 2828 2829 rc.emplace_back(".qos"); 2830 rc.emplace_back(".size"); 2831 rc.emplace_back(".counter"); 2832 rc.emplace_back(".type"); 2833 rc.emplace_back(".obj"); 2834 rc.emplace_back(".data"); 2835 rc.emplace_back(".comment"); 2836 rc.emplace_back(".index"); 2837 rc.emplace_back(".time"); 2838 rc.emplace_back(".close()"); 2839 rc.emplace_back(".onchange"); 2840 rc.emplace_back(".get("); 2841 2842 2843 rc.emplace_back("__DATE__"); 2844 rc.emplace_back("__FILE__"); 2845 2846 return rc; 2847 } 2848 2849 #endif 2850 2697 2851 InterpreterV8 *InterpreterV8::This = 0; -
trunk/FACT++/src/InterpreterV8.h
r16802 r16936 187 187 } 188 188 189 std::vector<std::string> JsGetCommandList(const char *, int) const; 190 189 191 virtual void JsLoad(const std::string & = ""); 190 192 virtual void JsStart(const std::string &) { } -
trunk/FACT++/src/RemoteControl.h
r16878 r16936 95 95 96 96 // This funtion defines which generator should be called. 97 // If it returns 0 the standard rea qdline generator are called.97 // If it returns 0 the standard readline generator are called. 98 98 // Otherwise set the right generator with rl_completion_matches. 99 99 char **Completion(const char *text, int start, int) 100 100 { 101 if (T::fScript=="java") 102 { 103 return T::Complete(JsGetCommandList(text, start), text); 104 } 105 101 106 // Get the whole buffer before the tab-position 102 107 const string b = string(T::GetBuffer()); … … 456 461 T::Unlock(); 457 462 463 T::fScript = ""; 464 458 465 return true; 459 466 }
Note:
See TracChangeset
for help on using the changeset viewer.