12 using namespace HEPREP;
20 DefaultHepRepAttribute::DefaultHepRepAttribute() {
23 DefaultHepRepAttribute::~DefaultHepRepAttribute() {
24 for (map<string, HepRepAttValue*>::iterator i = attValues.begin(); i != attValues.end(); i++) {
29 set<HepRepAttValue*> DefaultHepRepAttribute::getAttValuesFromNode() {
30 set<HepRepAttValue*> attSet;
31 for (map<string, HepRepAttValue*>::iterator i = attValues.begin(); i != attValues.end(); i++) {
32 if ((*i).first !=
"layer") attSet.insert((*i).second);
39 if (attValues[lowerCaseName] != NULL)
delete attValues[lowerCaseName];
40 attValues[lowerCaseName] = hepRepAttValue;
43 void DefaultHepRepAttribute::addAttValue(
string key,
char *
value,
int showLabel) {
44 addAttValue(key, (std::string)value, showLabel);
47 void DefaultHepRepAttribute::addAttValue(
string key,
string value,
int showLabel) {
51 void DefaultHepRepAttribute::addAttValue(
string key,
int64 value,
int showLabel) {
55 void DefaultHepRepAttribute::addAttValue(
string key,
int value,
int showLabel) {
59 void DefaultHepRepAttribute::addAttValue(
string key,
double value,
int showLabel) {
63 void DefaultHepRepAttribute::addAttValue(
string key,
bool value,
int showLabel) {
67 void DefaultHepRepAttribute::addAttValue(
string key, vector<double>
value,
int showLabel) {
71 void DefaultHepRepAttribute::addAttValue(
string key,
double red,
double green,
double blue,
double alpha,
int showLabel) {
74 color.push_back(green);
75 color.push_back(blue);
76 color.push_back(alpha);
83 return (attValues.count(s) > 0) ? attValues[s] : NULL;