Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

base::Serializer Class Reference

Inheritance diagram for base::Serializer:

Inheritance graph
[legend]
Collaboration diagram for base::Serializer:

Collaboration graph
[legend]
List of all members.

Public Types

enum  SerializerType { Input = 0, Output = 1 }
enum  Hint { Indent = 0, Unindent = 1 }

Public Member Functions

 Serializer (SerializerType type)
 Serializer (SerializerType type, ref< VFile > archive)
 Serializer (SerializerType type, std::ios &stream)
virtual ~Serializer ()
virtual bool isOutput () const
 true is this is an output serialization stream

virtual bool isInput () const
 true if this is an input serialization stream

virtual bool followReferences (bool follow)
Serializercomment (const String &comment)
 emit comments into the serialization stream. Does nothing if not an output stream or the format doesn't support comments

virtual Serializerhint (Int h)
 provide a hint. The meaning is specific particular serializers and may be ignored/have no effect

Serializeroperator() (char &c, const String &memberName="")
Serializeroperator() (const char &c, const String &memberName="")
Serializeroperator() (Byte &b, const String &memberName="")
Serializeroperator() (const Byte &b, const String &memberName="")
Serializeroperator() (bool &b, const String &memberName="")
Serializeroperator() (const bool &b, const String &memberName="")
Serializeroperator() (SInt &i, const String &memberName="")
Serializeroperator() (const SInt &i, const String &memberName="")
Serializeroperator() (Int &i, const String &memberName="")
Serializeroperator() (const Int &i, const String &memberName="")
Serializeroperator() (LInt &i, const String &memberName="")
Serializeroperator() (const LInt &i, const String &memberName="")
Serializeroperator() (Real &r, const String &memberName="")
Serializeroperator() (const Real &r, const String &memberName="")
Serializeroperator() (String &s, const String &memberName="")
Serializeroperator() (const String &s, const String &memberName="")
Serializeroperator() (Time &t, const String &memberName="")
Serializeroperator() (const Time &t, const String &memberName="")
Serializeroperator() (Vector3 &v, const String &memberName="")
Serializeroperator() (const Vector3 &v, const String &memberName="")
Serializeroperator() (Quat4 &q, const String &memberName="")
Serializeroperator() (const Quat4 &q, const String &memberName="")
Serializeroperator() (Orient &o, const String &memberName="")
Serializeroperator() (const Orient &o, const String &memberName="")
Serializeroperator() (Matrix3 &m, const String &memberName="")
Serializeroperator() (const Matrix3 &m, const String &memberName="")
Serializeroperator() (Matrix4 &m, const String &memberName="")
Serializeroperator() (const Matrix4 &m, const String &memberName="")
Serializeroperator() (Vector &v, const String &memberName="")
Serializeroperator() (const Vector &v, const String &memberName="")
Serializeroperator() (Matrix &m, const String &memberName="")
Serializeroperator() (const Matrix &m, const String &memberName="")
Serializeroperator() (Serializable &r, const String &memberName="")
Serializeroperator() (const Serializable &r, const String &memberName="")
template<class T> Serializeroperator() (ref< T > &r, const String &memberName="")
template<class T> SerializerbaseRef (ref< T > &r, const String &memberName="")
template<class T> Serializeroperator() (const ref< T > &r, const String &memberName="")
template<class T> Serializeroperator() (array< T > &a, const String &memberName="")
template<class T> Serializeroperator() (const array< T > &a, const String &memberName="")
template<class T> Serializeroperator() (std::list< T > &l, const String &memberName="")
template<class T> Serializeroperator() (const std::list< T > &a, const String &memberName="")
template<class T> Serializeroperator() (reflist< T > &l, const String &memberName="")
template<class T> Serializeroperator() (const reflist< T > &l, const String &memberName="")
virtual void flush ()=0
virtual bool isSameKindAs (const Object &) const
virtual String className () const=0

Protected Types

enum  TypeModifier {
  UnknownType = 0, ObjectType = 1, ReferencedObjectType = 2, ObjectReferenceType = 3,
  InvalidType = 4
}

Protected Member Functions

 Serializer (const Serializer &s)
virtual void serializeReferenceIndex (Int &index)
virtual void serializePointer (Serializable *&p, Serializable::SerializableInstantiator *i, const String &memberName, bool forceTypeSerialization=false)
void abort (const String &exceptionString)
virtual Serializerserialize (char &c, const String &memberName)=0
virtual Serializerserialize (Byte &b, const String &memberName)=0
virtual Serializerserialize (bool &b, const String &memberName)=0
virtual Serializerserialize (SInt &i, const String &memberName)=0
virtual Serializerserialize (Int &i, const String &memberName)=0
virtual Serializerserialize (LInt &i, const String &memberName)=0
virtual Serializerserialize (String &s, const String &memberName)=0
virtual Serializerserialize (Real &r, const String &memberName)=0
virtual TypeModifier preSerializeObject (String &typeName, TypeModifier typeModifier, const String &memberName, bool forceTypeSerialization=false)=0
 serializes object or reference header

virtual void postSerializeObject (const String &memberName)=0
 serialize an object or reference 'footer'

virtual Serializerserialize (Serializable &r, const String &memberName)
 only override this to re-implement

virtual void serializeComment (const String &comment)
 override this if the serialization format supports comments

Int ptrIndex (Serializable *p)

Protected Attributes

bool output
bool follow
bool aborted
array< Serializable * > ptrs
array< bool > serialized
Int serializePointerRecursionDepth
Int depthAtFollowDisable

Static Protected Attributes

const String inputToConstErrorString

Member Enumeration Documentation

enum base::Serializer::Hint
 

Enumeration values:
Indent 
Unindent 

Definition at line 109 of file Serializer.

enum base::Serializer::SerializerType
 

Enumeration values:
Input 
Output 

Definition at line 59 of file Serializer.

enum base::Serializer::TypeModifier [protected]
 

Enumeration values:
UnknownType 
ObjectType 
ReferencedObjectType 
ObjectReferenceType 
InvalidType 

Definition at line 412 of file Serializer.


Constructor & Destructor Documentation

base::Serializer::Serializer SerializerType  type  ) 
 

base::Serializer::Serializer SerializerType  type,
ref< VFile archive
 

base::Serializer::Serializer SerializerType  type,
std::ios &  stream
 

virtual base::Serializer::~Serializer  )  [virtual]
 

base::Serializer::Serializer const Serializer s  )  [inline, protected]
 

Definition at line 385 of file Serializer.

References follow, and output.


Member Function Documentation

void base::Serializer::abort const String exceptionString  )  [protected]
 

Referenced by base::SimpleXMLSerializer::nextChar(), and base::SimpleXMLSerializer::nextNWSChar().

template<class T>
Serializer& base::Serializer::baseRef ref< T > &  r,
const String memberName = ""
[inline]
 

Definition at line 226 of file Serializer.

References Assert, Exception, base::GetImplRef(), instanceof, output, base::Reset(), serializePointer(), and base::String.

Referenced by base::UnaryOpExpression::serialize(), and base::BinaryOpExpression::serialize().

virtual String base::Object::className  )  const [pure virtual, inherited]
 

return the name of the object's class type. Must be defined by derived classes.

