Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_Build_1213 / libraries / libjni-ecwcompress / include / include-sdk / NCSJPCPaletteNode.h @ 43637

History | View | Annotate | Download (2.67 KB)

1 3538 nacho
/********************************************************
2
** Copyright 2003 Earth Resource Mapping Ltd.
3
** This document contains proprietary source code of
4
** Earth Resource Mapping Ltd, and can only be used under
5
** one of the three licenses as described in the
6
** license.txt file supplied with this distribution.
7
** See separate license.txt file for license details
8
** and conditions.
9
**
10
** This software is covered by US patent #6,442,298,
11
** #6,102,897 and #6,633,688.  Rights to use these patents
12
** is included in the license agreements.
13
**
14
** FILE:     $Archive: /NCS/Source/include/NCSJPCPaletteNode.h $
15
** CREATED:  20/03/2003 3:27:34 PM
16
** AUTHOR:   Simon Cope
17
** PURPOSE:  CNCSJPCPaletteNode class header
18
** EDITS:    [xx] ddMmmyy NAME COMMENTS
19
 *******************************************************/
20
21
#ifndef NCSJPCPALETTENODE_H
22
#define NCSJPCPALETTENODE_H
23
24
#ifndef NCSJPCNODE_H
25
#include "NCSJPCNode.h"
26
#endif // NCSJPCNODE_H
27
#ifndef NCSJP2FILE_H
28
#include "NCSJP2File.h"
29
#endif // NCSJP2FILE_H
30
31
        /**
32
         * CNCSJPCPaletteNode class - Palette node.
33
         *
34
         * @author       Simon Cope
35
         * @version      $Revision$ $Author$ $Date$
36
         */
37
class NCSJPC_EXPORT_ALL CNCSJPCPaletteNode: public CNCSJPCNode {
38
public:
39
                /** Default constructor, initialises members */
40
        CNCSJPCPaletteNode();
41
                /** Virtual destructor */
42
        virtual ~CNCSJPCPaletteNode();
43
44
                /**
45
                 * Link a node as the unput to this node.
46
                 * @param                nCtx                Read context
47
                 * @param                nInputs                Number of inputs to this node == 1
48
                 * @param                pInput                First CNCSJPCNode to use as input to this node.
49
                 * @param                Header                CNCSJP2HeaderBox
50
                 * @param                iComponent        Output Component index
51
                 * @return      bool                true on success, else false on error.
52
                 */
53
        virtual bool Link(ContextID nCtx, UINT16 nInputs, CNCSJPCNode *pInput, class CNCSJP2File::CNCSJP2HeaderBox &Header, INT32 iComponent);
54
55
        /**
56
                 * Read a BufferType line from the input.
57
                 * @param                nCtx                Read context
58
                 * @param                pDst                Destination buffer.
59
                 * @param                iComponent        Output Component
60
                 * @return      bool                true on succes, else false.
61
                 */
62
        virtual bool ReadLine(ContextID nCtx, CNCSJPCBuffer *pDst, UINT16 iComponent);
63
protected:
64
        static CNCSJPCNodeTracker        sm_Tracker;
65
66
        class NCSJPC_EXPORT_ALL Context: public CNCSJPCNode::Context {
67
        public:
68
                NCSEcwCellType m_eType;
69
                void        *m_pEntries;
70
                Context();
71
                virtual ~Context();
72
        };
73
                /**
74
                 * Get the context for the given ContextID
75
                 * @param                nCtx                ContextID to retrive context
76
                 * @param                bAutoConstruct Autoconstruct a new context for this ContextID if one doesn't exist
77
                 * @return                Context*        Context for given ID.
78
                 */
79
        virtual CNCSJPCNode::Context *GetContext(ContextID nCtx, bool bAutoConstruct = true);
80
};
81
82
#endif // !NCSJPCPALETTENODE_H