0024624: Lost word in license statement in source files
[occt.git] / src / Aspect / Aspect_ColorMap.cxx
CommitLineData
b311480e 1// Copyright (c) 1995-1999 Matra Datavision
973c2be1 2// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 3//
973c2be1 4// This file is part of Open CASCADE Technology software library.
b311480e 5//
d5f74e42 6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
b311480e 11//
973c2be1 12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
7fd59977 14
15#include <Aspect_ColorMap.ixx>
16
17Aspect_ColorMap::Aspect_ColorMap( const Aspect_TypeOfColorMap type ) {
18
19 mytype = type;
20}
21
22Aspect_TypeOfColorMap Aspect_ColorMap::Type() const {
23
24 return mytype ;
25}
26
27Standard_Integer Aspect_ColorMap::Size() const {
28
29 return mydata.Length() ;
30}
31
32Standard_Integer Aspect_ColorMap::Index(const Standard_Integer anIndex) const {
33
34 if( anIndex < 1 || anIndex > Size() ) {
35 Aspect_BadAccess::Raise ("Undefined colormap Index");
36 }
37
38 Aspect_ColorMapEntry theEntry = mydata.Value(anIndex) ;
39
40 return theEntry.Index() ;
41}
42
43const Aspect_ColorMapEntry& Aspect_ColorMap::Entry (const Standard_Integer AnIndex) const {
44
45 return mydata.Value(AnIndex);
46}
47
48void Aspect_ColorMap::Dump () const {
49
50 Standard_Integer i ;
51
52 cout << "Colormap Dump-->\n" ;
53
54 for ( i = 1 ; i <= Size() ; i++ ) (Entry(i)).Dump() ;
55
56 cout << "<--End Colormap Dump\n" ;
57}