1 #ifndef DD_DDErrorDetection_h 2 #define DD_DDErrorDetection_h 33 typedef std::map<std::string, std::set<std::string> >
ns_type;
34 typedef std::map<std::string, std::set<DDName> >
ns_nm_type;
36 template<
class T> std::ostream & operator<<(std::ostream & o, const std::set<T> &
v)
38 typename std::set<T>::const_iterator it(
v.begin()), ed(
v.end());
39 for(; it != ed; ++it) {
40 o << it->ddname() <<
' ';
45 template<
class T> std::ostream & operator<<(std::ostream & o, const std::map<std::string, std::set<T> > &
m) {
46 typedef typename std::map<std::string, std::set<T> >::const_iterator c_it;
47 c_it it(
m.begin()), ed(
m.end());
48 for (; it != ed; ++it) {
49 o << it->first <<
": " << it->second;
55 template<
class T,
class N> std::ostream & operator<<(std::ostream & o, const std::map<N, std::set<T> > &
m) {
56 typedef typename std::map<N, std::set<T> >::const_iterator c_it;
57 c_it it(
m.begin()), ed(
m.end());
58 for (; it != ed; ++it) {
59 o << it->first.ddname() <<
": " << it->second;
71 for (; it != ed; ++it) {
72 result = it->isDefined().second;
75 m[it->name().ns()].insert(it->name().name());
87 for (; it != ed; ++it) {
88 result = it->isDefined().second;
91 m[it->name().ns()].insert(it->name().name());
97 template <
class C>
const std::map<std::string, std::set<C> > &
dd_error_scan(
const C &)
99 typedef std::map<std::string, std::set<C> > error_type;
100 static error_type result_;
103 for (; it != ed; ++it) {
104 if (!it->isDefined().second) {
105 result_[it->name().ns()].insert(*it);
124 const std::map<DDMaterial, std::set<DDLogicalPart> > &
ma_lp();
125 const std::map<DDSolid, std::set<DDLogicalPart> > &
so_lp();
126 const std::map<DDSolid, std::set<DDSolid> > &
so();
130 const std::vector<std::pair<std::string,DDName> > &
ma();
void scan(const DDCompactView &cpv)
DDI::Singleton< std::map< std::string, std::set< DDLogicalPart > > > lp_err
const std::map< DDSolid, std::set< DDSolid > > & so()
std::map< std::string, std::set< DDName > > ns_nm_type
static PFTauRenderPlugin instance
DDMaterial is used to define and access material information.
DDI::Singleton< std::map< std::string, std::set< DDMaterial > > > ma_err
DDName is used to identify DDD entities uniquely.
const std::map< DDMaterial, std::set< DDLogicalPart > > & ma_lp()
type of data representation of DDCompactView
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
const std::map< std::string, std::set< DDLogicalPart > > & lp_cpv(const DDCompactView &cpv)
const std::map< std::string, std::set< C > > & dd_error_scan(const C &)
bool noErrorsInTheReport(const DDCompactView &cpv)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
def template(fileName, svg, replaceme="REPLACEME")
const std::vector< std::pair< std::string, DDName > > & ma()
const std::map< DDSolid, std::set< DDLogicalPart > > & so_lp()
void report(const DDCompactView &cpv, std::ostream &o)
DDI::Singleton< std::map< std::string, std::set< DDSpecifics > > > sp_err
bool findNameSpaces(T dummy, ns_type &m)
std::map< std::string, std::set< std::string > > ns_type
DDI::Singleton< std::map< std::string, std::set< DDSolid > > > so_err
DDI::Singleton< std::map< std::string, std::set< DDRotation > > > ro_err
Interface to attach user specific data to nodes in the expanded-view.