]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.h
requires is a keyword in C++2a
[lyx.git] / src / insets / InsetInclude.h
index 18329fe6d9117826e8f62c9eaf2e1b8990123d8f..66487bc934c45a805dab92965da823aef0c36be2 100644 (file)
@@ -48,8 +48,9 @@ public:
 
        ///
        void setChildBuffer(Buffer * buffer);
-       /// \return the child buffer if the file is a LyX doc and could be loaded
-       Buffer * getChildBuffer() const;
+
+       /// \return loaded Buffer or zero if the file loading did not proceed.
+       Buffer * loadIfNeeded() const;
 
        /** Update the cache with all bibfiles in use of the child buffer
         *  (including bibfiles of grandchild documents).
@@ -104,7 +105,7 @@ public:
        void addToToc(DocIterator const & di, bool output_active,
                                  UpdateType utype, TocBackend & backend) const;
        ///
-       void updateBuffer(ParIterator const &, UpdateType);
+       void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
        ///
        std::string contextMenuName() const;
        //@}
@@ -117,6 +118,9 @@ public:
        static std::string defaultCommand() { return "include"; }
        ///
        static bool isCompatibleCommand(std::string const & s);
+       ///
+       bool needsCProtection(bool const maintext = false,
+                             bool const fragile = false) const;
        //@}
 
 protected:
@@ -128,12 +132,15 @@ private:
         *  and the preview should be regenerated.
         */
        void fileChanged() const;
-       /// \return loaded Buffer or zero if the file loading did not proceed.
-       Buffer * loadIfNeeded() const;
        /// launch external application
        void editIncluded(std::string const & file);
        ///
        bool isChildIncluded() const;
+       /// check whether the included file exist
+       bool includedFileExist() const;
+       /// \return True if there is a recursive include
+       /// Also issues appropriate warning, etc
+       bool checkForRecursiveInclude(Buffer const * cbuf, bool silent = false) const;
 
        /// \name Private functions inherited from Inset class
        //@{
@@ -167,6 +174,8 @@ private:
        mutable docstring listings_label_;
        InsetLabel * label_;
        mutable Buffer * child_buffer_;
+       mutable bool file_exist_;
+       mutable bool recursion_error_;
 };