Update of /cvsroot/ccmtools/ccmtools/test/IDLParser/module
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv449/test/IDLParser/module
Added Files:
ModuleNested.idl Names.idl ModuleReopened.idl Makefile
Log Message:
Refactored test directory
--- NEW FILE: Names.idl ---
#ifndef __NAMES__IDL__
#define __NAMES__IDL__
/*
typedef long LongType;
// Within a naming scope, identifiers must be consistently capitalized !
typedef long longType; // should be an Error!!!
*/
/*
// A name in a nested scope cannot be the same as a name in its
// immediatela enclosing scope!
module world
{
module world // should be an Error!!!
{
typedef string StringType;
}; // end of module world
}; // end of module world
*/
// An interface cannot define a name that is the same as the name of the interface:
interface Name
{
typedef string Name; // should be an Error!!!
};
#endif // __NAMES__IDL__
--- NEW FILE: Makefile ---
all: idl3
idl3:
ccmparser ModuleNested.idl
ccmparser ModuleReopened.idl
ccmparser Names.idl
--- NEW FILE: ModuleReopened.idl ---
#ifndef __MODULE_REOPENED__IDL__
#define __MODULE_REOPENED__IDL__
module world
{
typedef long LongType;
// typedef long longType; !!!
enum Color
{
red,
green,
blue,
black,
orange
};
struct Person
{
long id;
string name;
};
}; // end of module world
module america
{
typedef long LongArray[10];
typedef sequence<long> LongSeq;
}; // end of module america
module world
{
module europe
{
struct Address
{
string street;
long number;
Person resident;
};
interface InterfaceBasicTypeAttributes
{
attribute float floatValue;
attribute double doubleValue;
attribute long double lDoubleValue;
};
}; // end of module europe
module europe
{
module austria
{
interface InterfaceUserType
{
::LongType typedefOpAbsolute(in ::LongType p1);
LongType typedefOpRelative(in LongType p1);
::world::Color enumOpAbsolute(in ::world::Color p1);
Color enumOpRelative(in Color p1);
::world::europe::Address structOpAbsolute(in ::world::europe::Address p1);
Address structOpRelative(in Address p1);
::america::LongArray arrayOpAbsolute(in ::america::LongArray p1);
::america::LongSeq sequenceOpAbsolute(in ::america::LongSeq p1);
::world::europe::InterfaceBasicTypeAttributes
interfaceOpAbsolute(in ::world::europe::InterfaceBasicTypeAttributes p1);
InterfaceBasicTypeAttributes interfaceOpRelative(in InterfaceBasicTypeAttributes p1);
};
}; // end of module austria
}; // end of module europe
}; // end of module world
#endif // __MODULE_NESTED__IDL__
--- NEW FILE: ModuleNested.idl ---
#ifndef __MODULE_NESTED__IDL__
#define __MODULE_NESTED__IDL__
typedef long LongType;
module world
{
enum Color
{
red,
green,
blue,
black,
orange
};
struct Person
{
long id;
string name;
};
module america
{
typedef long LongArray[10];
typedef sequence<long> LongSeq;
}; // end of module america
module europe
{
struct Address
{
string street;
long number;
Person resident;
};
interface InterfaceBasicTypeAttributes
{
attribute float floatValue;
attribute double doubleValue;
attribute long double lDoubleValue;
};
module austria
{
interface InterfaceUserType
{
::LongType typedefOpAbsolute(in ::LongType p1);
LongType typedefOpRelative(in LongType p1);
::world::Color enumOpAbsolute(in ::world::Color p1);
Color enumOpRelative(in Color p1);
::world::europe::Address structOpAbsolute(in ::world::europe::Address p1);
Address structOpRelative(in Address p1);
::world::america::LongArray arrayOpAbsolute(in ::world::america::LongArray p1);
// america::LongArray arrayOpReletive(in america::LongArray p1); !!!!!
::world::america::LongSeq sequenceOpAbsolute(in ::world::america::LongSeq p1);
// america::LongSeq sequenceOpRelative(in america::LongSeq p1); !!!!!
::world::europe::InterfaceBasicTypeAttributes
interfaceOpAbsolute(in ::world::europe::InterfaceBasicTypeAttributes p1);
InterfaceBasicTypeAttributes interfaceOpRelative(in InterfaceBasicTypeAttributes p1);
};
}; // end of module austria
}; // end of module europe
}; // end of module world
#endif // __MODULE_NESTED__IDL__
|