Implemented in base::Application, base::BinarySerializer, base::Cache, base::CacheDirectory, base::CacheFile, base::ConstantExpression, base::CosExpression, base::DifferenceExpression, base::Directory, base::Expression, base::Externalizer, base::File, base::LineSegPathRep, base::LineSegTrajectoryRep, base::Math, base::NegateExpression, base::ParametricPathRep, base::ParametricTrajectoryRep, base::Path, base::PathComponent, base::PathName, base::ProductExpression, base::QuotientExpression, base::SimpleXMLSerializer, base::SinExpression, base::StdFileSystem, base::SumExpression, base::Time, base::Trajectory, base::Universe, base::VariableExpression, base::VDirectory, base::WaypointPathRep, base::WaypointTrajectoryRep, base::World, gfx::IndexedPoint3Array, gfx::OSGWorld, gfx::TriangleIterator, gfx::VisualPath, gfx::VisualTriangles, gfx::VisualTriangles::TriangleArrayIteratorState, physics::Body, physics::Box, physics::Capsule, physics::CollidableGroup, physics::CollisionModel::ModelState, physics::CollisionState, physics::Cone, physics::Cylinder, physics::DynamicSpatial, physics::GJKCollisionDetector, physics::GJKCollisionDetector::GJKCollisionState, physics::GJKCollisionModel, physics::HeightField, physics::LODTerrain, physics::MassProperties, physics::Material, physics::NullCollisionResponseHandler, physics::OBBCollisionDetector, physics::OBBCollisionDetector::OBBCollisionState, physics::OBBCollisionModel, physics::ODEBallJoint, physics::ODECollidableBody, physics::ODECollidableBody::BodyState, physics::ODECollidableGroup, physics::ODECollisionCuller, physics::ODECollisionDetector, physics::ODECollisionDetector::ODECollisionState, physics::ODECollisionModel, physics::ODECollisionResponseHandler, physics::ODEConstraintGroup, physics::ODEContactConstraint, physics::ODEDoubleHingeJoint, physics::ODEFixedConstraint, physics::ODEHingeJoint, physics::ODEMotor, physics::ODESliderJoint, physics::ODESolid, physics::ODESolidConnectedCollidableBody, physics::ODESolidSystem, physics::ODEUniversalJoint, physics::Polyhedron, physics::Polyhedron::Vertex, physics::Polyhedron::Edge, physics::Polyhedron::Polygon, physics::SimpleCollisionCuller, physics::SimpleTerrain, physics::Solid, physics::SOLIDCollisionDetector, physics::SOLIDCollisionDetector::SOLIDCollisionState, physics::SOLIDCollisionModel, physics::SolidCollisionResponseHandler, physics::SpatialGroup, physics::SpatialTransform, physics::Sphere, physics::Torus, physics::VisualDebugUtil, robot::AggregateControlInterface, robot::control::ControllableAdaptor, robot::control::ControllableAdaptor::AdaptorControlInterface, robot::control::kinematics::AnalyticLagrangianFSBetaOptimizer, robot::control::kinematics::AnalyticLagrangianNullSpaceBetaOptimizer, robot::control::kinematics::BetaFormConstraints::BetaFormConstraint, robot::control::kinematics::BetaFormConstraints, robot::control::kinematics::IKOR, robot::control::kinematics::IKOR::JointLimitBetaConstraint, robot::control::kinematics::IKOR::PushAwayBetaConstraint, robot::control::kinematics::IKOR::RankLossBetaConstraint, robot::control::kinematics::IKORController, robot::control::kinematics::IKORController::EEPositionControlInterface, robot::control::kinematics::IKORController::LinkPositionsControlInterface, robot::control::kinematics::IKORFullSpaceSolver, robot::control::kinematics::LeastNormIKSolver, robot::control::kinematics::MPPseudoInvSolver, robot::control::kinematics::OldIKOR, robot::control::kinematics::ReferenceOpVectorFormObjective, robot::control::kinematics::SVDFullSpaceSolver, robot::control::ManipulatorPIDPositionController, robot::control::ManipulatorPIDPositionController::PositionInterface, robot::JFKengine, robot::KinematicChain::Link, robot::KinematicChain, robot::ManipulatorDescription, robot::ManipulatorJointTrajectory, robot::NumericKinematicEvaluator, robot::PlatformDescription, robot::RobotDescription, robot::sim::BasicEnvironment, robot::sim::BasicEnvironment::Tool, robot::sim::BasicEnvironment::Obstacle, robot::sim::Environment, robot::sim::IKORTest, robot::sim::IKORTest::Test, robot::sim::IKORTester, robot::sim::SimulatedBasicEnvironment, robot::sim::SimulatedKinematicChain::ProximityCollisionResponseHandler, robot::sim::SimulatedManipulatorDescription, robot::sim::SimulatedPlatform, robot::sim::SimulatedRobot, robot::sim::SimulatedRobot::ManipulatorControlInterface, robot::sim::SimulatedRobot::ToolControlInterface, robot::sim::SimulatedRobot::PlatformControlInterface, robot::sim::SimulatedRobot::ProximitySensorInterface, robot::sim::SimulatedRobotDescription, robot::sim::SimulatedSerialManipulator, robot::sim::SimulatedTool, robot::sim::TestBasicEnvironment, robot::sim::VisualIKORTest, robot::TestRobot, robot::TestRobot::ManipulatorControlInterface, robot::TestRobot::ToolControlInterface, robot::TestRobot::PlatformControlInterface, robot::TestRobot::ProximitySensorInterface, and robot::ToolDescription.

