torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bitstream/Factory.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 /// \file
17 /// \brief Header for the Factory class.
18 
19 #ifndef TORC_BITSTREAM_FACTORY_HPP
20 #define TORC_BITSTREAM_FACTORY_HPP
21 
23 #include <boost/filesystem.hpp>
24 #include <boost/smart_ptr.hpp>
25 
26 namespace torc {
27 namespace bitstream {
28 
29 namespace bitstream { class FactoryUnitTest; }
30 
31  typedef boost::shared_ptr<Bitstream> BitstreamSharedPtr;
32 
33  /// \brief Helper class for bitstreams.
34  class Factory {
36  public:
38  return newBitstreamPtr(inPath.string().c_str());
39  }
40 
41  static BitstreamSharedPtr newBitstreamPtr(const char* inFileName);
42  };
43 
44 } // namespace bitstream
45 } // namespace torc
46 
47 #endif // TORC_BITSTREAM_FACTORY_HPP
Header for the Bitstream class.
boost::filesystem::path path
static BitstreamSharedPtr newBitstreamPtr(const boost::filesystem::path &inPath)
friend class torc::bitstream::bitstream::FactoryUnitTest
boost::shared_ptr< Bitstream > BitstreamSharedPtr
Helper class for bitstreams.