rustyphoenixlecture 1.6.0

This project aims to provide a simple a powerfull lecture compilation to generate html web sites
/***************************************
	Auteur : Pierre Aubert
	Mail : pierre.aubert@lapp.in2p3.fr
	Licence : CeCILL-C
****************************************/

use crate::pcontent::{
	PLabelId, pabstractcontent::{PAbstractContent, PAbstractLectureBackend},
	preferenceurl::PReferenceUrl,
	pveccontent::PVecContent
};

///Content object of the lecture
#[derive(Debug, Clone, Default, PartialEq)]
pub struct PContentEnvList{
	///Name of the environment to be listed
	p_env_name: String,
	///Vector of children
	p_content: PVecContent,
}

impl PContentEnvList {
	///Constructor of the PContentEnvList
	/// # Parameters
	/// - `env_name` : name of the environement to be listed
	/// # Returns
	/// Initialised PContentEnvList
	pub fn new(env_name: &String) -> Self{
		PContentEnvList {
			p_env_name: env_name.clone(),
			p_content: Default::default(),
		}
	}
	///Get the mutable content of the PContentEnvList
	/// # Returns
	/// Mutable content of the PContentEnvList
	pub fn get_content_mut(&mut self) -> &mut PVecContent {
		&mut self.p_content
	}
}

impl PAbstractContent for PContentEnvList{
	///Say if the PContentEnvList has an embeded label
	/// # Returns
	/// True if the PContentEnvList has an embeded label, false otherwise
	fn has_embeded_label(&self) -> bool{
		false
	}
	///Get the reference url of the current PContentEnvList
	/// # Parameters
	/// - `current_file` : current output file of the PContentEnvList
	/// - `id` : id of the PContentEnvList
	/// # Returns
	/// Corresponding PReferenceUrl
	fn get_reference_url(&self, current_file: &String, id: usize) -> PReferenceUrl{
		PReferenceUrl::from_text(current_file, id, &String::from(&format!("PContentEnvList({}) {}", self.p_env_name, id)))
	}
	///Convert the current struct into html
	/// # Parameters
	/// - `backend` : backend which write a lecture in files
	/// - `id` : id of the PContentEnvList
	fn to_html<TLectureBackend>(&self, backend: &mut TLectureBackend, id: &PLabelId)
		where TLectureBackend: PAbstractLectureBackend
	{
		self.p_content.to_html(backend, id);
	}
}