Serializer& base::Serializer::comment const String comment  )  [inline]
 

emit comments into the serialization stream. Does nothing if not an output stream or the format doesn't support comments

The operator() method is overloaded for all types that can be serialized (including classes that derive from Serializable, in which case their serialize() method is called with *this Serializer). For example: (assuming class B is-a Serialiable) class A : public Serializable { public: int a; Real b ref c; B d; std::list<B> e;

void serialize(Serializer& s) { s(a)(b)(c)(d)(e); } }

The serialize() method will input or output (depending in the type of the Serializer s) the values a & b, will call c->serialize(s) if necessary (for example, on Output, if the object *c hasn't already been serialized), will call d.serialize() and also B::serialize(s) for each element of e.

NB: all serialization operator() methods have undefined behavior for input streams that are exhausted, except char & Byte, which return std::EOF

Definition at line 107 of file Serializer.

References serializeComment(), and base::String.

virtual void base::Serializer::flush  )  [pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual bool base::Serializer::followReferences bool  follow  )  [virtual]
 

If follow is true (default) serialized references will cause the object being referenced to be serialized (if it hasn't been already). For complex data structures this recursive serialization of objects (and hence object they reference in turn), may cause excessive stack usage. If follow is false then the objects to which references refer will NOT be serialized. It is then up to the client to ensure that all referenced objects are ultimately serialized in the stream. Upon destruction, the Serializer *may* throw an exception if there are outstanding references to objects that have not been serialized. Returns the previous value (which most serialize() methods should restore before returning)

Reimplemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::hint Int  h  )  [inline, virtual]
 

provide a hint. The meaning is specific particular serializers and may be ignored/have no effect

Reimplemented in base::SimpleXMLSerializer.

Definition at line 111 of file Serializer.

References base::Int.

virtual bool base::Serializer::isInput  )  const [inline, virtual]
 

true if this is an input serialization stream

Definition at line 66 of file Serializer.

References isOutput().

Referenced by robot::KinematicChain::serialize(), and robot::KinematicChain::Link::serialize().

virtual bool base::Serializer::isOutput  )  const [inline, virtual]
 

true is this is an output serialization stream

Definition at line 65 of file Serializer.

References output.

Referenced by isInput().

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

template<class T>
Serializer& base::Serializer::operator() const reflist< T > &  l,
const String memberName = ""
[inline]
 

Definition at line 374 of file Serializer.

References Exception, operator()(), output, and base::String.

template<class T>
Serializer& base::Serializer::operator() reflist< T > &  l,
const String memberName = ""
[inline]
 

Definition at line 343 of file Serializer.

References base::reflist< _Tp, _Alloc >::begin(), base::reflist< _Tp, _Alloc >::clear(), base::reflist< _Tp, _Alloc >::end(), base::Int, operator()(), output, base::reflist< _Tp, _Alloc >::push_back(), serializeComment(), base::reflist< _Tp, _Alloc >::size(), and base::String.

template<class T>
Serializer& base::Serializer::operator() const std::list< T > &  a,
const String memberName = ""
[inline]
 

