67 os.writeEntry(
"type",
type());
68 os.writeEntry(
"mass", m());
69 os.writeEntry(
"radius", r());
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
scalar m() const
Return the mass of the rigid-body.
virtual ~sphere()
Destructor.
virtual void write(Ostream &) const
Write.
scalar r() const
Return the radius of the sphere.
sphere(const word &name, const scalar m, const vector &c, const scalar r)
Construct from name, mass, centre of mass and radius.
virtual autoPtr< rigidBody > clone() const
Return clone of this sphere.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.