TerraLib and TerraView Wiki Page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:documentation:devguide:core:uri [2016/10/03 14:44]
carolina.santos created
wiki:documentation:devguide:core:uri [2016/10/04 13:59] (current)
carolina.santos [References]
Line 1: Line 1:
 ====== TerraLib.Core:​ URI ====== ====== TerraLib.Core:​ URI ======
  
-A classe ​**te::​core::​URI** ​fornece o suporte para manipulação de URIs (identificador uniforme de recursoque é uma string ​utilizada para identificar ou denominar um recurso na Internet.+The class **the::​core::​URI** ​provides support for handling ​URIs (uniform resource identifierthat is a string ​used to identify or name a resource on the Internet.
  
 ===== API ===== ===== API =====
Line 7: Line 7:
 ==== C++ ==== ==== C++ ====
  
-API para manipulação de URIs na TerraLib ​é definida pela classe ''​URI''​mostrada abaixo:+The API for URL manipulation in TerraLib ​is defined by the **URI** classshown below:
  
 <code cpp> <code cpp>
Line 19: Line 19:
       \brief A class for representing an Uniform Resource Identifier (URI).       \brief A class for representing an Uniform Resource Identifier (URI).
      */      */
-    class TECOREEXPORT ​URI+    class URI
     {     {
       public:       public:
Line 117: Line 117:
         bool isValid() const;         bool isValid() const;
  
-      private: 
- 
-        /*! \brief Swap operation. */ 
-        void swap(URI&​ other); 
- 
-        /*! 
-          \brief Parse the URI stored in uri_ member. 
- 
-          It uses regex to validate and parse the given URI. 
- 
-          After this, if the given URI is valid, the match_ member 
-          will have the references to all parts of the URI. 
- 
-          The regex split the URI by using named groups in 
-          regex, "​(?<​name>​...)",​ so knowing the group name, 
-          you can require the corresponding group, from match_. 
- 
-          \exception URIException when the given URI isn't valid. 
-         */ 
-        void parse(); 
- 
-        /*! 
-          \brief Check if the uri_ contains any invalid character and parse 
-                 it to his hexadecimal value 
-         */ 
-        void encode(); 
- 
-        std::string hexToLetter(int i); 
- 
-      private: 
- 
-        std::string uri_; 
-        boost::​match_results<​ std::​string::​const_iterator > match_; 
-        bool isValid_; 
     };     };
  
Line 157: Line 123:
 </​code>​ </​code>​
  
-===== Exemplos ​=====+===== Examples ​=====
  
-A seguir alguns exemplos para ilustrar o uso da classe ​URI:+Here are some examples to illustrate the use of the URI class:
  
 <code cpp> <code cpp>
Line 245: Line 211:
 </​code>​ </​code>​
  
-===== Referências ​=====+===== Additional References ​=====
  
   * [[https://​pt.wikipedia.org/​wiki/​URI | URI]]   * [[https://​pt.wikipedia.org/​wiki/​URI | URI]]
-  * [[http://​doc.qt.io/​qt-5/​qurl.html | QUrl]] 
-  * [[http://​uriparser.sourceforge.net/​ | libURI]]