forked from douglascraigschmidt/CPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExpression_Tree_Command.cpp
More file actions
44 lines (36 loc) · 991 Bytes
/
Copy pathExpression_Tree_Command.cpp
File metadata and controls
44 lines (36 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* -*- C++ -*- */
#ifndef _EXPRESSION_TREE_COMMAND_CPP
#define _EXPRESSION_TREE_COMMAND_CPP
#include "Expression_Tree_Command.h"
#include "Expression_Tree_Command_Impl.h"
Expression_Tree_Command::Expression_Tree_Command (Expression_Tree_Command_Impl *impl)
: command_impl_ (impl)
{
}
Expression_Tree_Command::Expression_Tree_Command (const Expression_Tree_Command &rhs)
: command_impl_ (rhs.command_impl_)
{
}
Expression_Tree_Command &
Expression_Tree_Command::operator= (const Expression_Tree_Command &rhs)
{
// check for self assignment first
if (this != &rhs)
/// we just make use of the Refcounter functionality here
command_impl_ = rhs.command_impl_;
return *this;
}
Expression_Tree_Command::~Expression_Tree_Command (void)
{
}
bool
Expression_Tree_Command::execute (void)
{
return command_impl_->execute ();
}
void
Expression_Tree_Command::print_valid_commands (void)
{
command_impl_->print_valid_commands ();
}
#endif /* _EXPRESSION_TREE_COMMAND_CPP */