use std::sync::Arc;
use crate::exceptions::TemplateEngineException;
use crate::model::{
ICDATASection, ICloseElementTag, IComment, IDocType, IOpenElementTag, IProcessingInstruction,
IStandaloneElementTag, IText, IXMLDeclaration,
};
use super::IEngineProcessable;
use super::model::Model;
use super::processor_execution_vars::ProcessorExecutionVars;
#[expect(
dead_code,
reason = "完整保留 Java IGatheringModelProcessable 内部 SPI"
)]
pub(crate) trait IGatheringModelProcessable: IEngineProcessable {
fn is_gathering_finished(&self) -> bool;
fn get_inner_model(&self) -> &Model;
fn reset_gathered_skip_flags(&self);
fn initialize_processor_execution_vars(&self) -> ProcessorExecutionVars;
fn gather_text(&mut self, text: Arc<dyn IText>)
-> Result<(), Box<dyn TemplateEngineException>>;
fn gather_comment(
&mut self,
comment: Arc<dyn IComment>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_cdata_section(
&mut self,
cdata_section: Arc<dyn ICDATASection>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_standalone_element(
&mut self,
tag: Arc<dyn IStandaloneElementTag>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_open_element(
&mut self,
tag: Arc<dyn IOpenElementTag>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_close_element(
&mut self,
tag: Arc<dyn ICloseElementTag>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_unmatched_close_element(
&mut self,
tag: Arc<dyn ICloseElementTag>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_doc_type(
&mut self,
doc_type: Arc<dyn IDocType>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_xml_declaration(
&mut self,
declaration: Arc<dyn IXMLDeclaration>,
) -> Result<(), Box<dyn TemplateEngineException>>;
fn gather_processing_instruction(
&mut self,
instruction: Arc<dyn IProcessingInstruction>,
) -> Result<(), Box<dyn TemplateEngineException>>;
}