printer_impl.cc

来自「支持组件模型CCM的开源中间件-mico」· CC 代码 · 共 34 行

CC
34
字号
/* * This file is part of the load-balancing example * * This is the implementation of the printer servant. */#include "Printer_impl.h"Printer_impl::Printer_impl (const char *name){  if (name == NULL)    this->printerName = strdup ("DefaultName");  else    this->printerName = strdup (name);  printf ("++ printer %s is created\n", this->printerName);}void Printer_impl::print (const char *message){  printf ("** printer %s prints [%s]\n", this->printerName, message);}Printer_impl::~Printer_impl (){  printf ("-- printer %s is destroyed\n");  if (this->printerName != NULL)    free (this->printerName);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?