Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
terralib:exemplo2 [2008/04/02 13:01] 150.163.3.123 |
terralib:exemplo2 [2008/04/16 16:06] (current) 150.163.2.103 |
||
---|---|---|---|
Line 1: | Line 1: | ||
<code cpp> | <code cpp> | ||
- | |||
- | /********************** | ||
- | Commun header | ||
- | **********************/ | ||
- | |||
- | /*! | ||
- | \file TeTemplate.h | ||
- | \brief This file contains an template example | ||
- | |||
- | This file can be used as reference for TerraLib programmers. | ||
- | |||
- | \author Karine (karine@dpi.inpe.br) | ||
- | \author Laércio (laercio@dpi.inpe.br) | ||
- | */ | ||
- | |||
- | |||
- | #ifndef TE_TEMPLATE_H | ||
- | #define TE_TEMPLATE_H | ||
- | |||
- | #define TE_MY_DEFINE 1 | ||
- | |||
- | // C includes | ||
- | #include <c.h> | ||
- | |||
// Local module includes | // Local module includes | ||
#include "TeOtherTerraLibInclude.h" | #include "TeOtherTerraLibInclude.h" | ||
Line 32: | Line 8: | ||
// STL includes | // STL includes | ||
#include <vector> | #include <vector> | ||
- | + | ||
- | // Foward declarations of external classes | + | |
- | class Foward; | + | |
- | + | ||
- | //! TerraLib namespace | + | |
- | /*! | + | |
- | This namespace contains all TerraLib kernel definitions. | + | |
- | */ | + | |
- | + | ||
namespace TerraLib | namespace TerraLib | ||
{ | { | ||
- | // Foward declarations of namespace classes | ||
- | class TeFoward; | ||
- | + | TeTemplate::TeTemplate(void) | |
- | //! A example of TerraLib programming style | + | { |
- | /*! | + | } |
- | This class is an example of TerraLib programming style. | + | |
- | + | void | |
- | \version (?) | + | TeTemplate::setMyInt(const int& myInt) |
- | \author (?) | + | { |
- | \sa | + | } |
- | */ | + | |
- | class TeTemplate | + | int& |
- | { | + | TeTemplate::getMyInt(void) |
- | public: | + | { |
- | + | } | |
- | //! Empty contructor | + | |
- | TeTemplate(void); | + | bool& |
- | + | TeTemplate::isValid() | |
- | //! Set the value of member myInt_ | + | { |
- | /*! | + | } |
- | \param myInt the value to be assigned to myInt_ member | + | |
- | */ | + | |
- | void setMyInt(const int& myInt); | + | |
- | + | ||
- | //! Get the value of member myInt_ | + | |
- | /*! | + | |
- | \return returns the value of the myInt_ member | + | |
- | */ | + | |
- | const int& getMyInt(void) const; | + | |
- | + | ||
- | //! Verify if the object is valid | + | |
- | /*! | + | |
- | \return returns true if the object is valid, otherwise, return false | + | |
- | */ | + | |
- | const bool& isValid() const; | + | |
- | + | ||
- | protected: | + | |
- | + | ||
- | private: | + | |
- | + | ||
- | protected: | + | |
- | //! My protected int member | + | |
- | int myProtectedInt_; | + | |
- | + | ||
- | private: | + | |
- | //! My private int member | + | |
- | int myInt_; | + | |
- | //! My private double member | + | |
- | double myDouble_; | + | |
- | //! My private string member | + | |
- | std::string myString_; | + | |
- | //! My private boolen member | + | |
- | bool valid_; | + | |
- | //! My private class pointer member | + | |
- | TeClass* myClassPointer_; | + | |
- | }; | + | |
- | + | ||
- | } // End namespace TerraLib | + | |
- | + | ||
- | #endif // End TE_TEMPLATE_H | + | |
+ | } | ||
</code> | </code> |