CGIApplicationAuthenticated.cc

00001 /*
00002  * $Id: CGIApplicationAuthenticated.cc,v 1.2 2006/03/27 19:17:43 brook Exp $
00003  */
00004 
00005 /*
00006  * ClearSilver++ Software License.
00007  *
00008  * Copyright (c) 2006 Brook Milligan <brook@nmsu.edu>
00009  * All rights reserved.
00010  * 
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions
00013  * are met:
00014  * 
00015  * 1. Redistributions of source code must retain the above copyright
00016  *    notice, this list of conditions and the following disclaimer.
00017  * 2. Redistributions in binary form must reproduce the above
00018  *    copyright notice, this list of conditions and the following
00019  *    disclaimer in the documentation and/or other materials provided
00020  *    with the distribution.
00021  * 3. The name of the author may not be used to endorse or promote
00022  *    products derived from this software without specific prior
00023  *    written permission.
00024  * 
00025  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00026  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00027  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00028  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00029  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00030  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00031  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00032  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00033  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036  */
00037 
00038 #include "CGIApplicationAuthenticated.h"
00039 #include "Authenticator.h"
00040 
00041 namespace ClearSilver
00042 {
00043 
00044                                 // constructors
00045   CGIApplicationAuthenticated::CGIApplicationAuthenticated ()
00046     : CGIApplication(), a_() {}
00047 
00048   CGIApplicationAuthenticated::CGIApplicationAuthenticated
00049   (boost::shared_ptr<Authenticator> a)
00050     : CGIApplication(), a_(a) {}
00051 
00052   CGIApplicationAuthenticated::CGIApplicationAuthenticated
00053   (const char* name, boost::shared_ptr<Authenticator> a)
00054     : CGIApplication(name), a_(a) {}
00055 
00056   CGIApplicationAuthenticated::CGIApplicationAuthenticated
00057   (const std::string& name, boost::shared_ptr<Authenticator> a)
00058     : CGIApplication(name), a_(a) {}
00059 
00060   CGIApplicationAuthenticated::CGIApplicationAuthenticated
00061   (const HDF& hdf, boost::shared_ptr<Authenticator> a)
00062     : CGIApplication(hdf), a_(a) {}
00063 
00064   CGIApplicationAuthenticated::CGIApplicationAuthenticated
00065   (const CGIApplicationAuthenticated& a)
00066     : CGIApplication(a), a_(a.a_) {}
00067 
00068   CGIApplicationAuthenticated::~CGIApplicationAuthenticated () throw() {}
00069 
00070                                 // assignment
00071   CGIApplicationAuthenticated&
00072   CGIApplicationAuthenticated::operator =
00073   (const CGIApplicationAuthenticated& a)
00074   {
00075     CGIApplicationAuthenticated a_(a);
00076     swap (a_);
00077     return *this;
00078   }
00079 
00080                                 // swap contents
00081   void
00082   CGIApplicationAuthenticated::swap (CGIApplicationAuthenticated& a) throw()
00083   {
00084     CGIApplication::swap (a);
00085     a_.swap(a.a_);
00086   }
00087 
00088 
00089   bool
00090   CGIApplicationAuthenticated::authenticate () { return (*a_)(hdf()); }
00091 
00092 };                              // namespace ClearSilver

Generated on Tue May 16 14:50:52 2006 for ClearSilver C++ Library by  doxygen 1.4.5