ContainerImplementations/ContainerImplementations.h File Reference


Detailed Description

ContainerImplementations is a set of "helper" objects that implement many of the very frequently used DInterfaces.

While not required to be used, they are available and are the implementations that are tested against.

DIComponentInfoImpl is also defined here (as used in the template implementation of GetComponentInfo (see below) ). DIComponentObject1Impl is also defined in ContainerImplementations, as are DIDUIDList1Impl and DIStringList1Impl, as used by DIComponentInfoImpl and DIComponentObject1Impl.

A useful function defined in ContainerImplementation is GetAllInterfaces. This template function provides a quick way of getting a STL list of DIPtr's to the specified interface.

Other implementations in ContainerImplementations are:

#include "plugin.h"
#include "Interfaces.h"
#include <list>
#include <vector>
#include <string>
#include <exception>
#include "WmlVector3.h"
#include "WmlVector4.h"
#include "WmlQuaternion.h"
#include "DInterfaceImplementation.h"
#include <map>
#include "boost/variant.hpp"


Namespaces

namespace  DigitalSpaces

Data Structures

class  DigitalSpaces::DIList1< ListType, ListItemType >
 Customisable implementation for transporting a list of interfaces. More...
class  DigitalSpaces::DIStringList1Impl
 Implements DIStringList1. More...
class  DigitalSpaces::DIDUIDList1Impl
 Implements DISUIDList1, a list of DUID's. More...
class  DigitalSpaces::DIStringPairListImpl
 Implements DIStringPairList, a list of string pairs. More...
class  DigitalSpaces::DIComponentInfoImpl
 Implements DIComponentInfo, as filled in by a component in GetComponentInfo. More...
class  DigitalSpaces::Variant
 Class to pass the Variant_Impl structure across component boundaries (as a DInterface). More...
struct  DigitalSpaces::Variant::isTypeVisitor< correct_type >
 Visitor that returns true if the data is the type specified, and false if not. More...
struct  DigitalSpaces::Variant::getGenericVisitor< GetType >
 Generic visitor that returns the value if its the right type, otherwise returns a provided "bad" (or default) value. More...
struct  DigitalSpaces::Variant::getStringVisitor
 An anything-to-string converter, for getString. More...
class  DigitalSpaces::SettingMap
 Implements a flexible key-to-value map collection, using strings for keys and Variant for values. More...
class  DigitalSpaces::DataResourceStreambuf
 Provides a buffer between DIDataResource and the DataResourceIStream. More...
class  DigitalSpaces::DataResourceIStream
 Class that wraps a DIDataResource to make it usable as a STL istream. More...

Typedefs

typedef DIList1
< DIObjectBaseList1,
DIObjectBase
DigitalSpaces::DIObjectBaseList1Impl
 Implements DIObjectBaseList1, a list of DIObjectBase interfaces.
typedef boost::variant
< boost::blank, DIObjectBase
*, bool, int, unsigned int,
double, std::string,
Wml::Vector3f,
Wml::Quaternionf,
Wml::Vector4f,
boost::recursive_wrapper
< SettingMap > > 
DigitalSpaces::Variant_Impl
 A data wrapper for common DSS types.

Functions

template<typename T>
T * DigitalSpaces::dss_cast (DIObjectBase *src)
 Typecast function that performs QueryInterface for us.
template<class T>
std::vector< T * > DigitalSpaces::GetFactoriesWithInterface ()
 A more C++ and friendly version of GetFactoriesWithInterface( const DUID*, DIObjectBaseList1*).
template<class T>
T * DigitalSpaces::GetSingleFactoryWithInterface ()
 This is useful for the types of factory where there can only be one.
DICore1DigitalSpaces::GetCoreInterface ()
 Convenient version with the same functionality as GetSingleInterface< DICore1 >().
void DigitalSpaces::ProcessXMLNodeForStrings (DIXMLNode1 *rootNode, const std::map< std::string, std::string > &sourceToReplacementMap)
 Function to process through a tree of XML Nodes, look for the specified strings in text elements and attribute strings.
Variant DigitalSpaces::GetVariantFromXML (DIXMLElement1 *)
 A function that can take a DIXMLElement1 and convert it into a Variant.
SettingMap DigitalSpaces::GetSettingMapFromXML (DIXMLNode1 *)
 A function that can take an XML element, look for <setting name=""> nodes, then get Variant values for their children (using GetVariantFromXML).
void DigitalSpaces::FillInSettingNode (DIXMLNode1 *iNode, const SettingMap &settings)
 Using the value of the settings parameter, add child nodes to iNode.
Wml::Vector3f DigitalSpaces::_readVector (DigitalSpaces::DIXMLNode1 *xmlNode)
 Convenince override of _readVector( DIXMLElement1* ).
Wml::Vector3f DigitalSpaces::_readVector (DigitalSpaces::DIXMLElement1 *xmlElem)
 Extract Vector data from a xml element.
Wml::Quaternionf DigitalSpaces::_readQuaternion (DigitalSpaces::DIXMLNode1 *xmlNode)
 Convenince override of _readQuaternion( DIXMLElement1* ).
Wml::Quaternionf DigitalSpaces::_readQuaternion (DigitalSpaces::DIXMLElement1 *xmlElem)
 Extract Quaternion data from a xml element.
Wml::Vector4f DigitalSpaces::_readColour (DigitalSpaces::DIXMLNode1 *xmlNode)
 Convenince override of _readColour( DIXMLElement1* ).
Wml::Vector4f DigitalSpaces::_readColour (DigitalSpaces::DIXMLElement1 *xmlElem)
 Extract colour data from a xml element.
std::string DigitalSpaces::_readName (DigitalSpaces::DIXMLNode1 *xmlNode)
 Convenince override of _readName( DIXMLElement1* ).
std::string DigitalSpaces::_readName (DigitalSpaces::DIXMLElement1 *xmlElem)
 Reads or generates a name for an element from "name" attribute.
std::string DigitalSpaces::_autoName ()
 Create an automatically generated name.
bool DigitalSpaces::_readBool (const char *string)
 Checks if a string contains a representation of true, otherwise returns false.
std::ostream & operator<< (std::ostream &out, const Wml::Vector3f &vec)
 Operator allowing Wml::Vector3f to be fed into an ostream, such as cout.
std::ostream & operator<< (std::ostream &out, const Wml::Vector4f &vec)
 Operator allowing Wml::Vector4f to be fed into an ostream, such as cout.
std::ostream & operator<< (std::ostream &out, const Wml::Quaternionf &quat)
 Operator allowing Wml::Quaternionf to be fed into an ostream, such as cout.
std::ostream & operator<< (std::ostream &out, const DigitalSpaces::DUID *data)
 Operator allowing DUID* to be fed into an ostream, such as cout.
std::ostream & operator<< (std::ostream &out, const DigitalSpaces::DUID &data)
 Operator allowing DUID to be fed into an ostream, such as cout.

Generated on Sun Aug 31 17:46:26 2008 for Digital Spaces by  doxygen 1.5.6