"Power" of a hand is in practice an oversimplified notion. I will touch equity and your sub-question about what it says about a hand's goodness.
If you're just trying to code equity, the Coding the Wheel article others have mentioned is mandatory reading for poker coders:
http://www.codingthewheel.com/archives/poker-hand-evaluator-roundup
As for the description of hand strength in your second paragraph, preflop equity already accounts for all streets, without considering circumstances that might prevent you from seeing those streets. Basically, calculating per-street odds is unnecessary since that information is already embedded in a preflop "hot-and-cold" equity. Flopzilla is a tool that sounds vaguely like what you're describing:
http://www.cardrunners-ev-calculator.com/Flopzilla.html
Your line of thinking - ranking a hand by its street-specific "power" - is similar to the function provided by ProPokerTools' equity graphs:
http://www.propokertools.com/help/simulator_docs#graph
These graphs show minimum equities for proportions of possible flops against a hand or range, and are often cited as evidence of a hand's playability, a concept that is particularly relevant in big bet Holdem.
Much work has been done in the ranking of hands, but rankings tend to have limited usefulness in big bet games and are mostly useful for studying limit games and tournament push-fold situations:
http://www.bigbetsoftware.com/holdemviewer/rankings/
(Disclosure: I am the author of the software in the above link.)
The prevailing philosophy in modern big bet games, particularly in No Limit Holdem, is that hands don't have absolute preflop value and depend on situation-specific ranges and positions (except for premium hands in most cases).
If your question simply boils down to charting equity, this has been done to death - you can find such a table here:
http://www.pokerstove.com/blog/holdem-preflop-matchups/
This table is useful to check your calculations against if you just mean to write the code as practice. A good supplement to the Coding the Wheel article, if you're looking for algorithms to study, is this thread on hand evaluator performance:
http://pokerai.org/pf3/viewtopic.php?f=3&t=16