Regina Calculation Engine
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
regina::Container Class Referenceabstract

A packet that simply contains other packets. More...

#include <packet/container.h>

Inheritance diagram for regina::Container:
regina::Packet regina::Output< Packet > regina::SafePointeeBase< Packet >

Public Types

typedef Packet SafePointeeType
 The type of object being pointed to. More...
 

Public Member Functions

 Container ()
 Default constructor. More...
 
 Container (const std::string &label)
 Constructs a new container with the given packet label. More...
 
virtual void writeTextShort (std::ostream &out) const override
 Writes a short text representation of this object to the given output stream. More...
 
virtual bool dependsOnParent () const override
 Determines if this packet depends upon its parent. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 
bool hasSafePtr () const
 Is there one or more SafePtr currently pointing to this object? More...
 

Static Public Member Functions

static XMLPacketReaderxmlReader (Packet *parent, XMLTreeResolver &resolver)
 

Protected Member Functions

virtual PacketinternalClonePacket (Packet *parent) const override
 Makes a newly allocated copy of this packet. More...
 
virtual void writeXMLPacketData (std::ostream &out) const override
 Writes a chunk of XML containing the data for this packet only. More...
 

File I/O

bool save (const char *filename, bool compressed=true) const
 Saves the subtree rooted at this packet to the given Regina data file, using Regina's native XML file format. More...
 
bool save (std::ostream &s, bool compressed=true) const
 Writes the subtree rooted at this packet to the given output stream, in the format of a Regina XML data file. More...
 
void writeXMLFile (std::ostream &out) const
 Writes the subtree rooted at this packet to the given output stream in Regina's native XML file format. More...
 
std::string internalID () const
 Returns a unique string ID that identifies this packet. More...
 
virtual void writeTextLong (std::ostream &out) const
 Writes a detailed text representation of this object to the given output stream. More...
 
bool hasOwner () const
 Indicates whether some other object in the calculation engine is responsible for ultimately destroying this object. More...
 
void writeXMLPacketTree (std::ostream &out) const
 Writes a chunk of XML containing the subtree with this packet as matriarch. More...
 

Detailed Description

A packet that simply contains other packets.

Such a packet contains no real data.

Member Typedef Documentation

◆ SafePointeeType

The type of object being pointed to.

Member Function Documentation

◆ detail()

std::string regina::Output< Packet , false >::detail ( ) const
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ hasSafePtr()

bool regina::SafePointeeBase< Packet >::hasSafePtr
inlineinherited

Is there one or more SafePtr currently pointing to this object?

◆ str()

std::string regina::Output< Packet , false >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.

Python:\n In addition to str(), this is also used as the
Python "stringification" function __str__().
Returns
a short text representation of this object.

◆ utf8()

std::string regina::Output< Packet , false >::utf8 ( ) const
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.

Returns
a short text representation of this object.

The documentation for this class was generated from the following file:

Copyright © 1999-2018, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).