~ubuntu-branches/ubuntu/hardy/libterralib/hardy

« back to all changes in this revision

Viewing changes to src/terralib/kernel/TeSlice.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-25 22:32:59 UTC
  • Revision ID: james.westby@ubuntu.com-20051125223259-3zubal8ux4ki4fjg
Tags: upstream-3.0.3b2
Import upstream version 3.0.3b2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/************************************************************************************
 
2
TerraLib - a library for developing GIS applications.
 
3
Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
 
4
 
 
5
This code is part of the TerraLib library.
 
6
This library is free software; you can redistribute it and/or
 
7
modify it under the terms of the GNU Lesser General Public
 
8
License as published by the Free Software Foundation; either
 
9
version 2.1 of the License, or (at your option) any later version.
 
10
 
 
11
You should have received a copy of the GNU Lesser General Public
 
12
License along with this library.
 
13
 
 
14
The authors reassure the license terms regarding the warranties.
 
15
They specifically disclaim any warranties, including, but not limited to,
 
16
the implied warranties of merchantability and fitness for a particular purpose.
 
17
The library provided hereunder is on an "as is" basis, and the authors have no
 
18
obligation to provide maintenance, support, updates, enhancements, or modifications.
 
19
In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
 
20
indirect, special, incidental, or consequential damages arising out of the use
 
21
of this library and its documentation.
 
22
*************************************************************************************/
 
23
 
 
24
/*! \file TeSlice.h
 
25
    This provides support for a slice structure
 
26
*/
 
27
#ifndef  __TERRALIB_INTERNAL_SLICE_H
 
28
#define  __TERRALIB_INTERNAL_SLICE_H
 
29
 
 
30
#include "TeUtils.h"
 
31
 
 
32
#include <string>
 
33
#include <vector>
 
34
#include <map>
 
35
#include <iostream>
 
36
using namespace std;
 
37
 
 
38
/*! 
 
39
A Slice is a structure that defines an interval of values and associates a
 
40
number of objects that have a certain property, or attribute, whithin this
 
41
interval.
 
42
*/ 
 
43
class TeSlice
 
44
{
 
45
public:
 
46
        int                     count_;                 //! number of objects container in the interval
 
47
        string          from_;                  //! interval lower value 
 
48
        string          to_;                    //! interval upper value
 
49
        
 
50
        //! Constructor
 
51
        TeSlice::TeSlice () : count_(0),from_(""),to_("") {}
 
52
 
 
53
        //! Constructor
 
54
        TeSlice::TeSlice(const string& from, const string& to, int count=0) :
 
55
     count_(count),
 
56
                from_(from),
 
57
                to_(to) {}
 
58
};
 
59
 
 
60
//! A vector of slices
 
61
typedef vector<TeSlice> TeSliceVector;
 
62
#endif
 
63