Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97158706
source.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jan 3, 00:57
Size
852 B
Mime Type
text/x-c
Expires
Sun, Jan 5, 00:57 (2 d)
Engine
blob
Format
Raw Data
Handle
23340220
Attached To
rSTICAZZI yearII_reports
source.h
View Options
#ifndef __SOURCE_H__
#define __SOURCE_H__
#include "geom.h"
struct source
{
double temperature;
geom * bounds;
bool fixed;
// warning, passes bounds pointer ownership
source(double _T = 0, geom * _bounds = NULL, bool _fixed = false)
: temperature(_T), bounds(_bounds), fixed(_fixed)
{
}
source(const source&) = delete;
source& operator=(const source& s) = delete;
source(source&& s)
: bounds(s.bounds), temperature(s.temperature), fixed(s.fixed)
{
s.bounds = NULL;
}
~source()
{
if (bounds != NULL)
delete bounds;
}
bool inside(double x, double y) const
{
return bounds->inside(x, y);
}
};
std::istream& operator>>(std::istream& is, source& s);
std::ostream& operator<<(std::ostream& is, const source& s);
#endif
Event Timeline
Log In to Comment