blob: f8cc6569c78cdbc6a8208c835a187856a4ce9c74 (
plain)
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
|
// Copyright (C) 1999-2016
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"
#include "colormap.h"
#include "util.h"
static int squenceID = 1;
// ColorMapInfo
ColorMapInfo::ColorMapInfo(Colorbar* p) : parent_(p)
{
id = squenceID++;
name =NULL;
fileName =NULL;
next_ =NULL;
previous_ =NULL;
}
ColorMapInfo::~ColorMapInfo()
{
if (name)
delete [] name;
if (fileName)
delete [] fileName;
}
void ColorMapInfo::setName(const char* n)
{
if (name)
delete [] name;
name = dupstr(n);
}
void ColorMapInfo::setFileName(const char* n)
{
if (fileName)
delete [] fileName;
fileName = dupstr(n);
}
|