CMS 3D CMS Logo

IgCollection.h File Reference

#include <IgLinearAlgebra.h>
#include <cstring>
#include <string>
#include <cassert>
#include <vector>
#include <map>
#include <iostream>
#include <algorithm>

Go to the source code of this file.

Classes

struct  ColumnTypeHelper< T >
struct  ColumnTypeHelper< double >
struct  ColumnTypeHelper< IgV2d >
struct  ColumnTypeHelper< IgV3d >
struct  ColumnTypeHelper< IgV4d >
struct  ColumnTypeHelper< int >
struct  ColumnTypeHelper< std::string >
class  IgAssociatedSet
class  IgAssociatedSet::Iterator
class  IgAssociation
class  IgAssociationSet
class  IgCollection
class  IgCollectionItem
struct  IgCollectionItem::ContainerTraits< C, T, A >
class  IgCollectionIterator
class  IgColumnHandle
class  IgDataStorage
class  IgProperty
class  IgRef
struct  IgSchemaError
 Throw this error whenever the schema differs from what you were expecting. More...
struct  IgStorageGetterTrait< T >
struct  IgStorageGetterTrait< char * >
struct  IgStorageGetterTrait< const char * >

Enumerations

enum  AssociatedType { LEFT_ASSOCIATED = 1, RIGHT_ASSOCIATED = 2, BOTH_ASSOCIATED = 3 }
enum  ColumnType {
  INT_COLUMN = 0, STRING_COLUMN, DOUBLE_COLUMN, VECTOR_2D,
  VECTOR_3D, VECTOR_4D, NUMBER_OF_BASE_TYPES
}

Functions

std::ostream & operator<< (std::ostream &stream, IgDataStorage &storage)
std::ostream & operator<< (std::ostream &stream, IgAssociationSet &associationSet)
std::ostream & operator<< (std::ostream &stream, const IgAssociation &association)
std::ostream & operator<< (std::ostream &stream, const IgRef &ref)
std::ostream & operator<< (std::ostream &stream, IgCollection &collection)


Enumeration Type Documentation

enum AssociatedType

Enumerator:
LEFT_ASSOCIATED 
RIGHT_ASSOCIATED 
BOTH_ASSOCIATED 

Definition at line 17 of file IgCollection.h.

00018 {
00019   LEFT_ASSOCIATED = 1,
00020   RIGHT_ASSOCIATED = 2,
00021   BOTH_ASSOCIATED = 3
00022 };

enum ColumnType

Enumerator:
INT_COLUMN 
STRING_COLUMN 
DOUBLE_COLUMN 
VECTOR_2D 
VECTOR_3D 
VECTOR_4D 
NUMBER_OF_BASE_TYPES 

Definition at line 81 of file IgCollection.h.

00081                 {
00082   INT_COLUMN = 0,           // int
00083   STRING_COLUMN,            // std::string
00084   DOUBLE_COLUMN,            // double
00085   VECTOR_2D,                // A 2vector of doubles
00086   VECTOR_3D,                // A 3vector of doubles
00087   VECTOR_4D,                // A 4vector of doubles
00088   NUMBER_OF_BASE_TYPES
00089 };


Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
IgDataStorage storage 
)

Definition at line 108 of file IgCollection.cc.

References IgDataStorage::associationSetNames(), collection, IgDataStorage::collectionNames(), IgCollection::columnLabels(), IgDataStorage::getAssociationSet(), IgDataStorage::getCollection(), i, and j.

00109 {
00110     stream << "{"
00111            << "'Types': {";
00112     for (IgDataStorage::CollectionNames::iterator i = storage.collectionNames().begin();
00113          i != storage.collectionNames().end();
00114          i++)
00115     {
00116         stream << "\"" << *i << "\": [";
00117         IgCollection &collection = storage.getCollection(i->c_str());
00118         for(std::vector<IgCollection::LabelColumn>::iterator j = collection.columnLabels().begin();
00119             j != collection.columnLabels().end();
00120             j++)
00121         {
00122             stream << "[\"" << j->first << "\", ";
00123             stream << "\"";
00124             j->second.streamType(stream);
00125             stream << "\"]";
00126             if (j+1 != collection.columnLabels().end())
00127                 stream << ",";
00128         }
00129         stream << "]\n";
00130         if(i+1 != storage.collectionNames().end())
00131             stream << ",\n";
00132     }
00133     stream << "},\n";
00134     stream << "'Collections': {";
00135     for (IgDataStorage::CollectionNames::iterator i = storage.collectionNames().begin();
00136          i != storage.collectionNames().end();
00137          i++)
00138     {
00139         stream << storage.getCollection(i->c_str());
00140         if(i+1 != storage.collectionNames().end())
00141         {
00142             stream << ",\n";
00143         }
00144     }
00145     stream << "},\n";
00146     stream << "'Associations': {";
00147     for (IgDataStorage::CollectionNames::iterator i = storage.associationSetNames().begin();
00148          i != storage.associationSetNames().end();
00149          i++)
00150     {
00151         stream << storage.getAssociationSet(i->c_str());
00152         if(i+1 != storage.associationSetNames().end())
00153         {
00154             stream << ",\n";
00155         }
00156     }
00157     stream << "}\n}";
00158     return stream;
00159 }

std::ostream& operator<< ( std::ostream &  stream,
IgAssociationSet associationSet 
)

Definition at line 90 of file IgCollection.cc.

References IgAssociationSet::begin(), IgAssociationSet::end(), i, and IgAssociationSet::name().

00091 {
00092     stream << "\""<< associationSet.name() << "\": [";
00093   
00094     for(IgAssociationSet::Iterator i = associationSet.begin();
00095         i != associationSet.end();
00096         i++)
00097     {
00098         stream << *i;
00099         if(i + 1 != associationSet.end())
00100         {stream << ", "; }
00101         stream << "\n";
00102     }
00103   
00104     stream << "]\n";
00105     return stream;
00106 }

std::ostream& operator<< ( std::ostream &  stream,
const IgAssociation association 
)

Definition at line 84 of file IgCollection.cc.

References IgAssociation::first(), and IgAssociation::second().

00085 {
00086     stream << "[" << association.first() << ", " << association.second() << "]";
00087     return stream;
00088 }

std::ostream& operator<< ( std::ostream &  stream,
const IgRef ref 
)

Definition at line 78 of file IgCollection.cc.

References IgRef::collectionId(), and IgRef::objectId().

00079 {
00080     stream << "[" << ref.collectionId() << ", " << ref.objectId() << "]";
00081     return stream;
00082 }

std::ostream& operator<< ( std::ostream &  stream,
IgCollection collection 
)

Definition at line 41 of file IgCollection.cc.

References IgCollection::begin(), IgCollection::end(), i, and IgCollection::name().

00042 {
00043     stream << "\""<< collection.name() << "\": [";
00044   
00045     for(IgCollectionIterator i = collection.begin();
00046         i != collection.end();
00047         i++)
00048     {
00049         stream << "[";
00050         (*i).stream(stream);
00051         stream << "]";
00052         if(i + 1 != collection.end())
00053         {stream << ", "; }
00054         stream << "\n";
00055     }
00056   
00057     stream << "]\n";
00058     return stream;
00059 }


Generated on Tue Jun 9 17:53:56 2009 for CMSSW by  doxygen 1.5.4