C++11 Wordfile

C++11 Wordfile

2362
MasterMaster
2362

    Sep 01, 2012#1

    I have started work on a C++11 wordfile. Before I go to the trouble of completing it, I thought I'd check and see if anyone else has already done the work on it, or at least find out what others think should be included in it.

    I have started out with the c_plusplus.uew that comes with UltraEdit 18.10.

    I kept the groups "C Keywords" and "C++ Keywords", except that I removed the Preprocessor commands to a new group in /C6"Preprocessor", where I also added the predefined preprocessor variables: __DATE__ __FILE__ __LINE__ __STDC__ __TIME__ __cplusplus

    I also added new groups, /C7"Standard C Library" and /C8"C++ Stand Template Lib", where I placed all the functions contained within those standard libraries. What it does not contain, however, are Objects (like cin and cout), Types, and Manipulators found within library classes, which I am trying to determine if they should be in the actual wordfile, but it would be extremely helpful to have them in an auto-complete file at the very least. So, what do you think... should those items be in the wordfile since they are part of the "Standard" or should they be in an auto-complete file? I'm thinking everything that is part of the standard should probably go into the wordfile, and things that are specific to a compiler or extensions that Microsoft uses or whatever should be part of an auto-complete file specific to that compiler or extension set.

    Thoughts?

    6,675585
    Grand MasterGrand Master
    6,675585

      Sep 02, 2012#2

      Here are my thoughts.

      The wordfiles I made for various C compilers for various controllers contained always all functions specific for the libraries/compiler extensions (some even for version of compiler/library set), but not mixed with standard C functions. I listed them in separate color groups. I wanted them always in the wordfile to get them also highlighted. I wanted always that the only symbols displayed in my C source files as normal text are the functions, variables and preprocessor symbols I defined by myself in the source files. And having all symbols from the libraries in the wordfile helped me to avoid using names for my symbols which are already defined in one of the library files, even if the include file with the declaration of such a symbol is currently not included in my source file and therefore the duplicate usage of the name was not producing an error on compilation.

      Well, listing the member functions of standard classes in an auto-completion file may also be helpful. But to be honest, now with the smart templates feature, I would not put them anymore into an auto-completion file, I would create a language template file for them. With smart templates it is possible to put the parameters of a function (with variable type for information) as template parameters giving the user the necessary help when inserting a function into a source file.

      On the other side such a language template file with member functions of classes in a library including the function parameters as template parameters is helpful mainly for UltraEdit users. Users of UEStudio have the advantage of the Function Tips feature of IntelliTips support.

      10211
      Power UserPower User
      10211

        Sep 02, 2012#3

        I've done exactly the same as you have, by separating the pre-processor directives into a separate group so that I have this:

        Code: Select all

        /C6"Directives" STYLE_KEYWORD Colors = 5439325 Colors Back = 328192 Colors Auto Back = 1 Font Style = 0
        #define #elif #else #endif #error #if #ifdef #ifndef #include #include_next #line #pragma #undef
        


        Also adding the preprocessor variable sounds like a good idea, although there are always going to be some of them that will be compiler specific, for example in the code I work with I have #ifdef __SYSC__ directives in a number of places. I guess similar comments could also apply to the standard library as there may be vendor specific differences in what is included in that depending on the platform the compiler is targeted at. These differences however would be easy to customise by a user for their specific needs. Anything that makes navigation through the code is good.

        Cheers...

        Frank

        2362
        MasterMaster
        2362

          Sep 04, 2012#4

          Since I've already got all the member functions in the wordfile (already done at the time of my opening post), I will not worry about doing templates for those, and will leave that up to someone else, as I use UEStudio pretty much exclusively and it just doesn't make sense for me.

          I have decided to go ahead and put the objects, types, and manipulators found within the library classes of the Standard Libraries into the wordfile.

          I'm not going to include anything specific to a particular compiler or extension set. Those can be added by users that use those particular things. I want users to be able to have a "Standard C++11 wordfile" that they can use as a base to build their particular compiler extensions into.

          I won't have time to work on this any further for the next week, but will get to it as soon as possible after that.