- De-constify look_recenter() and operator<<(string).

This commit is contained in:
Sylvain Pion 2000-11-29 16:07:18 +00:00
parent 9b3a6e0e2e
commit a57a1d9f47
2 changed files with 10 additions and 11 deletions

View File

@ -44,7 +44,7 @@ public:
~Geomview_stream();
void clear();
void look_recenter() const;
void look_recenter();
void set_bg_color(const Color &c);
@ -91,7 +91,7 @@ public:
}
Geomview_stream &operator<<(const Color &c);
Geomview_stream &operator<<(const std::string s);
Geomview_stream &operator<<(std::string s);
Geomview_stream &operator<<(int i);
Geomview_stream &operator<<(double d);
@ -144,12 +144,12 @@ private:
void pickplane(const Bbox_3 &bbox);
Color vertex_color, edge_color, face_color;
int in, out; // file descriptors for input and output pipes
int pid; // the geomview process identification
bool trace_flag; // bool that makes operator<<() write a trace on stdout.
bool trace_flag; // bool that makes operator<<() write a trace on cerr.
bool binary_flag; // bool that makes operator<< write binary format
double radius_;
int line_width_;
double radius_; // radius of vertices
int line_width_; // width of edges
int in, out; // file descriptors for input and output pipes
int pid; // the geomview process identification
};
inline

View File

@ -163,14 +163,13 @@ Geomview_stream::clear()
}
void
Geomview_stream::look_recenter() const
Geomview_stream::look_recenter()
{
Geomview_stream* ncthis = (Geomview_stream*)this;
(*ncthis) << "(look-recenter World)";
(*this) << "(look-recenter World)";
}
Geomview_stream&
Geomview_stream::operator<<(const std::string s)
Geomview_stream::operator<<(std::string s)
{
if ((int)s.length() != ::write(out, s.data(), s.length())) {
std::cerr << "write problem in the pipe while sending data to geomview"