sapling/ctreemanifest/manifest_ptr.h
Adam Simpkins 702f276ede ctreemanifest: move ManifestPtr to its own header file
Summary:
Define the ManifestPtr class in its own header file, to eliminate some of the
nasty circular dependencies between manifest.h, manifest_entry.h, and
manifest_fetcher.h

This makes the include process for these files much simpler, and prevents
manifest.h and manifest_entry.h from both trying to include each other at
different locations in their files.

This corresponds to Facebook diff D5588672.

Test Plan: Confirmed "make local" succeeds and the unit tests pass.

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D506
2017-08-25 16:46:07 -07:00

36 lines
724 B
C++

// Copyright (c) 2004-present, Facebook, Inc.
// All Rights Reserved.
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
// no-check-code
#ifndef FBHGEXT_CTREEMANIFEST_MANIFEST_PTR_H
#define FBHGEXT_CTREEMANIFEST_MANIFEST_PTR_H
class Manifest;
class ManifestPtr {
private:
Manifest *manifest;
public:
ManifestPtr();
ManifestPtr(Manifest *manifest);
ManifestPtr(const ManifestPtr &other);
~ManifestPtr();
ManifestPtr& operator= (const ManifestPtr& other);
operator Manifest* () const;
Manifest *operator-> ();
bool isnull() const;
};
#endif /* FBHGEXT_CTREEMANIFEST_MANIFEST_PTR_H */