File: simple.cpp

package info (click to toggle)
xplc 0.3.13-12.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,536 kB
  • sloc: sh: 2,739; cpp: 2,697; ansic: 1,127; makefile: 64; perl: 6
file content (30 lines) | stat: -rw-r--r-- 644 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * This file is example code for XPLC (http://xplc.sourceforge.net/),
 * and is put into the public domain.
 */

#include <stdio.h>
#include <xplc/utils.h>
#include "IExample.h"
#include "simple.h"

class SimpleComponent: public IExample {
  IMPLEMENT_IOBJECT(SimpleComponent);
public:
  virtual void sayHello();
};

UUID_MAP_BEGIN(SimpleComponent)
  UUID_MAP_ENTRY(IObject)
  UUID_MAP_ENTRY(IExample)
  UUID_MAP_END

IObject* getSimpleComponent() {
  return new SimpleComponent;
}

void SimpleComponent::sayHello() {
  printf("hello from SimpleComponent!\n");
}