Definition at line 333 of file Serializer.

References Exception, operator()(), output, and base::String.

template<class T>
Serializer& base::Serializer::operator() std::list< T > &  l,
const String memberName = ""
[inline]
 

Definition at line 302 of file Serializer.

References base::Int, operator()(), output, serializeComment(), and base::String.

template<class T>
Serializer& base::Serializer::operator() const array< T > &  a,
const String memberName = ""
[inline]
 

Definition at line 286 of file Serializer.

References Exception, base::Int, operator()(), output, serializeComment(), base::array< T >::size(), and base::String.

template<class T>
Serializer& base::Serializer::operator() array< T > &  a,
const String memberName = ""
[inline]
 

Definition at line 274 of file Serializer.

References base::array< T >::at(), base::Int, operator()(), serializeComment(), base::array< T >::size(), and base::String.

template<class T>
Serializer& base::Serializer::operator() const ref< T > &  r,
const String memberName = ""
[inline]
 

Definition at line 254 of file Serializer.

References Exception, base::GetImplRef(), instanceof, output, serializePointer(), and base::String.

template<class T>
Serializer& base::Serializer::operator() ref< T > &  r,
const String memberName = ""
[inline]
 

Definition at line 200 of file Serializer.

References Assert, Exception, base::GetImplRef(), instanceof, output, base::Reset(), serializePointer(), and base::String.

Serializer& base::Serializer::operator() const Serializable r,
const String memberName = ""
[inline]
 

Definition at line 194 of file Serializer.

References Exception, output, serialize(), and base::String.

Serializer& base::Serializer::operator() Serializable r,
const String memberName = ""
[inline]
 

Definition at line 193 of file Serializer.

References serialize(), and base::String.

Serializer& base::Serializer::operator() const Matrix m,
const String memberName = ""
[inline]
 

Definition at line 184 of file Serializer.

References Exception, base::Matrix, operator()(), output, and base::String.

Serializer& base::Serializer::operator() Matrix m,
const String memberName = ""
 

Serializer& base::Serializer::operator() const Vector v,
const String memberName = ""
[inline]
 

Definition at line 180 of file Serializer.

References Exception, operator()(), output, base::String, and base::Vector.

Serializer& base::Serializer::operator() Vector v,
const String memberName = ""
 

Serializer& base::Serializer::operator() const Matrix4 m,
const String memberName = ""
[inline]
 

Definition at line 176 of file Serializer.

References Exception, operator()(), output, and base::String.

Serializer& base::Serializer::operator() Matrix4 m,
const String memberName = ""
[inline]
 

Definition at line 174 of file Serializer.

References base::Matrix4::serialize(), and base::String.

Serializer& base::Serializer::operator() const Matrix3 m,
const String memberName = ""
[inline]
 

Definition at line 171 of file Serializer.

References Exception, operator()(), output, and base::String.

Serializer& base::Serializer::operator() Matrix3 m,
const String memberName = ""
[inline]
 

Definition at line 169 of file Serializer.

References base::Matrix3::serialize(), and base::String.

Serializer& base::Serializer::operator() const Orient o,
const String memberName = ""
[inline]
 

Definition at line 166 of file Serializer.

References Exception, operator()(), output, and base::String.

Serializer& base::Serializer::operator() Orient o,
const String memberName = ""
[inline]
 

Definition at line 164 of file Serializer.

References base::Orient::serialize(), and base::String.

Serializer& base::Serializer::operator() const Quat4 q,
const String memberName = ""
[inline]
 

Definition at line 161 of file Serializer.

References Exception, operator()(), output, and base::String.

Serializer& base::Serializer::operator() Quat4 q,
const String memberName = ""
[inline]
 

Definition at line 159 of file Serializer.

References base::Quat4::serialize(), and base::String.

Serializer& base::Serializer::operator() const Vector3 v,
const String memberName = ""
[inline]
 

Definition at line 156 of file Serializer.

References Exception, operator()(), output, and base::String.

Serializer& base::Serializer::operator() Vector3 v,
const String memberName = ""
[inline]
 

