Rewrite progress

This commit is contained in:
Lucien Greathouse 2018-08-19 20:10:57 -07:00
parent 4df3f7f1ff
commit 2b808b12fe
6 changed files with 172 additions and 119 deletions

View file

@ -0,0 +1,37 @@
use std::{
sync::Arc,
};
use ::{
message_session::MessageSession,
rbx::RbxTree,
project::Project,
};
pub struct ServeSession {
project: Project,
messages: Arc<MessageSession>,
tree: Arc<RbxTree>,
}
impl ServeSession {
pub fn new(project: Project) -> ServeSession {
ServeSession {
project,
messages: Arc::new(MessageSession::new()),
tree: Arc::new(RbxTree::new()),
}
}
pub fn get_project(&self) -> &Project {
&self.project
}
pub fn get_messages(&self) -> &MessageSession {
&self.messages
}
pub fn get_tree(&self) -> &RbxTree {
&self.tree
}
}