You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(86) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(114) |
Feb
(254) |
Mar
(166) |
Apr
(122) |
May
(131) |
Jun
(59) |
Jul
(201) |
Aug
(85) |
Sep
(80) |
Oct
(64) |
Nov
(103) |
Dec
(36) |
| 2005 |
Jan
(231) |
Feb
(204) |
Mar
(71) |
Apr
(54) |
May
(50) |
Jun
(120) |
Jul
(17) |
Aug
(124) |
Sep
(75) |
Oct
(154) |
Nov
(37) |
Dec
(143) |
| 2006 |
Jan
(346) |
Feb
(170) |
Mar
|
Apr
|
May
(273) |
Jun
(113) |
Jul
(427) |
Aug
(570) |
Sep
(212) |
Oct
(550) |
Nov
(348) |
Dec
(314) |
| 2007 |
Jan
(709) |
Feb
(223) |
Mar
(104) |
Apr
(24) |
May
(11) |
Jun
(3) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Teiniker E. <tei...@us...> - 2007-01-24 15:35:37
|
Update of /cvsroot/ccmtools/ccmtools/doc/manual In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5911/doc/manual Modified Files: Titlepage.tex CcmtoolsManual.tex CcmtoolsManual.pdf Log Message: Added some manual pages. Index: CcmtoolsManual.pdf =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/CcmtoolsManual.pdf,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CcmtoolsManual.pdf 18 Jan 2007 09:31:54 -0000 1.14 --- CcmtoolsManual.pdf 24 Jan 2007 15:35:31 -0000 1.15 *************** *** 52,56 **** endobj 40 0 obj ! (Login Example) endobj 41 0 obj --- 52,56 ---- endobj 40 0 obj ! (Interface Definition Language) endobj [...16275 lines suppressed...] ! 0000512768 00000 n ! 0000514826 00000 n ! 0000514946 00000 n ! 0000515070 00000 n ! 0000515160 00000 n ! 0000515242 00000 n ! 0000523238 00000 n ! 0000539955 00000 n ! 0000539996 00000 n ! 0000540036 00000 n ! 0000540267 00000 n trailer << ! /Size 1433 ! /Root 1431 0 R ! /Info 1432 0 R >> startxref ! 540449 %%EOF Index: CcmtoolsManual.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/CcmtoolsManual.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CcmtoolsManual.tex 30 Nov 2006 08:04:48 -0000 1.5 --- CcmtoolsManual.tex 24 Jan 2007 15:35:31 -0000 1.6 *************** *** 1,5 **** %============================================================================ % CCM Tools Manual - % $Id$ %============================================================================= --- 1,4 ---- *************** *** 40,45 **** \include{HelloWorldExample/HelloWorldExample} ! % \include{ComponentModel/ComponentModel} ! % \include{InterfaceDefinitionLanguage/InterfaceDefinitionLanguage} \include{LoginExample/LoginExample} --- 39,44 ---- \include{HelloWorldExample/HelloWorldExample} ! \include{InterfaceDefinitionLanguage/InterfaceDefinitionLanguage} ! %\include{ComponentModel/ComponentModel} \include{LoginExample/LoginExample} Index: Titlepage.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/Titlepage.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Titlepage.tex 18 Jan 2007 09:31:54 -0000 1.5 --- Titlepage.tex 24 Jan 2007 15:35:31 -0000 1.6 *************** *** 4,14 **** \vspace*{3cm} {\LARGE \tt http://ccmtools.sourceforge.net} \\ \vspace{2cm} ! {\huge \bf CCM Tools User's Manual} \\ ! \vspace{15mm} \begin{figure}[htbp] \begin{center} ! \includegraphics[height=4cm,angle=0] {figures/CCMSymbol} \end{center} \end{figure} --- 4,18 ---- \vspace*{3cm} {\LARGE \tt http://ccmtools.sourceforge.net} \\ + \vspace{2cm} ! {\huge \bf CCM Tools} \\ ! ! \vspace{10mm} ! {\huge User's Manual} + \vspace{15mm} \begin{figure}[htbp] \begin{center} ! \includegraphics[height=5cm,angle=0] {figures/CcmtoolsComponent} \end{center} \end{figure} |
|
From: Teiniker E. <tei...@us...> - 2007-01-24 15:35:36
|
Update of /cvsroot/ccmtools/ccmtools/doc/manual/LoginExample In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5911/doc/manual/LoginExample Modified Files: Introduction.tex Log Message: Added some manual pages. Index: Introduction.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/LoginExample/Introduction.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Introduction.tex 18 Jan 2007 09:31:54 -0000 1.5 --- Introduction.tex 24 Jan 2007 15:35:31 -0000 1.6 *************** *** 9,13 **** \begin{figure}[htbp] \begin{center} ! \includegraphics [width=5cm,angle=0] {figures/LoginComponentExample} \caption{ A simple component example.} \label{figure:SimpleComponentExample} --- 9,13 ---- \begin{figure}[htbp] \begin{center} ! \includegraphics [height=5cm,angle=0] {figures/LoginComponentExample} \caption{ A simple component example.} \label{figure:SimpleComponentExample} |
|
From: Teiniker E. <tei...@us...> - 2007-01-24 15:35:36
|
Update of /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5911/doc/manual/InterfaceDefinitionLanguage Modified Files: Interfaces.tex SourceFiles.tex Modules.tex InterfaceDefinitionLanguage.tex Introduction.tex BasicTypes.tex UserTypes.tex Removed Files: Components.tex Log Message: Added some manual pages. Index: BasicTypes.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage/BasicTypes.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicTypes.tex 15 Aug 2006 15:45:08 -0000 1.1 --- BasicTypes.tex 24 Jan 2007 15:35:29 -0000 1.2 *************** *** 1,3 **** - % $Id$ %============================================================================= \section{Basic IDL Types} --- 1,2 ---- *************** *** 69,72 **** will eventually need to transmit between client and server, you can find out at runtime what type of value is contained in the {\tt any}. ! \newpage --- 68,78 ---- will eventually need to transmit between client and server, you can find out at runtime what type of value is contained in the {\tt any}. + It is recommended to use a {\tt typedef} construct to introduce any types in your + interface definition files. ! \vspace{2mm} ! Example: ! \begin{verbatim} ! typedef any GenericType; ! \end{verbatim} ! Index: Interfaces.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage/Interfaces.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Interfaces.tex 15 Aug 2006 15:45:07 -0000 1.1 --- Interfaces.tex 24 Jan 2007 15:35:29 -0000 1.2 *************** *** 1,28 **** - % $Id$ %============================================================================= \section{Interfaces} %============================================================================= %----------------------------------------------------------------------------- ! \subsection{Constant Definitions and Literals} %----------------------------------------------------------------------------- %----------------------------------------------------------------------------- ! \subsection{Operations} %----------------------------------------------------------------------------- %----------------------------------------------------------------------------- ! \subsection{Attributes} %----------------------------------------------------------------------------- %----------------------------------------------------------------------------- ! \subsection{User Exceptions} %----------------------------------------------------------------------------- %----------------------------------------------------------------------------- \subsection{Inheritance} %----------------------------------------------------------------------------- ! \newpage --- 1,253 ---- %============================================================================= \section{Interfaces} %============================================================================= + The focus of IDL is on interfaces and operations. + IDL interfaces define only the interface to an object and say nothing about the + object's implementation. This has the following consequences: + \begin{itemize} + \item By definition, everything in an interface is public. + Things are made private by simply not saying anything about them. + + \item IDL interfaces don't have member variables. + Member variables store state, and the state of an object is an implementation + concern. + \end{itemize} + + IDL interfaces form a namespace. You can nest the following constructs inside + an interface: constant definitions, attribute definitions, and operation definitions. + + \newpage + Example: + \begin{verbatim} + module world + { + interface IFace + { + /** Constant definitions */ + + /** Attibute definitions */ + + /** Operation definitions */ + }; + }; // end of module world + \end{verbatim} + + It is important to note that IDL operations and attributes define the only + communication path between objects. + The kinds of information traveling along the communication path are the + parameters, return value, and exceptions of an operation. + + %----------------------------------------------------------------------------- ! \subsection{Constant Definitions} %----------------------------------------------------------------------------- + IDL permits the definition of constants, thus, you can define floating--point, + integer, character, string, boolean, and octet constants. + IDL does not allow you to define a constant of type {\tt any} nor a user--defined + complex type. + + \vspace{2mm} + Example: + \begin{verbatim} + module europe + { + interface ConstantsTest + { + const boolean BOOLEAN_CONST = TRUE; + const octet OCTET_CONST = 255; + const short SHORT_CONST = -10; + const unsigned short USHORT_CONST = 7; + const long LONG_CONST = -7777; + const unsigned long ULONG_CONST = 7777; + const char CHAR_CONST = 'c'; + const string STRING_CONST = "1234567890"; + const float FLOAT_CONST = 3.14; + const double DOUBLE_CONST = 3.1415926; + }; + }; // end of module europe + \end{verbatim} + + %----------------------------------------------------------------------------- ! \subsection{Attributes} %----------------------------------------------------------------------------- + An attribute can be used to create something like a public member variable. + In fact, an attribute defines a pair of operations the client can call to + sent and receive a value. + Note that IDL attributes don't define storage or state. + + \vspace{2mm} + Example: + \begin{verbatim} + module america + { + struct Person + { + long id; + string name; + }; + + interface AttributeInterface + { + attribute long longAttr; + attribute double doubleAttr; + attribute string stringAttr; + attribute Person personAttr; + }; + }; // end of module america + \end{verbatim} + + Attributes can be of any type, including user--defined complex types. + + %----------------------------------------------------------------------------- ! \subsection{Operations} %----------------------------------------------------------------------------- + An operation definition can occur only as part of an interface definition, and + must contain: + + \begin{itemize} + \item A return result type + \item An operation name + \item Zero or more parameter declarations + \end{itemize} + + \vspace{2mm} + Example: + \begin{verbatim} + module austria + { + interface SimpleInterface + { + /** + * This is the simplest possible operation, because + * op requires no parameters and does not return a value. + */ + void op(); + }; + }; // end of module austria + \end{verbatim} + + Notice that a parameter must be qualified with one of three + {\bf directional attributes}: + \begin{itemize} + \item {\bf in}\\ + The {\tt in} attribute indicates that the parameter is sent from + the client to the server. + \item {\bf out}\\ + The {\tt out} attribute indicates that the parameter is sent from + the server to the client. + \item {\bf inout}\\ + The {\tt inout} attribute indicates a parameter that is initialized by + the client and sent to the server. + The server can modify the parameter value, so, after the operation + completes, the client--supplied parameter value may have been changed + by the server. + \end{itemize} + + \vspace{2mm} + Example: + \begin{verbatim} + module styria + { + interface AnotherInterface + { + long op(in long p1, inout string p2, out double p3); + }; + }; // end of module styria + \end{verbatim} + + Operation names are scoped by their enclosing interface and must be unique + within that interface, so {\bf overloading of operations is not possible in IDL}. + + + %----------------------------------------------------------------------------- ! \subsection{Exceptions} %----------------------------------------------------------------------------- + IDL uses exceptions as a standard way to indicate error conditions. + Basically, an exception is defined much like an IDL structure, + and can contain an arbitrary amount of error information of + arbitrary type. + + Operations may raise more than one type of exception, and + must indicate all the exceptions they may possible raise. + It is illegal for an operation to throw an exception that is + not listed in the {\tt raises} expression. + + \newpage + Example: + \begin{verbatim} + module world + { + exception SuperError + { + }; + + exception FatalError + { + string message; + }; + + module europe + { + interface IFace + { + long op(in string name) raises (SuperError, FatalError); + }; + }; // end of module europe + }; + \end{verbatim} + + {\bf IDL does not support exception inheritance.} + That means that you cannot arrange error conditions into logical + hierarchies and catch all exceptions in a subtree by catching a + base exception. + + %----------------------------------------------------------------------------- \subsection{Inheritance} %----------------------------------------------------------------------------- + IDL interfaces can inherit from each other. A derived interface can be + treated as if it were a base interface, so in all contexts in which a + base interface is expected, a derived interface can actually be passed + at runtime (some call it polymorphism). ! \vspace{2mm} ! Example: ! \begin{verbatim} ! module america ! { ! interface SuperType1 ! { ! attribute long attr1; ! long op1(in string str); ! }; ! }; // end of module america ! ! module europe ! { ! interface SuperType2 ! { ! attribute long attr2; ! long op2(in string str); ! }; ! ! interface SubType : america::SuperType1, SuperType2 ! { ! attribute long attr3; ! long op3(in string str); ! }; ! }; // end of module europe ! \end{verbatim} ! ! As shown in the example, IDL supports multiple inheritance too. ! ! Note that any form of {\bf operation or attribute overloading is illegal} in IDL. Index: UserTypes.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage/UserTypes.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UserTypes.tex 15 Aug 2006 15:45:07 -0000 1.1 --- UserTypes.tex 24 Jan 2007 15:35:29 -0000 1.2 *************** *** 1,3 **** - % $Id$ %============================================================================= \section{User--Defined IDL Types} --- 1,2 ---- *************** *** 6,9 **** --- 5,10 ---- complex types: enumerations, structures and sequences. You can also use {\tt typedef} to explicitly name a type. + \vspace{5mm} + %----------------------------------------------------------------------------- *************** *** 14,20 **** existing type. Example: \begin{verbatim} ! typedef long TimeStamp; \end{verbatim} --- 15,25 ---- existing type. + \vspace{2mm} Example: \begin{verbatim} ! module world ! { ! typedef long TimeStamp; ! }; // end of module world \end{verbatim} *************** *** 31,42 **** An IDL enumerated type definition looks much like the C++ version. Example: \begin{verbatim} ! enum Color { ! red, ! green, ! blue ! }; \end{verbatim} --- 36,51 ---- An IDL enumerated type definition looks much like the C++ version. + \vspace{2mm} Example: \begin{verbatim} ! module world { ! enum Color ! { ! red, ! green, ! blue ! }; ! }; // end of module world \end{verbatim} *************** *** 49,62 **** %----------------------------------------------------------------------------- IDL supports structures containing one or more named members of arbitrary type, ! includeing user--defined complex types. Example: \begin{verbatim} ! struct TimeOfDay { ! short hh; ! short mm; ! short ss; ! }; \end{verbatim} --- 58,75 ---- %----------------------------------------------------------------------------- IDL supports structures containing one or more named members of arbitrary type, ! including user--defined complex types. + \vspace{4mm} Example: \begin{verbatim} ! module world { ! struct TimeOfDay ! { ! short hh; ! short mm; ! short ss; ! }; ! }; // end of module world \end{verbatim} *************** *** 70,76 **** Sequences are variable--length vectors that can contain any element type. Example: \begin{verbatim} ! typedef sequence<Color> Colors; \end{verbatim} --- 83,93 ---- Sequences are variable--length vectors that can contain any element type. + \vspace{2mm} Example: \begin{verbatim} ! module world ! { ! typedef sequence<Color> Colors; ! }; // end of module world \end{verbatim} *************** *** 78,80 **** platform. ! \newpage --- 95,98 ---- platform. ! \vspace{5mm} ! Index: Introduction.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage/Introduction.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Introduction.tex 15 Aug 2006 15:45:06 -0000 1.1 --- Introduction.tex 24 Jan 2007 15:35:29 -0000 1.2 *************** *** 1,14 **** - % $Id$ %============================================================================= \section{Introduction} %============================================================================= ! In the CCM Tools framework, a subset of CORBA's Interface Definition Language ! (IDL) is used to define components, interfaces and parameters. ! \dots ! Independent of the used implementation language (e.g. C++, Java, etc.) - \dots \newpage --- 1,23 ---- %============================================================================= \section{Introduction} %============================================================================= ! In the CCM Tools framework, a subset of OMG's Interface Definition Language ! (IDL3) is used to define components, interfaces and parameters, as shown in ! Fig.~\ref{figure:IDLSubSet}. ! \begin{figure}[htbp] ! \begin{center} ! \includegraphics [width=10cm,angle=0] {figures/IDLSubSet} ! \caption{ CCM Tools support a subset of OMG's Interface Definition Language.} ! \label{figure:IDLSubSet} ! \end{center} ! \end{figure} ! Using an explicit IDL, we can define the structure of component--based ! software systems completely independent of any particular programming ! language (e.g. C++ or Java). ! Also, a clear separation between system design and implementation is ! guaranteed. \newpage --- Components.tex DELETED --- Index: Modules.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage/Modules.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Modules.tex 15 Aug 2006 15:45:08 -0000 1.1 --- Modules.tex 24 Jan 2007 15:35:29 -0000 1.2 *************** *** 1,3 **** - % $Id$ %============================================================================= \section{Modules} --- 1,2 ---- *************** *** 6,18 **** Modules combine related definitions into a logical group and prevent pollution of the global namespace. - Identifiers in a module need be unique only within that module. ! Modules do not hide their contents, so you can use a type defined in one module ! inside another module. - Modules can contain any definition that can appear at global scope. In addition, modules can contain other modules, so you can create nested hierarchies. Modules can be reopened. Incremental definition of modules is useful if specifications are written by a --- 5,38 ---- Modules combine related definitions into a logical group and prevent pollution of the global namespace. Identifiers in a module need be unique only within that module. ! The IDL parser searches for the definition of an identifier from the ! innermost scope outward toward the outermost scope. ! ! \vspace{2mm} ! Example: ! \begin{verbatim} ! module world ! { ! /** Some IDL definitions */ ! }; ! \end{verbatim} In addition, modules can contain other modules, so you can create nested hierarchies. + \newpage + Example: + \begin{verbatim} + module world + { + /** Some IDL definitions */ + + module europe + { + /** Other IDL definitions */ + }; + }; + \end{verbatim} + Modules can be reopened. Incremental definition of modules is useful if specifications are written by a *************** *** 20,23 **** module, you can break the module into a number of separate source files). - \newpage \ No newline at end of file --- 40,60 ---- module, you can break the module into a number of separate source files). + \vspace{2mm} + Example: + \begin{verbatim} + module world + { + /** Some IDL definitions */ + }; + + // ... + + module world + { + /** Other IDL definitions */ + }; + \end{verbatim} + + The CCM Tools don't support global scope IDL definitions, thus, every IDL artefact + must be placed within at least one module. Index: SourceFiles.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage/SourceFiles.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SourceFiles.tex 15 Aug 2006 15:45:08 -0000 1.1 --- SourceFiles.tex 24 Jan 2007 15:35:29 -0000 1.2 *************** *** 1,3 **** - % $Id$ %============================================================================= \section{Source Files} --- 1,2 ---- *************** *** 10,14 **** %----------------------------------------------------------------------------- The names of source files containing IDL definitions must end in {\bf \tt .idl} ! (for example, we can define a file named {\tt Components.idl}). %----------------------------------------------------------------------------- --- 9,13 ---- %----------------------------------------------------------------------------- The names of source files containing IDL definitions must end in {\bf \tt .idl} ! (for example, we can define a file named {\tt ccmtools.idl}). %----------------------------------------------------------------------------- *************** *** 48,52 **** IDL constructs (modules, interfaces, type definitions) can appear in any order you prefer. ! However, identifiers must be declared befor they can be use. --- 47,51 ---- IDL constructs (modules, interfaces, type definitions) can appear in any order you prefer. ! However, identifiers must be declared before they can be use. *************** *** 81,84 **** --- 80,84 ---- can't have a leading underscore. + \vspace{2mm} Identifiers are case--insensitive but must be capitalized consistently. This rule exists to permit mappings of IDL to languages that ignore case in *************** *** 86,92 **** capitalized identifiers as distinct (e.g. C++, Java). IDL permits you to create identifiers that happen to be keywords in one or more implementation languages, but to make life easier, you should try to avoid IDL identifiers that are likely to be implementation language keywords. - \newpage --- 86,92 ---- capitalized identifiers as distinct (e.g. C++, Java). + \vspace{2mm} IDL permits you to create identifiers that happen to be keywords in one or more implementation languages, but to make life easier, you should try to avoid IDL identifiers that are likely to be implementation language keywords. Index: InterfaceDefinitionLanguage.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/InterfaceDefinitionLanguage/InterfaceDefinitionLanguage.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InterfaceDefinitionLanguage.tex 15 Aug 2006 15:45:07 -0000 1.1 --- InterfaceDefinitionLanguage.tex 24 Jan 2007 15:35:29 -0000 1.2 *************** *** 1,3 **** - % $Id$ %============================================================================= \chapter{Interface Definition Language} --- 1,2 ---- *************** *** 7,14 **** \input{InterfaceDefinitionLanguage/Introduction} \input{InterfaceDefinitionLanguage/SourceFiles} \input{InterfaceDefinitionLanguage/BasicTypes} \input{InterfaceDefinitionLanguage/UserTypes} - \input{InterfaceDefinitionLanguage/Modules} \input{InterfaceDefinitionLanguage/Interfaces} ! \input{InterfaceDefinitionLanguage/Components} --- 6,14 ---- \input{InterfaceDefinitionLanguage/Introduction} \input{InterfaceDefinitionLanguage/SourceFiles} + + \input{InterfaceDefinitionLanguage/Modules} \input{InterfaceDefinitionLanguage/BasicTypes} \input{InterfaceDefinitionLanguage/UserTypes} \input{InterfaceDefinitionLanguage/Interfaces} ! |
|
From: Teiniker E. <tei...@us...> - 2007-01-24 14:15:47
|
Update of /cvsroot/ccmtools/ccmtools/test/CppRemoteGenerator/attribute_types In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10512/test/CppRemoteGenerator/attribute_types Modified Files: Makefile Log Message: Refactored test cases Index: Makefile =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppRemoteGenerator/attribute_types/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile 20 Dec 2006 18:29:49 -0000 1.14 --- Makefile 24 Jan 2007 14:15:38 -0000 1.15 *************** *** 27,31 **** check: cp impl/Test_impl.cc ${DEST_DIR}/src/component/Test/ ! cp impl/_check_ccm_remote_Test.cc ${DEST_DIR}/src/component/Test/test/ ccmconfix -confix2 -o ${DEST_DIR}/src -pname "remote_attribute_types" -pversion "1.0.0" confix2.py --packageroot=`pwd`/xxx/src --bootstrap --configure --make --targets=check --- 27,31 ---- check: cp impl/Test_impl.cc ${DEST_DIR}/src/component/Test/ ! cp impl/_check_ccmtools_remote_Test.cc ${DEST_DIR}/src/component/Test/test/ ccmconfix -confix2 -o ${DEST_DIR}/src -pname "remote_attribute_types" -pversion "1.0.0" confix2.py --packageroot=`pwd`/xxx/src --bootstrap --configure --make --targets=check |
|
From: Teiniker E. <tei...@us...> - 2007-01-24 14:15:46
|
Update of /cvsroot/ccmtools/ccmtools/test/CppRemoteGenerator/attribute_module_types In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10512/test/CppRemoteGenerator/attribute_module_types Modified Files: Makefile Log Message: Refactored test cases Index: Makefile =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppRemoteGenerator/attribute_module_types/Makefile,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Makefile 20 Dec 2006 18:29:51 -0000 1.15 --- Makefile 24 Jan 2007 14:15:39 -0000 1.16 *************** *** 27,31 **** check: cp impl/Test_impl.cc ${DEST_DIR}/src/component/Test/ ! cp impl/_check_world_europe_austria_ccm_remote_Test.cc ${DEST_DIR}/src/component/Test/test/ ccmconfix -confix2 -o ${DEST_DIR}/src -pname "remote_attribute_module_types" -pversion "1.0.0" confix2.py --packageroot=`pwd`/xxx/src --bootstrap --configure --make --targets=check --- 27,31 ---- check: cp impl/Test_impl.cc ${DEST_DIR}/src/component/Test/ ! cp impl/_check_ccmtools_remote_world_europe_austria_Test.cc ${DEST_DIR}/src/component/Test/test/ ccmconfix -confix2 -o ${DEST_DIR}/src -pname "remote_attribute_module_types" -pversion "1.0.0" confix2.py --packageroot=`pwd`/xxx/src --bootstrap --configure --make --targets=check |
|
From: Teiniker E. <tei...@us...> - 2007-01-24 14:15:44
|
Update of /cvsroot/ccmtools/ccmtools/test/CppRemoteGenerator/attribute_types/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10512/test/CppRemoteGenerator/attribute_types/impl Added Files: _check_ccmtools_remote_Test.cc Removed Files: _check_ccm_remote_Test.cc Log Message: Refactored test cases --- _check_ccm_remote_Test.cc DELETED --- --- NEW FILE: _check_ccmtools_remote_Test.cc --- /*** * CCM Tools Test Client * * This file was automatically generated by CCM Tools * <http://ccmtools.sourceforge.net/> * * This test client is part of the remote component test concept. ***/ #ifdef HAVE_CONFIG_H # include <config.h> #endif #ifdef HAVE_MICO #include <cmath> #include <cstdlib> #include <iostream> #include <string> #include <ccmtools/remote/CCMContainer.h> #include <CORBA.h> #include <coss/CosNaming.h> #include <ccmtools/remote/TestHome_remote.h> #include <ccmtools_corba_Test.h> using namespace std; //============================================================================== // Implementation of remote client test //============================================================================== int main (int argc, char *argv[]) { cout << "Enter C++ remote test client" << endl; // Initialize ORB int argc_ = 3; char* argv_[] = { "", "-ORBInitRef", "NameService=corbaloc:iiop:1.2@localhost:5050/NameService" }; CORBA::ORB_var orb = CORBA::ORB_init(argc_, argv_); /** * Server-side code */ // Register all value type factories with the ORB ::ccmtools::remote::register_all_factories(orb); // Deploy local and remote component homes int error = 0; error += deploy_TestHome("TestHome"); error += deploy_ccmtools_remote_TestHome(orb, "TestHome"); if(!error) { cout << "TestHome server is running..." << endl; } else { cerr << "ERROR: Can't deploy components!" << endl; return -1; } // For testing we use CORBA collocation // orb->run(); /** * Client-side code */ CORBA::Object_var obj = orb->resolve_initial_references("NameService"); CosNaming::NamingContextExt_var nc = CosNaming::NamingContextExt::_narrow(obj); // Deployment // Find ComponentHomes in the Naming-Service obj = nc->resolve_str("TestHome"); ::ccmtools::corba::TestHome_var myTestHome = ::ccmtools::corba::TestHome::_narrow(obj); // Create component instances ::ccmtools::corba::Test_var myTest = myTestHome->create(); // Provide facets ::ccmtools::corba::BasicTypeInterface_var inBasicType = myTest->provide_inBasicType(); ::ccmtools::corba::UserTypeInterface_var inUserType = myTest->provide_inUserType(); // Connect receptacles myTest->connect_outBasicType(inBasicType); myTest->connect_outUserType(inUserType); myTest->configuration_complete(); cout << "==== Begin Test Case ===================================" << endl; // --------------------------------------------------------------------- // Component Attribute Test Cases // --------------------------------------------------------------------- { cout << "Component Attributes (Basic Types) Test..."; CORBA::Short short_value = -7; myTest->short_value(short_value); CORBA::Short short_result = myTest->short_value(); assert(short_value == short_result); CORBA::Long long_value = -7777; myTest->long_value(long_value); CORBA::Long long_result = myTest->long_value(); assert(long_result == long_value); CORBA::UShort ushort_value = 7; myTest->ushort_value(ushort_value); CORBA::UShort ushort_result = myTest->ushort_value(); assert(ushort_result == ushort_value); CORBA::ULong ulong_value = 7777; myTest->ulong_value(ulong_value); CORBA::ULong ulong_result = myTest->ulong_value(); assert(ulong_result == ulong_value); CORBA::Float float_value = -77.77; myTest->float_value(float_value); CORBA::Float float_result = myTest->float_value(); assert(abs(float_result - float_value) < 0.001); CORBA::Double double_value = -77.7777; myTest->double_value(double_value); CORBA::Double double_result = myTest->double_value(); assert(abs(double_result - double_value) < 0.000001); CORBA::Char char_value = 'x'; myTest->char_value(char_value); CORBA::Char char_result = myTest->char_value(); assert(char_result == char_value); char* string_value = "0123456789"; myTest->string_value(string_value); char* string_result = myTest->string_value(); assert(strcmp(string_value, string_result)==0); CORBA::Boolean boolean_value = true; myTest->boolean_value(boolean_value); CORBA::Boolean boolean_result = myTest->boolean_value(); assert(boolean_result == boolean_value); CORBA::Octet octet_value = 0xff; myTest->octet_value(octet_value); CORBA::Octet octet_result = myTest->octet_value(); assert(octet_result == octet_value); cout << "OK!" << endl; } { cout << "Component Attributes (User Types) Test..."; { // enum Color {red, green, blue, black, orange} ::ccmtools::corba::Color value = ::ccmtools::corba::blue; ::ccmtools::corba::Color result; myTest->color_value(value); result = myTest->color_value(); assert(result == value); } { // struct Person { long id; string name; } ::ccmtools::corba::Person value; ::ccmtools::corba::Person_var result; value.name = CORBA::string_dup("Egon"); value.id = 3; myTest->person_value(value); result = myTest->person_value(); assert(strcmp(result->name,value.name) == 0); assert(result->id == value.id); } { // struct Address { string street; long number; Person resident; } ::ccmtools::corba::Address value; ::ccmtools::corba::Address_var result; ::ccmtools::corba::Person person; value.street = CORBA::string_dup("Waltendorf"); value.number = 7; person.name = CORBA::string_dup("Egon"); person.id = 3; value.resident = person; myTest->address_value(value); result = myTest->address_value(); assert(strcmp(result->street, value.street) == 0); assert(result->number == value.number); assert(strcmp(result->resident.name, value.resident.name) == 0); assert(result->resident.id == value.resident.id); } { // typedef sequence<long> LongList const int MAX_SIZE = 100; ::ccmtools::corba::LongList_var value = new ::ccmtools::corba::LongList; ::ccmtools::corba::LongList_var result; value->length(MAX_SIZE); for(int i=0;i<MAX_SIZE;i++) { (*value)[i] = i; } myTest->longList_value(value); result = myTest->longList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert((*result)[i] == (*value)[i]); } } { // typedef sequence<string> StringList const int MAX_SIZE = 100; ::ccmtools::corba::StringList_var value = new ::ccmtools::corba::StringList; ::ccmtools::corba::StringList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i] = "Egon"; } myTest->stringList_value(value); result = myTest->stringList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i],(*value)[i]) == 0); } } { // typedef sequence<Person> PersonList const int MAX_SIZE = 100; ::ccmtools::corba::PersonList_var value = new ::ccmtools::corba::PersonList; ::ccmtools::corba::PersonList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i].name = "Andrea"; (*value)[i].id = i; } myTest->personList_value(value); result = myTest->personList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i].name,(*value)[i].name) == 0); assert((*result)[i].id == (*value)[i].id); } } { // typedef long time_t; ::ccmtools::corba::time_t value = -7777; ::ccmtools::corba::time_t result; myTest->long_value(value); result = myTest->long_value(); assert(result == value); } cout << "OK!" << endl; } // --------------------------------------------------------------------- // Facet Attribute Test Cases // --------------------------------------------------------------------- { cout << "Facet Attributes (Basic Types) Test..."; CORBA::Short short_value = -7; inBasicType->short_value(short_value); CORBA::Short short_result = inBasicType->short_value(); assert(short_value == short_result); CORBA::Long long_value = -7777; inBasicType->long_value(long_value); CORBA::Long long_result = inBasicType->long_value(); assert(long_result == long_value); CORBA::UShort ushort_value = 7; inBasicType->ushort_value(ushort_value); CORBA::UShort ushort_result = inBasicType->ushort_value(); assert(ushort_result == ushort_value); CORBA::ULong ulong_value = 7777; inBasicType->ulong_value(ulong_value); CORBA::ULong ulong_result = inBasicType->ulong_value(); assert(ulong_result == ulong_value); CORBA::Float float_value = -77.77; inBasicType->float_value(float_value); CORBA::Float float_result = inBasicType->float_value(); assert(abs(float_result - float_value) < 0.001); CORBA::Double double_value = -77.7777; inBasicType->double_value(double_value); CORBA::Double double_result = inBasicType->double_value(); assert(abs(double_result - double_value) < 0.000001); CORBA::Char char_value = 'x'; inBasicType->char_value(char_value); CORBA::Char char_result = inBasicType->char_value(); assert(char_result == char_value); char* string_value = "0123456789"; inBasicType->string_value(string_value); char* string_result = inBasicType->string_value(); assert(strcmp(string_value, string_result)==0); CORBA::Boolean boolean_value = true; inBasicType->boolean_value(boolean_value); CORBA::Boolean boolean_result = inBasicType->boolean_value(); assert(boolean_result == boolean_value); CORBA::Octet octet_value = 0xff; inBasicType->octet_value(octet_value); CORBA::Octet octet_result = inBasicType->octet_value(); assert(octet_result == octet_value); cout << "OK!" << endl; } { cout << "Facet Attributes (User Types) Test..."; { // enum Color {red, green, blue, black, orange} ::ccmtools::corba::Color value = ::ccmtools::corba::blue; ::ccmtools::corba::Color result; inUserType->color_value(value); result = inUserType->color_value(); assert(result == value); } { // struct Person { long id; string name; } ::ccmtools::corba::Person value; ::ccmtools::corba::Person_var result; value.name = CORBA::string_dup("Egon"); value.id = 3; inUserType->person_value(value); result = inUserType->person_value(); assert(strcmp(result->name,value.name) == 0); assert(result->id == value.id); } { // struct Address { string street; long number; Person resident; } ::ccmtools::corba::Address value; ::ccmtools::corba::Address_var result; ::ccmtools::corba::Person person; value.street = CORBA::string_dup("Waltendorf"); value.number = 7; person.name = CORBA::string_dup("Egon"); person.id = 3; value.resident = person; inUserType->address_value(value); result = inUserType->address_value(); assert(strcmp(result->street, value.street) == 0); assert(result->number == value.number); assert(strcmp(result->resident.name, value.resident.name) == 0); assert(result->resident.id == value.resident.id); } { // typedef sequence<long> LongList const int MAX_SIZE = 100; ::ccmtools::corba::LongList_var value = new ::ccmtools::corba::LongList; ::ccmtools::corba::LongList_var result; value->length(MAX_SIZE); for(int i=0;i<MAX_SIZE;i++) { (*value)[i] = i; } inUserType->longList_value(value); result = inUserType->longList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert((*result)[i] == (*value)[i]); } } { // typedef sequence<string> StringList const int MAX_SIZE = 100; ::ccmtools::corba::StringList_var value = new ::ccmtools::corba::StringList; ::ccmtools::corba::StringList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i] = "Egon"; } inUserType->stringList_value(value); result = inUserType->stringList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i],(*value)[i]) == 0); } } { // typedef sequence<Person> PersonList const int MAX_SIZE = 100; ::ccmtools::corba::PersonList_var value = new ::ccmtools::corba::PersonList; ::ccmtools::corba::PersonList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i].name = "Andrea"; (*value)[i].id = i; } inUserType->personList_value(value); result = inUserType->personList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i].name,(*value)[i].name) == 0); assert((*result)[i].id == (*value)[i].id); } } { // typedef long time_t; ::ccmtools::corba::time_t value = -7777; ::ccmtools::corba::time_t result; inUserType->time_t_value(value); result = inUserType->time_t_value(); assert(result == value); } cout << "OK!" << endl; } cout << "==== End Test Case =====================================" << endl; // Un-Deployment myTest->disconnect_outBasicType(); myTest->disconnect_outUserType(); // Destroy component instances myTest->remove(); error = undeploy_TestHome("TestHome"); error += undeploy_ccmtools_remote_TestHome(orb, "TestHome"); if(!error) { cout << "Exit C++ remote test client" << endl; } else { cerr << "ERROR: Can't undeploy components!" << endl; return -1; } } #endif // HAVE_MICO |
|
From: Teiniker E. <tei...@us...> - 2007-01-24 14:15:43
|
Update of /cvsroot/ccmtools/ccmtools/test/CppRemoteGenerator/attribute_module_types/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10512/test/CppRemoteGenerator/attribute_module_types/impl Added Files: _check_ccmtools_remote_world_europe_austria_Test.cc Removed Files: _check_world_europe_austria_ccm_remote_Test.cc Log Message: Refactored test cases --- NEW FILE: _check_ccmtools_remote_world_europe_austria_Test.cc --- /*** * CCM Tools Test Client * * This file was automatically generated by CCM Tools * <http://ccmtools.sourceforge.net/> * * This test client is part of the remote component test concept. ***/ #ifdef HAVE_CONFIG_H # include <config.h> #endif #ifdef HAVE_MICO #include <cmath> #include <cstdlib> #include <iostream> #include <string> #include <ccmtools/remote/CCMContainer.h> #include <CORBA.h> #include <coss/CosNaming.h> #include <ccmtools/remote/world/europe/austria/TestHome_remote.h> #include <ccmtools_corba_world_europe_austria_Test.h> using namespace std; //============================================================================== // Implementation of remote client test //============================================================================== int main (int argc, char *argv[]) { cout << "Enter C++ remote test client" << endl; // Initialize ORB int argc_ = 3; char* argv_[] = { "", "-ORBInitRef", "NameService=corbaloc:iiop:1.2@localhost:5050/NameService" }; CORBA::ORB_var orb = CORBA::ORB_init(argc_, argv_); /** * Server-side code */ // Register all value type factories with the ORB ::ccmtools::remote::register_all_factories (orb); // Deploy local and remote component homes int error = 0; error += deploy_world_europe_austria_TestHome("TestHome"); error += deploy_ccmtools_remote_world_europe_austria_TestHome(orb, "TestHome"); if(!error) { cout << "TestHome server is running..." << endl; } else { cerr << "ERROR: Can't deploy components!" << endl; return -1; } // For testing we use CORBA collocation // orb->run(); /** * Client-side code */ CORBA::Object_var obj = orb->resolve_initial_references("NameService"); CosNaming::NamingContextExt_var nc = CosNaming::NamingContextExt::_narrow(obj); // Deployment // Find ComponentHomes in the Naming-Service obj = nc->resolve_str("TestHome"); ::ccmtools::corba::world::europe::austria::TestHome_var myTestHome = ::ccmtools::corba::world::europe::austria::TestHome::_narrow (obj); // Create component instances ::ccmtools::corba::world::europe::austria::Test_var myTest = myTestHome->create(); // Provide facets ::ccmtools::corba::world::europe::austria::BasicTypeInterface_var inBasicType = myTest->provide_inBasicType(); ::ccmtools::corba::world::europe::austria::UserTypeInterface_var inUserType = myTest->provide_inUserType(); // Connect receptacles myTest->connect_outBasicType(inBasicType); myTest->connect_outUserType(inUserType); myTest->configuration_complete(); cout << "==== Begin Test Case ===================================" << endl; // --------------------------------------------------------------------- // Component Attribute Test Cases // --------------------------------------------------------------------- { cout << "Component Attributes (Basic Types) Test..."; CORBA::Short short_value = -7; myTest->short_value(short_value); CORBA::Short short_result = myTest->short_value(); assert(short_value == short_result); CORBA::Long long_value = -7777; myTest->long_value(long_value); CORBA::Long long_result = myTest->long_value(); assert(long_result == long_value); CORBA::UShort ushort_value = 7; myTest->ushort_value(ushort_value); CORBA::UShort ushort_result = myTest->ushort_value(); assert(ushort_result == ushort_value); CORBA::ULong ulong_value = 7777; myTest->ulong_value(ulong_value); CORBA::ULong ulong_result = myTest->ulong_value(); assert(ulong_result == ulong_value); CORBA::Float float_value = -77.77; myTest->float_value(float_value); CORBA::Float float_result = myTest->float_value(); assert(float_result == float_value); CORBA::Double double_value = -77.7777; myTest->double_value(double_value); CORBA::Double double_result = myTest->double_value(); assert(double_result == double_value); CORBA::Char char_value = 'x'; myTest->char_value(char_value); CORBA::Char char_result = myTest->char_value(); assert(char_result == char_value); char* string_value = "0123456789"; myTest->string_value(string_value); char* string_result = myTest->string_value(); assert(strcmp(string_value, string_result)==0); CORBA::Boolean boolean_value = true; myTest->boolean_value(boolean_value); CORBA::Boolean boolean_result = myTest->boolean_value(); assert(boolean_result == boolean_value); CORBA::Octet octet_value = 0xff; myTest->octet_value(octet_value); CORBA::Octet octet_result = myTest->octet_value(); assert(octet_result == octet_value); cout << "OK!" << endl; } { cout << "Component Attributes (User Types) Test..."; { // enum Color {red, green, blue, black, orange} ::ccmtools::corba::world::europe::austria::Color value = ::ccmtools::corba::world::europe::austria::blue; ::ccmtools::corba::world::europe::austria::Color result; myTest->color_value(value); result = myTest->color_value(); assert(result == value); } { // struct Person { long id; string name; } ::ccmtools::corba::world::europe::austria::Person value; ::ccmtools::corba::world::europe::austria::Person_var result; value.name = CORBA::string_dup("Egon"); value.id = 3; myTest->person_value(value); result = myTest->person_value(); assert(strcmp(result->name,value.name) == 0); assert(result->id == value.id); } { // struct Address { string street; long number; Person resident; } ::ccmtools::corba::world::europe::austria::Address value; ::ccmtools::corba::world::europe::austria::Address_var result; ::ccmtools::corba::world::europe::austria::Person person; value.street = CORBA::string_dup("Waltendorf"); value.number = 7; person.name = CORBA::string_dup("Egon"); person.id = 3; value.resident = person; myTest->address_value(value); result = myTest->address_value(); assert(strcmp(result->street, value.street) == 0); assert(result->number == value.number); assert(strcmp(result->resident.name, value.resident.name) == 0); assert(result->resident.id == value.resident.id); } { // typedef sequence<long> LongList const int MAX_SIZE = 100; ::ccmtools::corba::world::europe::austria::LongList_var value = new ::ccmtools::corba::world::europe::austria::LongList; ::ccmtools::corba::world::europe::austria::LongList_var result; value->length(MAX_SIZE); for(int i=0;i<MAX_SIZE;i++) { (*value)[i] = i; } myTest->longList_value(value); result = myTest->longList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert((*result)[i] == (*value)[i]); } } { // typedef sequence<string> StringList const int MAX_SIZE = 100; ::ccmtools::corba::world::europe::austria::StringList_var value = new ::ccmtools::corba::world::europe::austria::StringList; ::ccmtools::corba::world::europe::austria::StringList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i] = "Egon"; } myTest->stringList_value(value); result = myTest->stringList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i],(*value)[i]) == 0); } } { // typedef sequence<Person> PersonList const int MAX_SIZE = 100; ::ccmtools::corba::world::europe::austria::PersonList_var value = new ::ccmtools::corba::world::europe::austria::PersonList; ::ccmtools::corba::world::europe::austria::PersonList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i].name = "Andrea"; (*value)[i].id = i; } myTest->personList_value(value); result = myTest->personList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i].name,(*value)[i].name) == 0); assert((*result)[i].id == (*value)[i].id); } } { // typedef long time_t; ::ccmtools::corba::world::europe::austria::time_t value = -7777; ::ccmtools::corba::world::europe::austria::time_t result; myTest->long_value(value); result = myTest->long_value(); assert(result == value); } cout << "OK!" << endl; } // --------------------------------------------------------------------- // Facet Attribute Test Cases // --------------------------------------------------------------------- { cout << "Facet Attributes (Basic Types) Test..."; CORBA::Short short_value = -7; inBasicType->short_value(short_value); CORBA::Short short_result = inBasicType->short_value(); assert(short_value == short_result); CORBA::Long long_value = -7777; inBasicType->long_value(long_value); CORBA::Long long_result = inBasicType->long_value(); assert(long_result == long_value); CORBA::UShort ushort_value = 7; inBasicType->ushort_value(ushort_value); CORBA::UShort ushort_result = inBasicType->ushort_value(); assert(ushort_result == ushort_value); CORBA::ULong ulong_value = 7777; inBasicType->ulong_value(ulong_value); CORBA::ULong ulong_result = inBasicType->ulong_value(); assert(ulong_result == ulong_value); CORBA::Float float_value = -77.77; inBasicType->float_value(float_value); CORBA::Float float_result = inBasicType->float_value(); assert(float_result == float_value); CORBA::Double double_value = -77.7777; inBasicType->double_value(double_value); CORBA::Double double_result = inBasicType->double_value(); assert(double_result == double_value); CORBA::Char char_value = 'x'; inBasicType->char_value(char_value); CORBA::Char char_result = inBasicType->char_value(); assert(char_result == char_value); char* string_value = "0123456789"; inBasicType->string_value(string_value); char* string_result = inBasicType->string_value(); assert(strcmp(string_value, string_result)==0); CORBA::Boolean boolean_value = true; inBasicType->boolean_value(boolean_value); CORBA::Boolean boolean_result = inBasicType->boolean_value(); assert(boolean_result == boolean_value); CORBA::Octet octet_value = 0xff; inBasicType->octet_value(octet_value); CORBA::Octet octet_result = inBasicType->octet_value(); assert(octet_result == octet_value); cout << "OK!" << endl; } { cout << "Facet Attributes (User Types) Test..."; { // enum Color {red, green, blue, black, orange} ::ccmtools::corba::world::europe::austria::Color value = ::ccmtools::corba::world::europe::austria::blue; ::ccmtools::corba::world::europe::austria::Color result; inUserType->color_value(value); result = inUserType->color_value(); assert(result == value); } { // struct Person { long id; string name; } ::ccmtools::corba::world::europe::austria::Person value; ::ccmtools::corba::world::europe::austria::Person_var result; value.name = CORBA::string_dup("Egon"); value.id = 3; inUserType->person_value(value); result = inUserType->person_value(); assert(strcmp(result->name,value.name) == 0); assert(result->id == value.id); } { // struct Address { string street; long number; Person resident; } ::ccmtools::corba::world::europe::austria::Address value; ::ccmtools::corba::world::europe::austria::Address_var result; ::ccmtools::corba::world::europe::austria::Person person; value.street = CORBA::string_dup("Waltendorf"); value.number = 7; person.name = CORBA::string_dup("Egon"); person.id = 3; value.resident = person; inUserType->address_value(value); result = inUserType->address_value(); assert(strcmp(result->street, value.street) == 0); assert(result->number == value.number); assert(strcmp(result->resident.name, value.resident.name) == 0); assert(result->resident.id == value.resident.id); } { // typedef sequence<long> LongList const int MAX_SIZE = 100; ::ccmtools::corba::world::europe::austria::LongList_var value = new ::ccmtools::corba::world::europe::austria::LongList; ::ccmtools::corba::world::europe::austria::LongList_var result; value->length(MAX_SIZE); for(int i=0;i<MAX_SIZE;i++) { (*value)[i] = i; } inUserType->longList_value(value); result = inUserType->longList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert((*result)[i] == (*value)[i]); } } { // typedef sequence<string> StringList const int MAX_SIZE = 100; ::ccmtools::corba::world::europe::austria::StringList_var value = new ::ccmtools::corba::world::europe::austria::StringList; ::ccmtools::corba::world::europe::austria::StringList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i] = "Egon"; } inUserType->stringList_value(value); result = inUserType->stringList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i],(*value)[i]) == 0); } } { // typedef sequence<Person> PersonList const int MAX_SIZE = 100; ::ccmtools::corba::world::europe::austria::PersonList_var value = new ::ccmtools::corba::world::europe::austria::PersonList; ::ccmtools::corba::world::europe::austria::PersonList_var result; value->length(MAX_SIZE); for(int i=0; i < MAX_SIZE; i++) { (*value)[i].name = "Andrea"; (*value)[i].id = i; } inUserType->personList_value(value); result = inUserType->personList_value(); assert((int)result->length() == MAX_SIZE); for(int i=0; i < (int)result->length(); i++) { assert(strcmp((*result)[i].name,(*value)[i].name) == 0); assert((*result)[i].id == (*value)[i].id); } } { // typedef long time_t; ::ccmtools::corba::world::europe::austria::time_t value = -7777; ::ccmtools::corba::world::europe::austria::time_t result; inUserType->time_t_value(value); result = inUserType->time_t_value(); assert(result == value); } cout << "OK!" << endl; } cout << "==== End Test Case =====================================" << endl; // Un-Deployment myTest->disconnect_outBasicType(); myTest->disconnect_outUserType(); // Destroy component instances myTest->remove(); // Un-Deployment error = undeploy_world_europe_austria_TestHome("TestHome"); error += undeploy_ccmtools_remote_world_europe_austria_TestHome(orb, "TestHome"); if(!error) { cout << "Exit C++ remote test client" << endl; } else { cerr << "ERROR: Can't undeploy components!" << endl; return -1; } } #endif // HAVE_MICO --- _check_world_europe_austria_ccm_remote_Test.cc DELETED --- |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 10:55:14
|
Update of /cvsroot/ccmtools/cpp-environment/ccm/remote/RemoteComponents In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27321/ccm/remote/RemoteComponents Modified Files: Makefile.mico Added Files: ccmtools.h ccmtools.cc Log Message: Added Interix specific code --- NEW FILE: ccmtools.h --- /* * MICO --- an Open Source CORBA implementation * Copyright (c) 1997-2006 by The Mico Team * * This file was automatically generated. DO NOT EDIT! */ #include <CORBA.h> #include <mico/throw.h> #ifndef __CCMTOOLS_H__ #define __CCMTOOLS_H__ namespace ccmtools [...1110 lines suppressed...] extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_InvalidConfiguration; extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_RemoveFailure; extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_CCMHome; extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_CCMObject; extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_CreateFailure; extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_KeylessCCMHome; extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_HomeNotFound; extern CORBA::StaticTypeInfo *_marshaller_ccmtools_corba_Components_HomeFinder; extern CORBA::StaticTypeInfo *_marshaller__seq_ccmtools_corba_Components_CCMHome; #endif --- NEW FILE: ccmtools.cc --- /* * MICO --- an Open Source CORBA implementation * Copyright (c) 1997-2006 by The Mico Team * * This file was automatically generated. DO NOT EDIT! */ #include <ccmtools.h> using namespace std; //-------------------------------------------------------- // Implementation of stubs //-------------------------------------------------------- #ifdef HAVE_EXPLICIT_STRUCT_OPS ccmtools::corba::Components::InvalidName::InvalidName() [...3685 lines suppressed...] return true; } #endif return false; } void POA_ccmtools::corba::Components::HomeFinder::invoke (CORBA::StaticServerRequest_ptr __req) { if (dispatch (__req)) { return; } CORBA::Exception * ex = new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO); __req->set_exception (ex); __req->write_results(); } Index: Makefile.mico =================================================================== RCS file: /cvsroot/ccmtools/cpp-environment/ccm/remote/RemoteComponents/Makefile.mico,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.mico 5 Jan 2007 14:09:32 -0000 1.3 --- Makefile.mico 23 Jan 2007 10:55:09 -0000 1.4 *************** *** 1,2 **** all: ! idl ${CCMTOOLS_HOME}/idl/ccmtools/corba/Components/ccmtools.idl \ No newline at end of file --- 1,7 ---- all: ! if test "`uname`" = "Interix"; then \ ! idl `unixpath2win ${CCMTOOLS_HOME}/idl/ccmtools/corba/Components/ccmtools.idl`; \ ! else \ ! idl ${CCMTOOLS_HOME}/idl/ccmtools/corba/Components/ccmtools.idl; \ ! fi ! \ No newline at end of file |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 10:55:14
|
Update of /cvsroot/ccmtools/cpp-environment/ccm/local/LocalComponents In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27321/ccm/local/LocalComponents Modified Files: Confix2.dir Log Message: Added Interix specific code Index: Confix2.dir =================================================================== RCS file: /cvsroot/ccmtools/cpp-environment/ccm/local/LocalComponents/Confix2.dir,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Confix2.dir 13 Oct 2006 12:25:18 -0000 1.1 --- Confix2.dir 23 Jan 2007 10:55:10 -0000 1.2 *************** *** 0 **** --- 1,2 ---- + CURRENT_BUILDER().makefile_am().add_am_cflags('-D_BUILDING_CCM_RUNTIME_=1') + CURRENT_BUILDER().makefile_am().add_am_cxxflags('-D_BUILDING_CCM_RUNTIME_=1') |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 10:55:14
|
Update of /cvsroot/ccmtools/cpp-environment/ccm/remote/SessionContainer In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27321/ccm/remote/SessionContainer Modified Files: Confix2.dir Log Message: Added Interix specific code Index: Confix2.dir =================================================================== RCS file: /cvsroot/ccmtools/cpp-environment/ccm/remote/SessionContainer/Confix2.dir,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Confix2.dir 13 Oct 2006 12:25:18 -0000 1.1 --- Confix2.dir 23 Jan 2007 10:55:10 -0000 1.2 *************** *** 0 **** --- 1,2 ---- + CURRENT_BUILDER().makefile_am().add_am_cflags('-D_BUILDING_CCM_RUNTIME_=1') + CURRENT_BUILDER().makefile_am().add_am_cxxflags('-D_BUILDING_CCM_RUNTIME_=1') |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 10:53:52
|
Update of /cvsroot/ccmtools/ccmtools/etc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26853/etc Modified Files: ccmtools.properties Log Message: Added support for C++ struct (init and default) constructors. Index: ccmtools.properties =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/etc/ccmtools.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ccmtools.properties 3 Jan 2007 13:31:25 -0000 1.9 --- ccmtools.properties 23 Jan 2007 10:53:48 -0000 1.10 *************** *** 10,13 **** --- 10,14 ---- # Set IDL preprocessor ccmtools.cpp = cpp + #ccmtools.cpp = cl.exe /nologo /E # Set the directory name for a component's business logic (*_impl.* files). |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 10:53:40
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26842/src/ccmtools/CppGenerator Modified Files: CppLocalGenerator.java Log Message: Added support for C++ struct (init and default) constructors. Index: CppLocalGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppLocalGenerator.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** CppLocalGenerator.java 23 Jan 2007 09:59:13 -0000 1.52 --- CppLocalGenerator.java 23 Jan 2007 10:53:35 -0000 1.53 *************** *** 1184,1187 **** --- 1184,1192 ---- return getLocalCxxName(iface,Text.SCOPE_SEPARATOR) + "::SmartPtr()"; } + else if(type instanceof MEnumDef) + { + MEnumDef enumeration = (MEnumDef)type; + return enumeration.getMember(0); // Set enum to the first value. + } else if(type instanceof MAliasDef) { |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 10:53:22
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26816/test/CppGenerator/struct_constructor Modified Files: Makefile Test.idl Log Message: Added support for C++ struct (init and default) constructors. Index: Makefile =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 22 Jan 2007 17:34:29 -0000 1.1 --- Makefile 23 Jan 2007 10:53:18 -0000 1.2 *************** *** 11,15 **** local: idl3 ! ccmtools c++local ${IDL_INCLUDE} -o ${DEST_DIR}/src/interface ${DEST_DIR}/idl/interface/*.idl mkdir ${DEST_DIR}/src/test --- 11,15 ---- local: idl3 ! ccmtools c++local ${IDL_INCLUDE} -o ${DEST_DIR}/src/interface ${DEST_DIR}/idl/interface/world/*.idl mkdir ${DEST_DIR}/src/test Index: Test.idl =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/Test.idl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Test.idl 22 Jan 2007 17:34:30 -0000 1.1 --- Test.idl 23 Jan 2007 10:53:18 -0000 1.2 *************** *** 1,37 **** ! typedef long TimeStamp; ! enum Color {red, green, blue, black, orange}; ! typedef sequence<string> StringSeq; ! interface EmptyInterface {}; - struct BasicTypesStructure - { - short shortMember; - long longMember; - unsigned short ushortMember; - unsigned long uLongMember; - float floatMember; - double doubleMember; - char charMember; - string stringMember; - boolean booleanMember; - octet octetMember; - wchar wcharMember; - wstring wstringMember; - }; ! struct UserTypesStructure ! { ! any anyMember; ! TimeStamp typedefMember; ! Color enumMember; ! BasicTypesStructure structMember; ! StringSeq sequenceMember; ! EmptyInterface interfaceMember; ! }; --- 1,43 ---- + /** + * This test case simulates the usage of structs with simple and complex + * members. + */ + module world { ! typedef long TimeStamp; ! enum Color {red, green, blue, black, orange}; ! typedef sequence<string> StringSeq; ! interface EmptyInterface {}; + struct BasicTypesStructure + { + short shortMember; + long longMember; + unsigned short ushortMember; + unsigned long uLongMember; + float floatMember; + double doubleMember; + char charMember; + string stringMember; + boolean booleanMember; + octet octetMember; + wchar wcharMember; + wstring wstringMember; + }; + struct UserTypesStructure + { + any anyMember; + TimeStamp typedefMember; + Color enumMember; + BasicTypesStructure structMember; + StringSeq sequenceMember; + EmptyInterface interfaceMember; + }; ! }; // end of module world \ No newline at end of file |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 10:53:22
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26816/test/CppGenerator/struct_constructor/impl Modified Files: _check_struct_init.cc Log Message: Added support for C++ struct (init and default) constructors. Index: _check_struct_init.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/impl/_check_struct_init.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _check_struct_init.cc 23 Jan 2007 09:57:24 -0000 1.2 --- _check_struct_init.cc 23 Jan 2007 10:53:18 -0000 1.3 *************** *** 7,12 **** #include <wamas/platform/utils/StringValue.h> ! #include <BasicTypesStructure.h> ! #include <UserTypesStructure.h> using namespace std; --- 7,12 ---- #include <wamas/platform/utils/StringValue.h> ! #include <world/BasicTypesStructure.h> ! #include <world/UserTypesStructure.h> using namespace std; *************** *** 14,17 **** --- 14,19 ---- using wamas::platform::utils::Value; using wamas::platform::utils::StringValue; + using namespace world; + int main(int argc, char** argv) *************** *** 61,65 **** assert(s.anyMember.ptr() == NULL); assert(s.typedefMember == 0L); ! // assert(s.enumMember == ???); assert(s.structMember.charMember == ' '); assert(s.structMember.stringMember == ""); --- 63,67 ---- assert(s.anyMember.ptr() == NULL); assert(s.typedefMember == 0L); ! assert(s.enumMember == red); // set enum to the first value assert(s.structMember.charMember == ' '); assert(s.structMember.stringMember == ""); |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 09:59:46
|
Update of /cvsroot/ccmtools/ccmtools/doc/manual/LoginExample In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6461/doc/manual/LoginExample Modified Files: LocalCxxComponents.tex Log Message: Added support for C++ struct (init and default) constructors. Index: LocalCxxComponents.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/LoginExample/LocalCxxComponents.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LocalCxxComponents.tex 18 Jan 2007 09:31:54 -0000 1.5 --- LocalCxxComponents.tex 23 Jan 2007 09:59:41 -0000 1.6 *************** *** 276,284 **** try { ! PersonData person; ! person.id = 277; ! person.name = "eteinik"; ! person.password = "eteinik"; ! person.group = USER; bool result = login->isValidUser(person); --- 276,280 ---- try { ! PersonData person(277, "eteinik", "eteinik", USER); bool result = login->isValidUser(person); *************** *** 307,315 **** try { ! PersonData person; ! person.id = 0; ! person.name = ""; ! person.password = ""; ! person.group = USER; login->isValidUser(person); --- 303,307 ---- try { ! PersonData person(0, "", "", USER); login->isValidUser(person); |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 09:59:16
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6433/src/ccmtools/CppGenerator Modified Files: CppLocalGenerator.java Log Message: Added support for C++ struct (init and default) constructors. Index: CppLocalGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppLocalGenerator.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** CppLocalGenerator.java 22 Jan 2007 17:34:30 -0000 1.51 --- CppLocalGenerator.java 23 Jan 2007 09:59:13 -0000 1.52 *************** *** 1261,1269 **** else if(primitive.getKind() == MPrimitiveKind.PK_ULONG) { ! return "0U"; } else if(primitive.getKind() == MPrimitiveKind.PK_ULONGLONG) { ! return "0U"; } else if(primitive.getKind() == MPrimitiveKind.PK_USHORT) --- 1261,1269 ---- else if(primitive.getKind() == MPrimitiveKind.PK_ULONG) { ! return "0UL"; } else if(primitive.getKind() == MPrimitiveKind.PK_ULONGLONG) { ! return "0UL"; } else if(primitive.getKind() == MPrimitiveKind.PK_USHORT) |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 09:57:28
|
Update of /cvsroot/ccmtools/ccmtools/test/manual/Login/c++/server/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5955/test/manual/Login/c++/server/impl Modified Files: _check_application_Server.cc ServerMirror_impl.cc Log Message: Added support for C++ struct (init and default) constructors. Index: _check_application_Server.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/manual/Login/c++/server/impl/_check_application_Server.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _check_application_Server.cc 18 Jan 2007 10:12:57 -0000 1.1 --- _check_application_Server.cc 23 Jan 2007 09:57:23 -0000 1.2 *************** *** 55,96 **** try { ! PersonData person; ! person.id = 0; ! person.name = ""; ! person.password = ""; ! person.group = USER; ! ! login->isValidUser(person); ! assert(false); } catch(InvalidPersonData& e) { ! cout << "Caught InvalidPersonData exception!" << endl; } try { ! PersonData person; ! person.id = 277; ! person.name = "eteinik"; ! person.password = "eteinik"; ! person.group = USER; ! ! bool result = login->isValidUser(person); ! if(result) ! { ! cout << "Welcome " << person.name << endl; ! } ! else ! { ! cout << "We don't know you !!!" << endl; ! } } catch(InvalidPersonData& e) { ! cout << "Error: InvalidPersonData!!" << endl; ! } ! ! server->remove(); } --- 55,84 ---- try { ! PersonData person(0, "", "", USER); ! login->isValidUser(person); ! assert(false); } catch(InvalidPersonData& e) { ! cout << "Caught InvalidPersonData exception!" << endl; } try { ! PersonData person(277, "eteinik", "eteinik", USER); ! bool result = login->isValidUser(person); ! if(result) ! { ! cout << "Welcome " << person.name << endl; ! } ! else ! { ! cout << "We don't know you !!!" << endl; ! } } catch(InvalidPersonData& e) { ! cout << "Error: InvalidPersonData!!" << endl; ! } server->remove(); } Index: ServerMirror_impl.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/manual/Login/c++/server/impl/ServerMirror_impl.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ServerMirror_impl.cc 18 Jan 2007 10:12:57 -0000 1.1 --- ServerMirror_impl.cc 23 Jan 2007 09:57:24 -0000 1.2 *************** *** 52,60 **** try { ! PersonData person; ! person.id = 277; ! person.name = "eteinik"; ! person.password = "eteinik"; ! person.group = USER; bool result = login->isValidUser(person); --- 52,56 ---- try { ! PersonData person(277, "eteinik", "eteinik", USER); bool result = login->isValidUser(person); *************** *** 75,84 **** try { ! PersonData person; ! person.id = 0; ! person.name = ""; ! person.password = ""; ! person.group = USER; ! login->isValidUser(person); assert(false); --- 71,75 ---- try { ! PersonData person(0, "", "", USER); login->isValidUser(person); assert(false); *************** *** 91,95 **** catch(Components::Exception& e) { ! cerr << "ERROR: " << e.what() << endl; } } --- 82,86 ---- catch(Components::Exception& e) { ! cerr << "ERROR: " << e.what() << endl; } } |
|
From: Teiniker E. <tei...@us...> - 2007-01-23 09:57:27
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5955/test/CppGenerator/struct_constructor/impl Modified Files: _check_struct_init.cc Log Message: Added support for C++ struct (init and default) constructors. Index: _check_struct_init.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/impl/_check_struct_init.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _check_struct_init.cc 22 Jan 2007 17:34:30 -0000 1.1 --- _check_struct_init.cc 23 Jan 2007 09:57:24 -0000 1.2 *************** *** 1,3 **** ! #include <cassert> #include <iostream> --- 1,3 ---- ! #include <cmath> #include <cassert> #include <iostream> *************** *** 5,8 **** --- 5,9 ---- #include <wamas/platform/utils/smartptr.h> #include <wamas/platform/utils/Value.h> + #include <wamas/platform/utils/StringValue.h> #include <BasicTypesStructure.h> *************** *** 12,16 **** using wamas::platform::utils::SmartPtr; using wamas::platform::utils::Value; ! int main(int argc, char** argv) --- 13,17 ---- using wamas::platform::utils::SmartPtr; using wamas::platform::utils::Value; ! using wamas::platform::utils::StringValue; int main(int argc, char** argv) *************** *** 23,28 **** assert(s.ushortMember == 0U); assert(s.uLongMember == 0U); ! assert(s.floatMember == 0.0F); ! assert(s.doubleMember == 0.0); assert(s.charMember == ' '); assert(s.stringMember == ""); --- 24,29 ---- assert(s.ushortMember == 0U); assert(s.uLongMember == 0U); ! assert(abs(s.floatMember) < 0.001F); ! assert(abs(s.doubleMember) < 0.0001); assert(s.charMember == ' '); assert(s.stringMember == ""); *************** *** 37,41 **** { cout << "check BasicTypesStructure init constructor..."; ! // TODO cout << "OK!" << endl; } --- 38,54 ---- { cout << "check BasicTypesStructure init constructor..."; ! BasicTypesStructure s(-1, -2L, 3U, 4UL, 3.14F, 3.1415, 'e', "CCMTools", true, 0x7f, L'X', L"sf.net"); ! assert(s.shortMember == -1); ! assert(s.longMember == -2L); ! assert(s.ushortMember == 3U); ! assert(s.uLongMember == 4UL); ! assert(abs(s.floatMember - 3.14F) < 0.001F); ! assert(abs(s.doubleMember - 3.1415) < 0.0001); ! assert(s.charMember == 'e'); ! assert(s.stringMember == "CCMTools"); ! assert(s.booleanMember == true); ! assert(s.octetMember == 0x7f); ! assert(s.wcharMember == L'X'); ! assert(s.wstringMember == L"sf.net"); cout << "OK!" << endl; } *************** *** 46,62 **** UserTypesStructure s; ! assert(s.anyMember.ptr() == NULL); ! assert(s.typedefMember == 0L); ! ! // TODO: Enum ??? ! assert(s.structMember.charMember == ' '); assert(s.structMember.stringMember == ""); - assert(s.sequenceMember.empty() == true); - assert(s.interfaceMember == EmptyInterface::SmartPtr()); - cout << "OK!" << endl; } --- 59,69 ---- UserTypesStructure s; ! assert(s.anyMember.ptr() == NULL); assert(s.typedefMember == 0L); ! // assert(s.enumMember == ???); assert(s.structMember.charMember == ' '); assert(s.structMember.stringMember == ""); assert(s.sequenceMember.empty() == true); assert(s.interfaceMember == EmptyInterface::SmartPtr()); cout << "OK!" << endl; } *************** *** 65,69 **** { cout << "check UserTypesStructure init constructor..."; ! // TODO cout << "OK!" << endl; } --- 72,100 ---- { cout << "check UserTypesStructure init constructor..."; ! Value* vp = new StringValue("Jimmy"); ! SmartPtr<Value> any(vp); ! TimeStamp ts = 1234L; ! Color c = green; ! BasicTypesStructure b; ! b.stringMember = "HALLO"; ! StringSeq seq; ! seq.push_back("This"); ! seq.push_back("is"); ! seq.push_back("a"); ! seq.push_back("test!"); ! EmptyInterface* ip = new EmptyInterface(); ! SmartPtr<EmptyInterface> iface(ip); ! ! UserTypesStructure s(any, ts, c, b, seq, iface); ! ! assert(s.anyMember.ptr() == vp); ! assert(s.typedefMember == 1234L); ! assert(s.enumMember == green); ! assert(s.structMember.stringMember == "HALLO"); ! assert(s.sequenceMember.at(0) == "This"); ! assert(s.sequenceMember.at(1) == "is"); ! assert(s.sequenceMember.at(2) == "a"); ! assert(s.sequenceMember.at(3) == "test!"); ! assert(s.interfaceMember.ptr() == ip); cout << "OK!" << endl; } |
|
From: Teiniker E. <tei...@us...> - 2007-01-22 17:34:36
|
Update of /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv686/src/templates/CppLocalTemplates Modified Files: MStructDef Log Message: Added support for C++ struct (init and default) constructors. Index: MStructDef =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MStructDef,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MStructDef 4 Dec 2006 15:48:31 -0000 1.8 --- MStructDef 22 Jan 2007 17:34:30 -0000 1.9 *************** *** 18,21 **** --- 18,25 ---- struct %(Identifier)s { + %(StructDefaultConstructor)s + + %(StructInitConstructor)s + %(MFieldDef)s }; |
|
From: Teiniker E. <tei...@us...> - 2007-01-22 17:34:36
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv686/test/CppGenerator/struct_constructor/impl Added Files: _check_struct_init.cc Log Message: Added support for C++ struct (init and default) constructors. --- NEW FILE: _check_struct_init.cc --- #include <cassert> #include <iostream> #include <wamas/platform/utils/smartptr.h> #include <wamas/platform/utils/Value.h> #include <BasicTypesStructure.h> #include <UserTypesStructure.h> using namespace std; using wamas::platform::utils::SmartPtr; using wamas::platform::utils::Value; int main(int argc, char** argv) { { cout << "check BasicTypesStructure default constructor..."; BasicTypesStructure s; assert(s.shortMember == 0); assert(s.longMember == 0L); assert(s.ushortMember == 0U); assert(s.uLongMember == 0U); assert(s.floatMember == 0.0F); assert(s.doubleMember == 0.0); assert(s.charMember == ' '); assert(s.stringMember == ""); assert(s.booleanMember == false); assert(s.octetMember == 0x0); assert(s.wcharMember == L' '); assert(s.wstringMember ==L""); cout << "OK!" << endl; } { cout << "check BasicTypesStructure init constructor..."; // TODO cout << "OK!" << endl; } { cout << "check UserTypesStructure default constructor..."; UserTypesStructure s; assert(s.anyMember.ptr() == NULL); assert(s.typedefMember == 0L); // TODO: Enum ??? assert(s.structMember.charMember == ' '); assert(s.structMember.stringMember == ""); assert(s.sequenceMember.empty() == true); assert(s.interfaceMember == EmptyInterface::SmartPtr()); cout << "OK!" << endl; } { cout << "check UserTypesStructure init constructor..."; // TODO cout << "OK!" << endl; } } |
|
From: Teiniker E. <tei...@us...> - 2007-01-22 17:34:34
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv686/src/ccmtools/CppGenerator Modified Files: CppLocalGenerator.java Log Message: Added support for C++ struct (init and default) constructors. Index: CppLocalGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppLocalGenerator.java,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** CppLocalGenerator.java 19 Jan 2007 12:07:16 -0000 1.50 --- CppLocalGenerator.java 22 Jan 2007 17:34:30 -0000 1.51 *************** *** 3,7 **** * Leif Johnson <le...@am...> * Egon Teiniker <ego...@sa...> ! * Copyright (C) 2002 - 2005 Salomon Automation * * This library is free software; you can redistribute it and/or modify it under --- 3,7 ---- * Leif Johnson <le...@am...> * Egon Teiniker <ego...@sa...> ! * Copyright (C) 2002 - 2007 ccmtools.sf.net * * This library is free software; you can redistribute it and/or modify it under *************** *** 175,178 **** --- 175,181 ---- return data_MAttributeDef(variable, value); } + else if (currentNode instanceof MStructDef) { + return data_MStructDef(variable, value); + } else if (currentNode instanceof MFieldDef) { return data_MFieldDef(variable, value); *************** *** 185,188 **** --- 188,207 ---- } + protected String data_MStructDef(String dataType, String dataValue) + { + logger.fine("begin"); + MStructDef struct = (MStructDef)currentNode; + if(dataType.equals("StructDefaultConstructor")) + { + return generateStructDefaultConstructor(struct); + } + else if(dataType.equals("StructInitConstructor")) + { + return generateStructInitConstructor(struct); + } + logger.fine("end"); + return dataValue; + } + protected String data_MFieldDef(String dataType, String dataValue) *************** *** 217,221 **** MTyped singleType = (MTyped) idlType; MIDLType singleIdlType = singleType.getIdlType(); ! dataValue = getLanguageTypeInclude(singleIdlType); } else --- 236,240 ---- MTyped singleType = (MTyped) idlType; MIDLType singleIdlType = singleType.getIdlType(); ! dataValue = "#include <vector>\n" + getLanguageTypeInclude(singleIdlType); } else *************** *** 382,385 **** --- 401,414 ---- } + protected String data_MConstantDef(String dataType, String dataValue) + { + MConstantDef constant = (MConstantDef) currentNode; + + return dataValue; + } + + + + protected List<MAttributeDef> getAttributeList(MInterfaceDef iface) *************** *** 543,554 **** } - protected String data_MConstantDef(String dataType, String dataValue) - { - MConstantDef constant = (MConstantDef) currentNode; - - return dataValue; - } - - protected String generateConstantImpl(MInterfaceDef iface, MConstantDef constant) { --- 572,575 ---- *************** *** 1083,1088 **** --- 1104,1284 ---- //==================================================================== + + //==================================================================== + // MStructDef %(tag)s helper methods + //==================================================================== + protected String generateStructDefaultConstructor(MStructDef struct) + { + StringBuilder out = new StringBuilder(); + out.append(Text.TAB).append(struct.getIdentifier()).append("()").append(Text.NL); + out.append(Text.TAB).append(" :").append(generateStructConstructorDefaultValueList(struct)).append(Text.NL); + out.append(Text.TAB).append("{").append(Text.NL); + out.append(Text.TAB).append("}").append(Text.NL); + return out.toString(); + } + + protected String generateStructInitConstructor(MStructDef struct) + { + StringBuilder out = new StringBuilder(); + out.append(Text.TAB).append(struct.getIdentifier()).append("("); + out.append(generateStructConstructorParameterList(struct)).append(")").append(Text.NL); + out.append(Text.TAB).append(" :").append(generateStructConstructorInitList(struct)).append(Text.NL); + out.append(Text.TAB).append("{").append(Text.NL); + out.append(Text.TAB).append("}").append(Text.NL); + return out.toString(); + } + + protected String generateStructConstructorParameterList(MStructDef struct) + { + StringBuilder out = new StringBuilder(); + for(Iterator i = struct.getMembers().iterator(); i.hasNext();) + { + MFieldDef field = (MFieldDef)i.next(); + out.append(Text.NL).append(Text.tab(2)); + out.append(getLanguageType(field)).append(" "); + out.append(field.getIdentifier()).append("_").append(","); + } + String s = out.toString(); + return s.substring(0,s.length()-1); + } + + + protected String generateStructConstructorInitList(MStructDef struct) + { + StringBuilder out = new StringBuilder(); + for(Iterator i = struct.getMembers().iterator(); i.hasNext();) + { + MFieldDef field = (MFieldDef)i.next(); + out.append(Text.NL).append(Text.tab(2)); + out.append(field.getIdentifier()).append("("); + out.append(field.getIdentifier()).append("_").append("),"); + } + String s = out.toString(); + return s.substring(0, s.length()-1); + } + + protected String generateStructConstructorDefaultValueList(MStructDef struct) + { + StringBuilder out = new StringBuilder(); + for(Iterator i = struct.getMembers().iterator(); i.hasNext();) + { + MFieldDef field = (MFieldDef)i.next(); + String defaultValue = generateDefaultValue(field.getIdlType()); + if(defaultValue != null) + { + out.append(Text.NL).append(Text.tab(2)); + out.append(field.getIdentifier()).append("(").append(defaultValue).append(")").append(","); + } + } + String s = out.toString(); + return s.substring(0, s.length()-1); + } + + protected String generateDefaultValue(MIDLType type) + { + if(type instanceof MInterfaceDef) + { + MInterfaceDef iface = (MInterfaceDef)type; + return getLocalCxxName(iface,Text.SCOPE_SEPARATOR) + "::SmartPtr()"; + } + else if(type instanceof MAliasDef) + { + MAliasDef alias = (MAliasDef)type; + MIDLType idlType = ((MTyped)type).getIdlType(); + if(idlType instanceof MSequenceDef) + { + return getLocalCxxName(alias, Text.SCOPE_SEPARATOR) + "()"; + } + else + { + return generateDefaultValue(idlType); + } + } + else if(type instanceof MStringDef) + { + return "\"\""; + } + else if(type instanceof MWstringDef) + { + return "L\"\""; + } + else if(type instanceof MPrimitiveDef) + { + MPrimitiveDef primitive = (MPrimitiveDef)type; + return generateDefaultValue(primitive); + } + return null; + } + + protected String generateDefaultValue(MPrimitiveDef primitive) + { + if(primitive.getKind() == MPrimitiveKind.PK_ANY) + { + return " ::wamas::platform::utils::SmartPtr< ::wamas::platform::utils::Value>()"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_BOOLEAN) + { + return "false"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_CHAR) + { + return "' '"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_DOUBLE) + { + return "0.0"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_FLOAT) + { + return "0.0F"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_LONG) + { + return "0L"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_LONGDOUBLE) + { + return "0.0"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_LONGLONG) + { + return "0L"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_OCTET) + { + return "0x0"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_SHORT) + { + return "0"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_STRING) + { + return "\"\""; + } + else if(primitive.getKind() == MPrimitiveKind.PK_ULONG) + { + return "0U"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_ULONGLONG) + { + return "0U"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_USHORT) + { + return "0U"; + } + else if(primitive.getKind() == MPrimitiveKind.PK_WCHAR) + { + return "L' '"; + } + else + { + return null; + } + } + //==================================================================== |
|
From: Teiniker E. <tei...@us...> - 2007-01-22 17:34:34
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv666/test/CppGenerator/struct_constructor Log Message: Directory /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor added to the repository |
|
From: Teiniker E. <tei...@us...> - 2007-01-22 17:34:34
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv686/test/CppGenerator/struct_constructor Added Files: Makefile Test.idl Log Message: Added support for C++ struct (init and default) constructors. --- NEW FILE: Makefile --- DEST_DIR = xxx IDL_INCLUDE=-I${DEST_DIR}/idl/interface all: local test: local check clean idl3: Test.idl ccmmodel -validator Test.idl ccmidl -idl3 -o ${DEST_DIR}/idl Test.idl local: idl3 ccmtools c++local ${IDL_INCLUDE} -o ${DEST_DIR}/src/interface ${DEST_DIR}/idl/interface/*.idl mkdir ${DEST_DIR}/src/test check: cp impl/_check_struct_init.cc ${DEST_DIR}/src/test ccmconfix -confix2 -o ${DEST_DIR}/src -pname "struct_constructor" -pversion "1.0.0" confix2.py --packageroot=`pwd`/${DEST_DIR}/src --bootstrap --configure --make --targets=check clean: confix2.py --packageroot=`pwd`/${DEST_DIR}/src --make --targets=clean rm -rf ${DEST_DIR} --- NEW FILE: Test.idl --- typedef long TimeStamp; enum Color {red, green, blue, black, orange}; typedef sequence<string> StringSeq; interface EmptyInterface {}; struct BasicTypesStructure { short shortMember; long longMember; unsigned short ushortMember; unsigned long uLongMember; float floatMember; double doubleMember; char charMember; string stringMember; boolean booleanMember; octet octetMember; wchar wcharMember; wstring wstringMember; }; struct UserTypesStructure { any anyMember; TimeStamp typedefMember; Color enumMember; BasicTypesStructure structMember; StringSeq sequenceMember; EmptyInterface interfaceMember; }; |
|
From: Teiniker E. <tei...@us...> - 2007-01-22 17:34:29
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv666/test/CppGenerator/struct_constructor/impl Log Message: Directory /cvsroot/ccmtools/ccmtools/test/CppGenerator/struct_constructor/impl added to the repository |
|
From: Teiniker E. <tei...@us...> - 2007-01-22 13:05:19
|
Update of /cvsroot/ccmtools/ccmtools/test/Cpp/gnu_cpp/idl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25149/test/Cpp/gnu_cpp/idl Added Files: Lcd.idl Message.idl Hello.idl Console.idl Log Message: Added support for windows cl preprocessor. --- NEW FILE: Message.idl --- /** * * * */ struct Message { string header; string body; }; --- NEW FILE: Hello.idl --- /** * include test * * * ccmtools-c++-generate -p Hello *.idl * ccmtools-c++-make -p Hello */ #include "Console.idl" #include "Lcd.idl" component Hello { attribute string prompt; provides Console console; uses Lcd lcd; }; home HelloHome manages Hello { }; --- NEW FILE: Console.idl --- /** * * * */ #include "Message.idl" interface Console { string read_string(in Message m); }; --- NEW FILE: Lcd.idl --- /** * * * */ interface Lcd { long write_text(in string s2); }; |