The ETS Discussion Hall

Would you like to react to this message? Create an account in a few clicks or log in to continue.

Where there's a place for everything (ok, maybe not EVERYTHING, but close to everything at least).

Tech & World News, Computer Stuff, Martial Arts, Sports, Music, etc. in one single place.

Welcome to the discussion hall in Expert Technology Storehouse! The name says it all. We are a storehouse storing everything from computer stuff and knowledge (expert, BTW...), to tech & world news, martial arts, sports, music...and someday useful software as well. Want to join? We welcome new members, especially experts at stuff!

Latest topics

» Compatibility Sword
ConvertEnumToStrings EmptyTue Mar 13, 2012 6:17 pm by Coolname007

» Adcted mu online
ConvertEnumToStrings EmptyMon May 09, 2011 1:15 am by Guest

» The Introduction Thread
ConvertEnumToStrings EmptyFri Apr 01, 2011 8:36 pm by Coolname007

» Count to one million!
ConvertEnumToStrings EmptySat Mar 19, 2011 12:22 pm by Coolname007

» Funny Guy!
ConvertEnumToStrings EmptyWed Mar 02, 2011 11:25 pm by Coolname007

» China says police killed 12 in Urumqi rioting
ConvertEnumToStrings EmptySun Feb 27, 2011 6:14 pm by fvwizard

» Arieth Mu Online
ConvertEnumToStrings EmptyFri Feb 18, 2011 2:46 pm by Coolname007

» MAW - Make A Website
ConvertEnumToStrings EmptyMon Feb 07, 2011 8:12 am by Coolname007

» AVACS LIVE CHAT free chat software for mobiles and computer
ConvertEnumToStrings EmptyTue Jan 25, 2011 2:19 pm by Coolname007


    ConvertEnumToStrings

    Coolname007
    Coolname007
    ETS Director
    ETS Director


    Posts : 629
    Join date : 2009-07-15
    Location : Half-way between nowhere and somewhere

    ConvertEnumToStrings Empty ConvertEnumToStrings

    Post by Coolname007 Sun May 09, 2010 8:19 pm

    I am currently working on a very simple C++ CLI program, which can convert enumeration types to strings. This program will be useful on a much bigger project that I am working on right now (more specifically, a program which will make web coding in various languages a snap).

    I will upload the source and header files of the simpler program, and post the links in this thread, once its done.

    Cheers.

    sunny


    Last edited by Coolname007 on Thu Jun 03, 2010 11:20 pm; edited 1 time in total
    Coolname007
    Coolname007
    ETS Director
    ETS Director


    Posts : 629
    Join date : 2009-07-15
    Location : Half-way between nowhere and somewhere

    ConvertEnumToStrings Empty Re: ConvertEnumToStrings

    Post by Coolname007 Thu Jun 03, 2010 11:18 pm

    I finished it. Glee


    Instructions:

    Download the .zip file containing the source and header files for ConvertEnumToStrings from this link.
    Extract everything from the .zip to somewhere on your hard drive, being sure to retain the directory structures.
    Add the sources and headers found in the "ConvertEnumToStrings" directory and all sub-directories to a new project file created in whatever IDE you use (I use Code::Blocks).
    Make sure your IDE is set to link.
    Build the project. It should compile without any errors.
    You should now have an executable you can run from whatever target directory you compiled it in.
    Now open up a Terminal or Command Prompt (depending on whether you're in Linux or Windows), or whatever name the command-line program is in your OS.
    Through the command-line, navigate to the directory (using the "cd" command or similiar) the "ConvertEnumToStrings" executable is in.
    Once there, run this if in Windows:
    Code:

    ConvertEnumToStrings.exe --help

    to get a description of how to use the program.

    Or this if in Linux:

    Code:
    ./ConvertEnumToStrings --help

    to get a description of how to use the program.
    Read what it says and respond accordingly.
    You should now be able to pass into the program an existing file with an enum in it, and have the program generate a header or source file (header by default) for you providing the method(s) to get different enum elements automatically, including the enum name, a vector<string> of all the enumerators' names, a vector<int> of the enumerators' values, a map<string, int> of all the enumerators mapped to their numerical values, or the number of enumerators.

    Cheers.

    guitar

      Current date/time is Fri Apr 19, 2024 12:49 pm