changed: ModelData moved outside Model
added: using ModelData in BaseExpression so Model::to_text() functions can use a ModelData object now git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1175 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -129,8 +129,7 @@ bool Model::found()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Model::to_text(PT::TextStream & stream, bool clear_stream)
|
||||
void Model::to_text(PT::TextStream & stream, ModelData * model_data, bool clear_stream)
|
||||
{
|
||||
if( clear_stream )
|
||||
{
|
||||
@@ -145,7 +144,9 @@ void Model::to_text(PT::TextStream & stream, bool clear_stream)
|
||||
|
||||
if( flat_connector )
|
||||
{
|
||||
this->model_data = model_data;
|
||||
flat_connector->to_text(stream, *this);
|
||||
this->model_data = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +154,20 @@ void Model::to_text(PT::TextStream & stream, bool clear_stream)
|
||||
}
|
||||
|
||||
|
||||
void Model::to_text(std::string & str, bool clear_string)
|
||||
void Model::to_text(PT::TextStream & stream, ModelData & model_data, bool clear_stream)
|
||||
{
|
||||
to_text(stream, &model_data, clear_stream);
|
||||
}
|
||||
|
||||
|
||||
void Model::to_text(PT::TextStream & stream, bool clear_stream)
|
||||
{
|
||||
to_text(stream, nullptr, clear_stream);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Model::to_text(std::string & str, ModelData * model_data, bool clear_string)
|
||||
{
|
||||
if( model_connector )
|
||||
{
|
||||
@@ -162,13 +176,25 @@ void Model::to_text(std::string & str, bool clear_string)
|
||||
|
||||
if( out_stream )
|
||||
{
|
||||
to_text(*out_stream, true);
|
||||
to_text(*out_stream, model_data, true);
|
||||
out_stream->to_string(str, clear_string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Model::to_text(std::string & str, ModelData & model_data, bool clear_string)
|
||||
{
|
||||
to_text(str, &model_data, clear_string);
|
||||
}
|
||||
|
||||
|
||||
void Model::to_text(std::string & str, bool clear_string)
|
||||
{
|
||||
to_text(str, nullptr, clear_string);
|
||||
}
|
||||
|
||||
|
||||
std::string Model::to_text()
|
||||
{
|
||||
std::string str;
|
||||
|
Reference in New Issue
Block a user