File: NamedColorFactory.h

package info (click to toggle)
transcend 0.3.dfsg1-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,816 kB
  • ctags: 2,912
  • sloc: cpp: 26,890; ansic: 693; sh: 210; makefile: 131; perl: 67
file content (57 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * Modification History
 *
 * 2004-June-12   Jason Rohrer
 * Created.
 *
 * 2004-June-14   Jason Rohrer
 * Changed to allow specification of a directory to read colors from.
 *
 * 2004-June-15   Jason Rohrer
 * Changed to use LevelDirectoryManager to determine where to read colors from.
 */



#ifndef NAMED_COLOR_FACTORY_INCLUDED
#define NAMED_COLOR_FACTORY_INCLUDED



#include "minorGems/graphics/Color.h"



/**
 * A class with static functions for mapping names to colors using
 * named color files on disk (currently hard coded to look in the "colors"
 * directory).
 *
 * @author Jason Rohrer.
 */
class NamedColorFactory {


    public:

        

        /**
         * Maps a color name to a color.
         *
         * @param inColorName the name of the color.
         *   Must be destroyed by caller.
         *
         * @return the color, or NULL if no color file can be found for
         *   inColorName.
         *   Must be destroyed by caller if non-NULL.
         */
        static Color *getColor( char *inColorName );


        
    };



#endif