summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorboris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-31 07:30:53 +0000
committerboris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-31 07:30:53 +0000
commitb5c1e4f4ba55f296dd26590927a0947c2585f67c (patch)
tree37d2125bd77e5089338c56bbf770987a555431e6 /TAO
parentd024edea5912b915ff4e2be792015c7d3b00a5a0 (diff)
downloadATCD-b5c1e4f4ba55f296dd26590927a0947c2585f67c.tar.gz
ChangeLogTag: Thu Mar 31 09:45:07 2005 Boris Kolpackov <boris@kolpackov.net>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp2
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/Parser.cpp64
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/Parser.hpp13
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Attribute.hpp6
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp101
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.hpp8
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp40
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp129
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.cpp150
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.hpp45
-rw-r--r--TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp71
-rw-r--r--TAO/CIAO/ChangeLog22
12 files changed, 625 insertions, 26 deletions
diff --git a/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp b/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp
index abd5626b0a4..a2def15efb2 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp
@@ -34,6 +34,7 @@ namespace CCF
keyword_table_.insert ("exception" );
keyword_table_.insert ("enum" );
keyword_table_.insert ("factory" );
+ keyword_table_.insert ("getraises" );
keyword_table_.insert ("in" );
keyword_table_.insert ("inout" );
keyword_table_.insert ("interface" );
@@ -48,6 +49,7 @@ namespace CCF
keyword_table_.insert ("raises" );
keyword_table_.insert ("readonly" );
keyword_table_.insert ("sequence" );
+ keyword_table_.insert ("setraises" );
keyword_table_.insert ("struct" );
keyword_table_.insert ("supports" );
keyword_table_.insert ("switch" );
diff --git a/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp b/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp
index 853351da517..8a73bc0c60c 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp
@@ -42,6 +42,7 @@ namespace CCF
ENUM ("enum" ),
EXCEPTION ("exception" ),
FACTORY ("factory" ),
+ GETRAISES ("getraises" ),
IN ("in" ),
INOUT ("inout" ),
INTERFACE ("interface" ),
@@ -56,6 +57,7 @@ namespace CCF
RAISES ("raises" ),
READONLY ("readonly" ),
SEQUENCE ("sequence" ),
+ SETRAISES ("setraises" ),
STRING ("string" ),
STRUCT ("struct" ),
SUPPORTS ("supports" ),
@@ -108,6 +110,12 @@ namespace CCF
act_attribute_name (
f.attribute (), &SemanticAction::Attribute::name),
+ act_attribute_get_raises (
+ f.attribute (), &SemanticAction::Attribute::get_raises),
+
+ act_attribute_set_raises (
+ f.attribute (), &SemanticAction::Attribute::set_raises),
+
act_attribute_end (
f.attribute (), &SemanticAction::Attribute::end),
@@ -834,16 +842,60 @@ namespace CCF
//
//
attribute_decl =
- (
- (READONLY >> ATTRIBUTE)[act_attribute_begin_ro]
- |
- ATTRIBUTE[act_attribute_begin_rw]
- )
- >> identifier[act_attribute_type]
+ (
+ (READONLY >> ATTRIBUTE)[act_attribute_begin_ro]
+ >> attribute_ro_decl_trailer
+ )
+ |
+ (
+ ATTRIBUTE[act_attribute_begin_rw]
+ >> attribute_rw_decl_trailer
+ )
+ ;
+
+
+ attribute_ro_decl_trailer =
+ identifier[act_attribute_type]
>> simple_identifier[act_attribute_name]
+ >> !(
+ (RAISES >> LPAREN >> attribute_get_raises_list >> RPAREN)
+ |
+ +(COMMA >> simple_identifier[act_attribute_name])
+ )
>> SEMI[act_attribute_end]
;
+ attribute_rw_decl_trailer =
+ identifier[act_attribute_type]
+ >> simple_identifier[act_attribute_name]
+ >> !(
+ attribute_rw_raises_spec
+ |
+ +(COMMA >> simple_identifier[act_attribute_name])
+ )
+ >> SEMI[act_attribute_end]
+ ;
+
+ attribute_rw_raises_spec =
+ (
+ (GETRAISES >> LPAREN >> attribute_get_raises_list >> RPAREN)
+ >> !(SETRAISES >> LPAREN >> attribute_set_raises_list >> RPAREN)
+ )
+ |
+ (SETRAISES >> LPAREN >> attribute_set_raises_list >> RPAREN)
+ ;
+
+ attribute_get_raises_list =
+ identifier[act_attribute_get_raises]
+ >> *(COMMA >> identifier[act_attribute_get_raises])
+ ;
+
+
+ attribute_set_raises_list =
+ identifier[act_attribute_set_raises]
+ >> *(COMMA >> identifier[act_attribute_set_raises])
+ ;
+
// exception
//
diff --git a/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp b/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp
index bcf1875273f..a800472791e 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp
@@ -324,6 +324,7 @@ namespace CCF
KeywordParser ENUM;
KeywordParser EXCEPTION;
KeywordParser FACTORY;
+ KeywordParser GETRAISES;
KeywordParser IN;
KeywordParser INOUT;
KeywordParser INTERFACE;
@@ -338,6 +339,7 @@ namespace CCF
KeywordParser RAISES;
KeywordParser READONLY;
KeywordParser SEQUENCE;
+ KeywordParser SETRAISES;
KeywordParser STRING;
KeywordParser STRUCT;
KeywordParser SUPPORTS;
@@ -434,6 +436,11 @@ namespace CCF
Rule interface_body;
Rule attribute_decl;
+ Rule attribute_ro_decl_trailer;
+ Rule attribute_rw_decl_trailer;
+ Rule attribute_rw_raises_spec;
+ Rule attribute_get_raises_list;
+ Rule attribute_set_raises_list;
Rule exception_decl;
Rule exception_body;
@@ -512,6 +519,12 @@ namespace CCF
OneArgAction<SimpleIdentifierPtr, SemanticAction::Attribute>
act_attribute_name;
+ OneArgAction<IdentifierPtr, SemanticAction::Attribute>
+ act_attribute_get_raises;
+
+ OneArgAction<IdentifierPtr, SemanticAction::Attribute>
+ act_attribute_set_raises;
+
NoArgAction<SemanticAction::Attribute>
act_attribute_end;
diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Attribute.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Attribute.hpp
index 74d5357814f..d113d9136cf 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Attribute.hpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Attribute.hpp
@@ -28,6 +28,12 @@ namespace CCF
name (SimpleIdentifierPtr const& id) = 0;
virtual void
+ get_raises (IdentifierPtr const& id) = 0;
+
+ virtual void
+ set_raises (IdentifierPtr const& id) = 0;
+
+ virtual void
end () = 0;
};
}
diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp
index 918ea7729f7..dcffba1dc92 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp
@@ -30,7 +30,9 @@ namespace CCF
{
if (ctx.trace ()) cerr << "readonly attribute" << endl;
- a_ = &ctx.tu ().new_node<ReadAttribute> ();
+ readonly_ = true;
+
+
}
void Attribute::
@@ -38,7 +40,7 @@ namespace CCF
{
if (ctx.trace ()) cerr << "readwrite attribute" << endl;
- a_ = &ctx.tu ().new_node<ReadWriteAttribute> ();
+ readonly_ = false;
}
void Attribute::
@@ -49,13 +51,13 @@ namespace CCF
Name name (id->lexeme ());
ScopedName from (ctx.scope ().scoped_name ());
+ type_ = 0;
+
try
{
try
{
- Type& t (resolve<Type> (from, name, Flags::complete));
-
- ctx.tu ().new_edge<Belongs> (*a_, t);
+ type_ = &resolve<Type> (from, name, Flags::complete);
}
catch (Resolve const&)
{
@@ -86,7 +88,94 @@ namespace CCF
{
if (ctx.trace ()) cerr << id << endl;
- ctx.tu ().new_edge<Defines> (ctx.scope (), *a_, id->lexeme ());
+ if (type_ != 0)
+ {
+ if (readonly_)
+ a_ = &ctx.tu ().new_node<ReadAttribute> ();
+ else
+ a_ = &ctx.tu ().new_node<ReadWriteAttribute> ();
+
+ ctx.tu ().new_edge<Belongs> (*a_, *type_);
+ ctx.tu ().new_edge<Defines> (ctx.scope (), *a_, id->lexeme ());
+ }
+ }
+
+ void Attribute::
+ get_raises (IdentifierPtr const& id)
+ {
+ if (ctx.trace ()) cerr << "get-raise " << id << endl;
+
+ Name name (id->lexeme ());
+ ScopedName from (ctx.scope ().scoped_name ());
+
+ try
+ {
+ try
+ {
+ SemanticGraph::Exception& e (
+ resolve<SemanticGraph::Exception> (from, name));
+
+ ctx.tu ().new_edge<GetRaises> (
+ dynamic_cast<ReadAttribute&> (*a_), e);
+ }
+ catch (Resolve const&)
+ {
+ cerr << "error: invalid raises declaration" << endl;
+ throw;
+ }
+ }
+ catch (NotFound const&)
+ {
+ cerr << "no exception with name \'" << name
+ << "\' visible from scope \'" << from << "\'" << endl;
+ }
+ catch (WrongType const&)
+ {
+ cerr << "declaration with name \'" << name
+ << "\' visible from scope \'" << from
+ << "\' is not an exception declaration" << endl;
+ cerr << "using non-exception type in raises declaration is "
+ << "illegal" << endl;
+ }
+ }
+
+ void Attribute::
+ set_raises (IdentifierPtr const& id)
+ {
+ if (ctx.trace ()) cerr << "set-raise " << id << endl;
+
+ Name name (id->lexeme ());
+ ScopedName from (ctx.scope ().scoped_name ());
+
+ try
+ {
+ try
+ {
+ SemanticGraph::Exception& e (
+ resolve<SemanticGraph::Exception> (from, name));
+
+ ctx.tu ().new_edge<SetRaises> (
+ dynamic_cast<WriteAttribute&> (*a_), e);
+ }
+ catch (Resolve const&)
+ {
+ cerr << "error: invalid raises declaration" << endl;
+ throw;
+ }
+ }
+ catch (NotFound const&)
+ {
+ cerr << "no exception with name \'" << name
+ << "\' visible from scope \'" << from << "\'" << endl;
+ }
+ catch (WrongType const&)
+ {
+ cerr << "declaration with name \'" << name
+ << "\' visible from scope \'" << from
+ << "\' is not an exception declaration" << endl;
+ cerr << "using non-exception type in raises declaration is "
+ << "illegal" << endl;
+ }
}
void Attribute::
diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.hpp
index 84809eb2d00..88bc8e5016a 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.hpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Attribute.hpp
@@ -34,9 +34,17 @@ namespace CCF
name (SimpleIdentifierPtr const& id);
virtual void
+ get_raises (IdentifierPtr const& id);
+
+ virtual void
+ set_raises (IdentifierPtr const& id);
+
+ virtual void
end ();
private:
+ bool readonly_;
+ SemanticGraph::Type* type_;
SemanticGraph::Attribute* a_;
};
}
diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp
index 02ae0481c17..5986dc8db51 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.cpp
@@ -34,6 +34,26 @@ namespace CCF
static_type_info () { return attribute_; }
+ // GetRaises
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ get_raises_init_ ()
+ {
+ TypeInfo ti (typeid (GetRaises));
+ ti.add_base (Access::PUBLIC, true, Edge::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo get_raises_ (get_raises_init_ ());
+ }
+
+ TypeInfo const& GetRaises::
+ static_type_info () { return get_raises_; }
+
+
// ReadAttribute
//
//
@@ -54,6 +74,26 @@ namespace CCF
static_type_info () { return read_attribute_; }
+ // SetRaises
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ set_raises_init_ ()
+ {
+ TypeInfo ti (typeid (SetRaises));
+ ti.add_base (Access::PUBLIC, true, Edge::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo set_raises_ (set_raises_init_ ());
+ }
+
+ TypeInfo const& SetRaises::
+ static_type_info () { return set_raises_; }
+
+
// WriteAttribute
//
//
diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp
index c180683a4f9..a307d09e012 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Attribute.hpp
@@ -33,11 +33,29 @@ namespace CCF
};
+ //
+ //
+ //
class ReadAttribute;
+ //
+ //
+ //
class GetRaises : public virtual Edge
{
public:
+ ReadAttribute&
+ attribute () const
+ {
+ return *attribute_;
+ }
+
+ Exception&
+ exception () const
+ {
+ return *exception_;
+ }
+
static Introspection::TypeInfo const&
static_type_info ();
@@ -48,11 +66,51 @@ namespace CCF
{
type_info (static_type_info ());
}
+
+ void
+ set_left_node (ReadAttribute& a)
+ {
+ attribute_ = &a;
+ }
+
+ void
+ set_right_node (Exception& n)
+ {
+ exception_ = &n;
+ }
+
+ private:
+ ReadAttribute* attribute_;
+ Exception* exception_;
};
+ //
+ //
+ //
class ReadAttribute : public virtual Attribute
{
+ typedef
+ std::vector<GetRaises*>
+ GetRaises_;
+
+ public:
+ typedef
+ GetRaises_::const_iterator
+ GetRaisesIterator;
+
+ GetRaisesIterator
+ get_raises_begin () const
+ {
+ return get_raises_.begin ();
+ }
+
+ GetRaisesIterator
+ get_raises_end () const
+ {
+ return get_raises_.end ();
+ }
+
public:
static Introspection::TypeInfo const&
static_type_info ();
@@ -64,15 +122,41 @@ namespace CCF
{
type_info (static_type_info ());
}
+
+ void
+ add_edge_left (GetRaises& e)
+ {
+ get_raises_.push_back (&e);
+ }
+
+ private:
+ GetRaises_ get_raises_;
};
//
//
//
+ class WriteAttribute;
+
+ //
+ //
+ //
class SetRaises : public virtual Edge
{
public:
+ WriteAttribute&
+ attribute () const
+ {
+ return *attribute_;
+ }
+
+ Exception&
+ exception () const
+ {
+ return *exception_;
+ }
+
static Introspection::TypeInfo const&
static_type_info ();
@@ -83,11 +167,47 @@ namespace CCF
{
type_info (static_type_info ());
}
+
+ void
+ set_left_node (WriteAttribute& a)
+ {
+ attribute_ = &a;
+ }
+
+ void
+ set_right_node (Exception& n)
+ {
+ exception_ = &n;
+ }
+
+ private:
+ WriteAttribute* attribute_;
+ Exception* exception_;
};
class WriteAttribute : public virtual Attribute
{
+ typedef
+ std::vector<SetRaises*>
+ SetRaises_;
+
+ public:
+ typedef
+ SetRaises_::const_iterator
+ SetRaisesIterator;
+
+ SetRaisesIterator
+ set_raises_begin () const
+ {
+ return set_raises_.begin ();
+ }
+
+ SetRaisesIterator
+ set_raises_end () const
+ {
+ return set_raises_.end ();
+ }
public:
static Introspection::TypeInfo const&
static_type_info ();
@@ -99,6 +219,15 @@ namespace CCF
{
type_info (static_type_info ());
}
+
+ void
+ add_edge_left (SetRaises& e)
+ {
+ set_raises_.push_back (&e);
+ }
+
+ private:
+ SetRaises_ set_raises_;
};
diff --git a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.cpp b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.cpp
index f6355af1ce3..42ff8bd21bf 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.cpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.cpp
@@ -13,7 +13,6 @@ namespace CCF
// Attribute
//
//
-
void Attribute::
traverse (Type& a)
{
@@ -59,6 +58,7 @@ namespace CCF
pre (a);
belongs (a);
name (a);
+ get_raises (a);
post (a);
}
@@ -85,10 +85,61 @@ namespace CCF
}
void ReadAttribute::
+ get_raises (Type& a, EdgeDispatcherBase& d)
+ {
+ iterate_and_traverse (a.get_raises_begin (), a.get_raises_end (), d);
+ }
+
+ void ReadAttribute::
+ get_raises (Type& a)
+ {
+ Type::GetRaisesIterator
+ b (a.get_raises_begin ()),
+ e (a.get_raises_end ());
+
+ if (b != e)
+ {
+ get_raises_pre (a);
+ iterate_and_traverse (b,
+ e,
+ edge_traverser (),
+ *this,
+ &ReadAttribute::comma,
+ a);
+ get_raises_post (a);
+ }
+ else
+ {
+ get_raises_none (a);
+ }
+ }
+
+ void ReadAttribute::
+ get_raises_pre (Type&)
+ {
+ }
+
+ void ReadAttribute::
+ get_raises_post (Type&)
+ {
+ }
+
+ void ReadAttribute::
+ get_raises_none (Type&)
+ {
+ }
+
+ void ReadAttribute::
post (Type&)
{
}
+ void ReadAttribute::
+ comma (Type&)
+ {
+ }
+
+
// ReadWriteAttribute
//
//
@@ -98,6 +149,8 @@ namespace CCF
pre (a);
belongs (a);
name (a);
+ get_raises (a);
+ set_raises (a);
post (a);
}
@@ -124,9 +177,104 @@ namespace CCF
}
void ReadWriteAttribute::
+ get_raises (Type& a, EdgeDispatcherBase& d)
+ {
+ iterate_and_traverse (a.get_raises_begin (), a.get_raises_end (), d);
+ }
+
+ void ReadWriteAttribute::
+ get_raises (Type& a)
+ {
+ Type::GetRaisesIterator
+ b (a.get_raises_begin ()),
+ e (a.get_raises_end ());
+
+ if (b != e)
+ {
+ get_raises_pre (a);
+ iterate_and_traverse (b,
+ e,
+ edge_traverser (),
+ *this,
+ &ReadWriteAttribute::comma,
+ a);
+ get_raises_post (a);
+ }
+ else
+ {
+ get_raises_none (a);
+ }
+ }
+
+ void ReadWriteAttribute::
+ get_raises_pre (Type&)
+ {
+ }
+
+ void ReadWriteAttribute::
+ get_raises_post (Type&)
+ {
+ }
+
+ void ReadWriteAttribute::
+ get_raises_none (Type&)
+ {
+ }
+
+ void ReadWriteAttribute::
+ set_raises (Type& a, EdgeDispatcherBase& d)
+ {
+ iterate_and_traverse (a.set_raises_begin (), a.set_raises_end (), d);
+ }
+
+ void ReadWriteAttribute::
+ set_raises (Type& a)
+ {
+ Type::SetRaisesIterator
+ b (a.set_raises_begin ()),
+ e (a.set_raises_end ());
+
+ if (b != e)
+ {
+ set_raises_pre (a);
+ iterate_and_traverse (b,
+ e,
+ edge_traverser (),
+ *this,
+ &ReadWriteAttribute::comma,
+ a);
+ set_raises_post (a);
+ }
+ else
+ {
+ set_raises_none (a);
+ }
+ }
+
+ void ReadWriteAttribute::
+ set_raises_pre (Type&)
+ {
+ }
+
+ void ReadWriteAttribute::
+ set_raises_post (Type&)
+ {
+ }
+
+ void ReadWriteAttribute::
+ set_raises_none (Type&)
+ {
+ }
+
+ void ReadWriteAttribute::
post (Type&)
{
}
+
+ void ReadWriteAttribute::
+ comma (Type&)
+ {
+ }
}
}
}
diff --git a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.hpp b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.hpp
index 80d8eb787f4..522671b6609 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.hpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Attribute.hpp
@@ -17,6 +17,32 @@ namespace CCF
//
//
//
+ struct GetRaises : Edge<SemanticGraph::GetRaises>
+ {
+ virtual void
+ traverse (Type& e)
+ {
+ node_traverser ().traverse (e.exception ());
+ }
+ };
+
+
+ //
+ //
+ //
+ struct SetRaises : Edge<SemanticGraph::SetRaises>
+ {
+ virtual void
+ traverse (Type& e)
+ {
+ node_traverser ().traverse (e.exception ());
+ }
+ };
+
+
+ //
+ //
+ //
struct Attribute : Node<SemanticGraph::Attribute>
{
virtual void
@@ -58,7 +84,6 @@ namespace CCF
virtual void
name (Type&);
- /*
virtual void
get_raises (Type&, EdgeDispatcherBase&);
@@ -70,10 +95,15 @@ namespace CCF
virtual void
get_raises_post (Type&);
- */
+
+ virtual void
+ get_raises_none (Type&);
virtual void
post (Type&);
+
+ virtual void
+ comma (Type&);
};
@@ -97,7 +127,6 @@ namespace CCF
virtual void
name (Type&);
- /*
virtual void
get_raises (Type&, EdgeDispatcherBase&);
@@ -111,6 +140,9 @@ namespace CCF
get_raises_post (Type&);
virtual void
+ get_raises_none (Type&);
+
+ virtual void
set_raises (Type&, EdgeDispatcherBase&);
virtual void
@@ -121,10 +153,15 @@ namespace CCF
virtual void
set_raises_post (Type&);
- */
+
+ virtual void
+ set_raises_none (Type&);
virtual void
post (Type&);
+
+ virtual void
+ comma (Type&);
};
}
}
diff --git a/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp b/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp
index baff96687f9..75a84fc8f84 100644
--- a/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp
+++ b/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp
@@ -361,8 +361,14 @@ namespace
Emitter
{
AttributeEmitter (Context& c, ostream& os)
- : Emitter (c, os)
+ : Emitter (c, os),
+ type_name_ (c, os)
{
+ edge_traverser (get_raises_);
+ edge_traverser (set_raises_);
+
+ get_raises_.node_traverser (type_name_);
+ set_raises_.node_traverser (type_name_);
}
// ReadAttribute
@@ -380,11 +386,29 @@ namespace
}
virtual void
+ get_raises_pre (SemanticGraph::ReadAttribute&)
+ {
+ os << " raises (";
+ }
+
+ virtual void
+ get_raises_post (SemanticGraph::ReadAttribute&)
+ {
+ os << ")";
+ }
+
+ virtual void
post (SemanticGraph::ReadAttribute&)
{
os << ";";
}
+ virtual void
+ comma (SemanticGraph::ReadAttribute&)
+ {
+ os << ", ";
+ }
+
// ReadWriteAttribute
//
virtual void
@@ -400,10 +424,45 @@ namespace
}
virtual void
+ get_raises_pre (SemanticGraph::ReadWriteAttribute&)
+ {
+ os << " getraises (";
+ }
+
+ virtual void
+ get_raises_post (SemanticGraph::ReadWriteAttribute&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ set_raises_pre (SemanticGraph::ReadWriteAttribute&)
+ {
+ os << " setraises (";
+ }
+
+ virtual void
+ set_raises_post (SemanticGraph::ReadWriteAttribute&)
+ {
+ os << ")";
+ }
+
+ virtual void
post (SemanticGraph::ReadWriteAttribute&)
{
os << ";";
}
+
+ virtual void
+ comma (SemanticGraph::ReadWriteAttribute&)
+ {
+ os << ", ";
+ }
+
+ private:
+ Traversal::GetRaises get_raises_;
+ Traversal::SetRaises set_raises_;
+ TypeNameEmitter type_name_;
};
@@ -724,7 +783,7 @@ namespace
struct ContextEmitter : ComponentEmitter
{
ContextEmitter (Context& c, ostream& os, CommandLine const& cl)
- : ComponentEmitter (c, os),
+ : ComponentEmitter (c, os),
name_emitter (c, os, "CCM_", "_Context"),
cl_ (cl)
{
@@ -755,7 +814,7 @@ namespace
{
string swap_option = cl_.get_value ("custom-container", "");
bool swapping = (swap_option == "upgradeable");
-
+
if (swapping)
{
os << " : ::CIAO::UpgradeableContext";
@@ -775,7 +834,7 @@ namespace
virtual void
names_post (Type& t)
- {
+ {
os << "}";
}
@@ -1594,7 +1653,7 @@ namespace
: Emitter (c, os)
{
}
-
+
virtual void
traverse (SemanticGraph::QuoteIncludes& qi)
{
@@ -1876,7 +1935,7 @@ generate (CommandLine const& cl,
string swap_option = cl.get_value ("custom-container", "");
bool swapping = (swap_option == "upgradeable");
-
+
if (swapping)
{
os << "#include <UpgradeableContext.idl>" << endl;
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog
index 98f02312f1f..58757ac96f5 100644
--- a/TAO/CIAO/ChangeLog
+++ b/TAO/CIAO/ChangeLog
@@ -1,3 +1,19 @@
+Thu Mar 31 09:45:07 2005 Boris Kolpackov <boris@kolpackov.net>
+
+ * CCF/CCF/IDL2/LexicalAnalyzer.cpp:
+ * CCF/CCF/IDL2/Parser.cpp:
+ * CCF/CCF/IDL2/Parser.hpp:
+ * CCF/CCF/IDL2/SemanticAction/Attribute.hpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Attribute.cpp:
+ * CCF/CCF/IDL2/SemanticAction/Impl/Attribute.hpp:
+ * CCF/CCF/IDL2/SemanticGraph/Attribute.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/Attribute.hpp:
+ * CCF/CCF/IDL2/Traversal/Attribute.cpp:
+ * CCF/CCF/IDL2/Traversal/Attribute.hpp:
+ * CIDLC/ExecutorMappingGenerator.cpp:
+
+ Added support for raises-specification in attributes.
+
Wed Mar 30 21:48:14 2005 Nanbor Wang <nanbor@cs.wustl.edu>
* DAnCE/Config_Handlers/Deployment.hpp: Made the function
@@ -37,10 +53,10 @@ Wed Mar 30 22:03:23 2005 Will Otte <wotte@dre.vanderbilt.edu>
* docs/schema/xsc-banner.cpp
* docs/schema/xsc-banner.h
-
- These files are the banners that should be included at
+
+ These files are the banners that should be included at
the top of XSC generated code.
-
+
Wed Mar 30 13:23:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
* ciao/ComponentsC.h: