SvnCpp
targets.hpp
Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002-2009 The RapidSvn Group.  All rights reserved.
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program (in the file GPL.txt.  
00017  * If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  * This software consists of voluntary contributions made by many
00020  * individuals.  For exact contribution history, see the revision
00021  * history and logs, available at http://rapidsvn.tigris.org/.
00022  * ====================================================================
00023  */
00024 
00025 #ifndef _SVNCPP_TARGETS_HPP_
00026 #define _SVNCPP_TARGETS_HPP_
00027 
00028 // apr api
00029 #include "apr_tables.h"
00030 
00031 // svncpp
00032 #include "svncpp/path.hpp"
00033 
00034 namespace svn
00035 {
00036   // forward declarations
00037   class Pool;
00038 
00039 
00043   class Targets
00044   {
00045   public:
00051     Targets(const PathVector & targets);
00052 
00059     Targets(const apr_array_header_t * targets);
00060 
00067     Targets(const char * target = 0);
00068 
00074     Targets(const Targets & targets);
00075 
00079     virtual ~Targets();
00080 
00087     const apr_array_header_t *
00088     array(const Pool & pool) const;
00089 
00095     const PathVector &
00096     targets() const;
00097 
00101     size_t size() const;
00102 
00108     operator const PathVector & () const
00109     {
00110       return m_targets;
00111     }
00112 
00121     const Path
00122     target() const;
00123 
00130     void
00131     push_back(const Path & path);
00132 
00133 
00137     void
00138     clear();
00139 
00144     void
00145     reserve(size_t size);
00146 
00147   private:
00148     PathVector m_targets;
00149   };
00150 }
00151 
00152 #endif
00153 /* -----------------------------------------------------------------
00154  * local variables:
00155  * eval: (load-file "../../rapidsvn-dev.el")
00156  * end:
00157  */