Definition at line 154 of file Serializer.

References base::Vector3::serialize(), and base::String.

Serializer& base::Serializer::operator() const Time t,
const String memberName = ""
[inline]
 

Definition at line 151 of file Serializer.

References Exception, operator()(), output, and base::String.

Serializer& base::Serializer::operator() Time t,
const String memberName = ""
[inline]
 

Definition at line 149 of file Serializer.

References base::Time::serialize(), and base::String.

Serializer& base::Serializer::operator() const String s,
const String memberName = ""
[inline]
 

Definition at line 146 of file Serializer.

References Exception, output, serialize(), and base::String.

Serializer& base::Serializer::operator() String s,
const String memberName = ""
[inline]
 

Definition at line 145 of file Serializer.

References serialize(), and base::String.

Serializer& base::Serializer::operator() const Real r,
const String memberName = ""
[inline]
 

Definition at line 140 of file Serializer.

References Exception, output, base::Real, serialize(), and base::String.

Serializer& base::Serializer::operator() Real r,
const String memberName = ""
[inline]
 

Definition at line 139 of file Serializer.

References base::Real, serialize(), and base::String.

Serializer& base::Serializer::operator() const LInt i,
const String memberName = ""
[inline]
 

Definition at line 136 of file Serializer.

References Exception, base::LInt, output, serialize(), and base::String.

Serializer& base::Serializer::operator() LInt i,
const String memberName = ""
[inline]
 

Definition at line 135 of file Serializer.

References base::LInt, serialize(), and base::String.

Serializer& base::Serializer::operator() const Int i,
const String memberName = ""
[inline]
 

Definition at line 132 of file Serializer.

References Exception, base::Int, output, serialize(), and base::String.

Serializer& base::Serializer::operator() Int i,
const String memberName = ""
[inline]
 

Definition at line 131 of file Serializer.

References base::Int, serialize(), and base::String.

Serializer& base::Serializer::operator() const SInt i,
const String memberName = ""
[inline]
 

Definition at line 128 of file Serializer.

References Exception, output, serialize(), base::SInt, and base::String.

Serializer& base::Serializer::operator() SInt i,
const String memberName = ""
[inline]
 

Definition at line 127 of file Serializer.

References serialize(), base::SInt, and base::String.

Serializer& base::Serializer::operator() const bool &  b,
const String memberName = ""
[inline]
 

Definition at line 124 of file Serializer.

References Exception, output, serialize(), and base::String.

Serializer& base::Serializer::operator() bool &  b,
const String memberName = ""
[inline]
 

Definition at line 123 of file Serializer.

References serialize(), and base::String.

Serializer& base::Serializer::operator() const Byte b,
const String memberName = ""
[inline]
 

Definition at line 120 of file Serializer.

References base::Byte, Exception, output, serialize(), and base::String.

Serializer& base::Serializer::operator() Byte b,
const String memberName = ""
[inline]
 

Definition at line 119 of file Serializer.

References base::Byte, serialize(), and base::String.

Serializer& base::Serializer::operator() const char &  c,
const String memberName = ""
[inline]
 

Definition at line 116 of file Serializer.

References Exception, output, serialize(), and base::String.

Serializer& base::Serializer::operator() char &  c,
const String memberName = ""
[inline]
 

Definition at line 115 of file Serializer.

References serialize(), and base::String.

Referenced by operator()(), and serializeReferenceIndex().

virtual void base::Serializer::postSerializeObject const String memberName  )  [protected, pure virtual]
 

serialize an object or reference 'footer'

Called just after an object or reference has been serialized (by serialize(Serializable&) or serializePointer() ).

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual TypeModifier base::Serializer::preSerializeObject String typeName,
TypeModifier  typeModifier,
const String memberName,
bool  forceTypeSerialization = false
[protected, pure virtual]
 

serializes object or reference header

Typically serializes the object or reference type (at minimum a flag indicating if a referenced object is present in the stream, or just an object reference). Called just before an object or reference is serialized (by serialize(Serializable&) or serializePointer() ).

