chromium/base/scoped_native_library.h

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_SCOPED_NATIVE_LIBRARY_H_
#define BASE_SCOPED_NATIVE_LIBRARY_H_

#include "base/base_export.h"
#include "base/native_library.h"
#include "base/scoped_generic.h"

namespace base {

class FilePath;

struct BASE_EXPORT NativeLibraryTraits {};

// A class which encapsulates a base::NativeLibrary object available only in a
// scope.
// This class automatically unloads the loaded library in its destructor.
class BASE_EXPORT ScopedNativeLibrary
    : public ScopedGeneric<NativeLibrary, NativeLibraryTraits> {};

}  // namespace base

#endif  // BASE_SCOPED_NATIVE_LIBRARY_H_