12 using namespace HEPREP;
21 DefaultHepRepAttribute::DefaultHepRepAttribute() {
24 DefaultHepRepAttribute::~DefaultHepRepAttribute() {
25 for (map<string, HepRepAttValue*>::iterator i = attValues.begin(); i != attValues.end(); i++) {
30 set<HepRepAttValue*> DefaultHepRepAttribute::getAttValuesFromNode() {
31 set<HepRepAttValue*> attSet;
32 for (map<string, HepRepAttValue*>::iterator i = attValues.begin(); i != attValues.end(); i++) {
33 if ((*i).first !=
"layer") attSet.insert((*i).second);
40 if (attValues[lowerCaseName] != NULL)
delete attValues[lowerCaseName];
41 attValues[lowerCaseName] = hepRepAttValue;
44 void DefaultHepRepAttribute::addAttValue(
string key,
char *
value,
int showLabel) {
45 addAttValue(key, (std::string)value, showLabel);
48 void DefaultHepRepAttribute::addAttValue(
string key,
string value,
int showLabel) {
52 void DefaultHepRepAttribute::addAttValue(
string key,
int64 value,
int showLabel) {
56 void DefaultHepRepAttribute::addAttValue(
string key,
int value,
int showLabel) {
60 void DefaultHepRepAttribute::addAttValue(
string key,
double value,
int showLabel) {
64 void DefaultHepRepAttribute::addAttValue(
string key,
bool value,
int showLabel) {
68 void DefaultHepRepAttribute::addAttValue(
string key, vector<double>
value,
int showLabel) {
72 void DefaultHepRepAttribute::addAttValue(
string key,
double red,
double green,
double blue,
double alpha,
int showLabel) {
75 color.push_back(green);
76 color.push_back(blue);
77 color.push_back(alpha);
83 transform(s.begin(), s.end(), s.begin(), (
int(*)(
int)) tolower);
84 return (attValues.count(s) > 0) ? attValues[s] : NULL;
89 transform(s.begin(), s.end(), s.begin(), (
int(*)(
int)) tolower);
virtual std::string getLowerCaseName()=0
const XML_Char int const XML_Char * value
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
static const G4double alpha