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
Tue Mar 13, 2012 6:17 pm by Coolname007

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

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

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

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

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

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

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

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


    ConvertEnumToStrings

    Share
    avatar
    Coolname007
    ETS Director
    ETS Director

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

    ConvertEnumToStrings

    Post by Coolname007 on 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


    _________________
    ETS:
    Where tech meets traditional, and ideas merge to form one single entity.

    Help ETS by joining today, and contributing content! Your help is very much appreciated.

    Jake Johnson - Site Admin/Owner

    Founder of Expert Technology Storehouse.
    avatar
    Coolname007
    ETS Director
    ETS Director

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

    Re: ConvertEnumToStrings

    Post by Coolname007 on 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


    _________________
    ETS:
    Where tech meets traditional, and ideas merge to form one single entity.

    Help ETS by joining today, and contributing content! Your help is very much appreciated.

    Jake Johnson - Site Admin/Owner

    Founder of Expert Technology Storehouse.

      Current date/time is Fri Oct 19, 2018 7:17 pm