Changeset 815 for trunk


Ignore:
Timestamp:
Aug 8, 2009, 8:23:22 PM (12 years ago)
Author:
Peter Johansson
Message:

adding function author_str_color. refs #161

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.cc

    r768 r815  
    5858    else
    5959      iter->second.push_back(p);
     60  }
     61
     62
     63  std::string Configuration::author_str_color(const std::string& author) const
     64  {
     65    std::string res;
     66    std::map<std::string, std::string>::const_iterator iterator;
     67    if ( (iterator=author_color_.find(author)) != author_color_.end())
     68      res = iterator->second;
     69    return res;
    6070  }
    6171
  • trunk/lib/Configuration.h

    r768 r815  
    4343  public:
    4444    static Configuration& instance(void);
     45
     46    /**
     47       \return hexadecimal color code (e.g. 5aee4a) that is used in
     48       blame output. If no color is configured for \a author, an empty
     49       string is returned.
     50     */
     51    std::string author_str_color(const std::string& author) const;
    4552
    4653    /**
     
    117124    static Configuration* instance_;
    118125
     126    std::map<std::string, std::string> author_color_;
    119127    std::map<std::string, Alias> copyright_alias_;
    120128
Note: See TracChangeset for help on using the changeset viewer.