diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
commit | b71531b42b3325fd6079a7039aae8641262c8adf (patch) | |
tree | a5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp | |
parent | a0f67cc97c0050d907145e312135b60c0125e56e (diff) | |
download | ATCD-b71531b42b3325fd6079a7039aae8641262c8adf.tar.gz |
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp')
-rw-r--r-- | modules/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/modules/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp b/modules/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp new file mode 100644 index 00000000000..d243d468cbe --- /dev/null +++ b/modules/CIAO/CCF/CCF/IDL3/SemanticGraph/Home.hpp @@ -0,0 +1,149 @@ +// file : CCF/IDL3/SemanticGraph/Home.hpp +// author : Boris Kolpackov <boris@dre.vanderbilt.edu> +// cvs-id : $Id$ + +#ifndef CCF_IDL3_SEMANTIC_GRAPH_HOME_HPP +#define CCF_IDL3_SEMANTIC_GRAPH_HOME_HPP + +#include "CCF/IDL2/SemanticGraph/Operation.hpp" +#include "CCF/IDL3/SemanticGraph/Elements.hpp" +#include "CCF/IDL3/SemanticGraph/Component.hpp" + +namespace CCF +{ + namespace IDL3 + { + namespace SemanticGraph + { + // + // + // + class Home : public virtual Type, public virtual Scope + { + typedef + std::vector <Supports*> + Supports_; + + public: + Manages& + manages () const + { + return *manages_; + } + + Inherits* + inherits () const + { + return inherits_; + } + + typedef + Supports_::const_iterator + SupportsIterator; + + SupportsIterator + supports_begin () const + { + return supports_.begin (); + } + + SupportsIterator + supports_end () const + { + return supports_.end (); + } + + virtual bool + complete () const + { + return true; + } + + static Introspection::TypeInfo const& + static_type_info (); + + protected: + friend class Graph<Node, Edge>; + + Home (Path const& path, unsigned long line) + : Node (path, line), inherits_ (0) + { + type_info (static_type_info ()); + } + + using Type::add_edge_right; + using Scope::add_edge_left; + + void + add_edge_left (Manages& e) + { + manages_ = &e; + } + + void + add_edge_left (Inherits& e) + { + inherits_ = &e; + } + + void + add_edge_right (Inherits&) + { + } + + void + add_edge_left (Supports& e) + { + supports_.push_back (&e); + } + + private: + Manages* manages_; + Inherits* inherits_; + Supports_ supports_; + }; + + + // + // + // + class HomeFactory : public virtual TwoWayOperation + { + public: + static Introspection::TypeInfo const& + static_type_info (); + + protected: + friend class Graph<Node, Edge>; + + HomeFactory (Path const& path, unsigned long line) + : Node (path, line), TwoWayOperation (path, line) + { + type_info (static_type_info ()); + } + }; + + + // + // + // + class HomeFinder : public virtual TwoWayOperation + { + public: + static Introspection::TypeInfo const& + static_type_info (); + + protected: + friend class Graph<Node, Edge>; + + HomeFinder (Path const& path, unsigned long line) + : Node (path, line), TwoWayOperation (path, line) + { + type_info (static_type_info ()); + } + }; + } + } +} + +#endif // CCF_IDL3_SEMANTIC_GRAPH_HOME_HPP |