Update of /cvsroot/ccmtools/ccmtools/test/CppAssembly/sample_logger In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13567/test/CppAssembly/sample_logger Added Files: .cvsignore Makefile stderr_logger.assembly console.idl logger.idl io.idl stderr_logger.idl Log Message: small real world sample --- NEW FILE: .cvsignore --- gen --- NEW FILE: stderr_logger.idl --- #include "logger.idl" #include "console.idl" module wamas { module helpers { component StdErrLogger { provides wamas::io::LoggerItf logger; }; home StdErrLoggerHome manages StdErrLogger {}; }; // /module helpers }; // /module wamas --- NEW FILE: io.idl --- #ifndef wamas_io_IDL #define wamas_io_IDL module wamas { module io { interface InputStream { char read(); }; interface OutputStream { void write(in char c); }; }; // /module io }; // /module wamas #endif --- NEW FILE: Makefile --- IDL_INCLUDE=-Igen/idl/interface -Igen/idl/component WAMAS_IDL=gen/idl/component/wamas all: local idl: ccmidl -idl3 -o gen/idl *.idl local: idl ccmtools c++local ${IDL_INCLUDE} -a -o gen/interfaces `find gen/idl/interface -name '*.idl'` ccmtools c++local ${IDL_INCLUDE} -a -o gen/io ${WAMAS_IDL}/io/*.idl ccmtools c++local ${IDL_INCLUDE} -a -o gen/system ${WAMAS_IDL}/system/*.idl ccmtools c++local ${IDL_INCLUDE} -a -o gen/helpers ${WAMAS_IDL}/helpers/*.idl ccmtools c++assembly -o gen/helpers stderr_logger.idl stderr_logger.assembly check: local ccmconfix -confix2 -o gen -pname "assembly-sample_logger" -pversion "0.0.1" cd gen && confix2.py --bootstrap --configure --make clean: cd gen && confix2.py --make --targets=clean rm -rf gen --- NEW FILE: logger.idl --- #ifndef wamas_logger_IDL #define wamas_logger_IDL #include "io.idl" module wamas { module io { interface LoggerItf { void print(in string message); }; component OutputStreamLogger { provides LoggerItf logger; uses OutputStream stream; }; home OutputStreamLoggerHome manages OutputStreamLogger {}; }; // /module io }; // /module wamas #endif --- NEW FILE: console.idl --- #ifndef wamas_console_IDL #define wamas_console_IDL #include "io.idl" module wamas { module system { component Console { provides wamas::io::InputStream stdin; provides wamas::io::OutputStream stdout; provides wamas::io::OutputStream stderr; }; home ConsoleHome manages Console {}; }; // /module system }; // /module wamas #endif --- NEW FILE: stderr_logger.assembly --- module wamas { module helpers { assembly implements StdErrLogger { component wamas::system::Console console; component wamas::io::OutputStreamLogger os_logger; connect console.stderr to os_logger.stream; connect os_logger.logger to this.logger; }; }; // /module helpers }; // /module wamas |