Parameters:
typeName Object type name as returned from typeid().name(). For output, the type of the object is passed. In the case of referenced objects it shound't be the pointer or reference type, just the referenced object type. For input streams, the expected type is passed, or the empty string if the object type to be read is unknown (if, for example, the serialization format doesn't include type information) If the serialization format does contain the object type information, it is returned, otherwise the parameter is unaltered.
typeModifier Modifies typeName to indicate unreferencable objects, referenced objects and object references. For output, the value ObjectType is passed for single instance objects. For referenced objects, ReferencedObjectType is passed if the object itself will subsequently be serialized, or ObjectReferenceType if subsequently only a reference to the object (elsewhere in the stream) will be serialized. For input, the values passed are as for output, except that if it is unknown if a referenced object or just a reference will subsequently be read, UnknownType is passed, and either the value ReferencedObjectType or ObjectReferenceType will be returned.
memberName An optional name for the reference being serialized. This must be the same on input as was supplied on output.
forceTypeSerialization Usually the type of object being input can be deduced from the type of the reference. However, when serializing derived classes via a reference to a base class, it is not possible to determine which derived class to instantiate on input unless the type is stored in the serialization stream. For Serializers that don't usually store the referenced object type on output, this parameter is used to force them to do so.
Returns:
For output, the parameter typeModifier is returned. For input, one of ObjectType, ReferencedObjectType or ObjectReferenceType is returned.
Exceptions:
serialization_error if unexpected input is found.
Note that as the strings returned by typeid().name() are not portable accross compilers, they shouldn't be embedded into serialization streams. Use base::className(typeid()) to obtain a portable type string.

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

Int base::Serializer::ptrIndex Serializable p  )  [protected]
 

virtual Serializer& base::Serializer::serialize Serializable r,
const String memberName
[protected, virtual]
 

only override this to re-implement

virtual Serializer& base::Serializer::serialize Real r,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::serialize String s,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::serialize LInt i,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::serialize Int i,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::serialize SInt i,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::serialize bool &  b,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::serialize Byte b,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

virtual Serializer& base::Serializer::serialize char &  c,
const String memberName
[protected, pure virtual]
 

Implemented in base::BinarySerializer, and base::SimpleXMLSerializer.

Referenced by operator()().

virtual void base::Serializer::serializeComment const String comment  )  [inline, protected, virtual]
 

override this if the serialization format supports comments

Reimplemented in base::SimpleXMLSerializer.

Definition at line 467 of file Serializer.

References base::String.

Referenced by comment(), and operator()().

virtual void base::Serializer::serializePointer Serializable *&  p,
Serializable::SerializableInstantiator i,
const String memberName,
bool  forceTypeSerialization = false
[protected, virtual]
 

Referenced by baseRef(), and operator()().

virtual void base::Serializer::serializeReferenceIndex Int index  )  [inline, protected, virtual]
 

Definition at line 390 of file Serializer.

References base::Int, and operator()().


Member Data Documentation

bool base::Serializer::aborted [protected]
 

Definition at line 474 of file Serializer.

Int base::Serializer::depthAtFollowDisable [protected]
 

Definition at line 481 of file Serializer.

bool base::Serializer::follow [protected]
 

Definition at line 473 of file Serializer.

Referenced by Serializer().

const String base::Serializer::inputToConstErrorString [static, protected]
 

Definition at line 387 of file Serializer.

bool base::Serializer::output [protected]
 

Definition at line 472 of file Serializer.

Referenced by baseRef(), isOutput(), operator()(), and Serializer().

array<Serializable*> base::Serializer::ptrs [protected]
 

Definition at line 478 of file Serializer.

array<bool> base::Serializer::serialized [protected]
 

Definition at line 479 of file Serializer.

Int base::Serializer::serializePointerRecursionDepth [protected]
 

Definition at line 480 of file Serializer.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:39:16 2004 for OpenSim by doxygen 1.3.6