summaryrefslogtreecommitdiff
path: root/libxsd-frontend/xsd-frontend/semantic-graph/particle.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsd-frontend/xsd-frontend/semantic-graph/particle.hxx')
-rw-r--r--libxsd-frontend/xsd-frontend/semantic-graph/particle.hxx37
1 files changed, 16 insertions, 21 deletions
diff --git a/libxsd-frontend/xsd-frontend/semantic-graph/particle.hxx b/libxsd-frontend/xsd-frontend/semantic-graph/particle.hxx
index df48de4..a7f0755 100644
--- a/libxsd-frontend/xsd-frontend/semantic-graph/particle.hxx
+++ b/libxsd-frontend/xsd-frontend/semantic-graph/particle.hxx
@@ -1,6 +1,5 @@
// file : xsd-frontend/semantic-graph/particle.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC
+// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
#ifndef XSD_FRONTEND_SEMANTIC_GRAPH_PARTICLE_HXX
@@ -36,43 +35,41 @@ namespace XSDFrontend
}
public:
- UnsignedLong
+ unsigned long
min () const
{
return min_;
}
- UnsignedLong
+ unsigned long
max () const
{
return max_;
}
- protected:
- friend class Bits::Graph<Node, Edge>;
-
- ContainsParticle (UnsignedLong min, UnsignedLong max);
+ public:
+ ContainsParticle (unsigned long min, unsigned long max);
- Void
+ void
set_left_node (Compositor& n)
{
compositor_ = &n;
}
- Void
+ void
set_right_node (Particle& n)
{
particle_ = &n;
}
- Void
+ void
clear_left_node (Compositor& n)
{
assert (compositor_ == &n);
compositor_ = 0;
}
- Void
+ void
clear_right_node (Particle& n)
{
assert (particle_ == &n);
@@ -82,7 +79,7 @@ namespace XSDFrontend
private:
Particle* particle_;
Compositor* compositor_;
- UnsignedLong min_, max_;
+ unsigned long min_, max_;
};
//
@@ -90,7 +87,7 @@ namespace XSDFrontend
class Particle: public virtual Node
{
public:
- Boolean
+ bool
contained_particle_p ()
{
return contained_particle_ != 0;
@@ -104,32 +101,30 @@ namespace XSDFrontend
}
public:
- UnsignedLong
+ unsigned long
min () const
{
assert (contained_particle_ != 0);
return contained_particle_->min ();
}
- UnsignedLong
+ unsigned long
max () const
{
assert (contained_particle_ != 0);
return contained_particle_->max ();
}
- protected:
- friend class Bits::Graph<Node, Edge>;
-
+ public:
Particle ();
- Void
+ void
add_edge_right (ContainsParticle& e)
{
contained_particle_ = &e;
}
- Void
+ void
remove_edge_right (ContainsParticle& e)
{
assert (contained_particle_ == &e);