libcamera: signal: Replace object.h inclusion with forward declatation

The signal.h header doesn't need to include object.h. Replace it with a
forward declaration, and instead include object.h in source files that
require it. It can speed up compilation a little bit, but more
importantly avoids unintended dependencies from the Signal class to the
Object class to be added later as the compiler will catch them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
This commit is contained in:
Laurent Pinchart 2024-01-19 19:33:11 +02:00
parent fc4ded714d
commit d5c9b726bd
10 changed files with 11 additions and 1 deletions

View file

@ -13,10 +13,11 @@
#include <vector>
#include <libcamera/base/bound_method.h>
#include <libcamera/base/object.h>
namespace libcamera {
class Object;
class SignalBase
{
public:

View file

@ -7,6 +7,7 @@
#include <libcamera/base/bound_method.h>
#include <libcamera/base/message.h>
#include <libcamera/base/object.h>
#include <libcamera/base/semaphore.h>
#include <libcamera/base/thread.h>

View file

@ -8,6 +8,7 @@
#include <libcamera/base/signal.h>
#include <libcamera/base/mutex.h>
#include <libcamera/base/object.h>
/**
* \file base/signal.h

View file

@ -18,6 +18,7 @@
#include <libcamera/base/log.h>
#include <libcamera/base/message.h>
#include <libcamera/base/mutex.h>
#include <libcamera/base/object.h>
/**
* \page thread Thread Support

View file

@ -11,6 +11,7 @@
#include <unistd.h>
#include <libcamera/base/event_notifier.h>
#include <libcamera/base/object.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/timer.h>

View file

@ -16,6 +16,7 @@
#include <libcamera/base/event_dispatcher.h>
#include <libcamera/base/event_notifier.h>
#include <libcamera/base/object.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/timer.h>

View file

@ -11,6 +11,7 @@
#include <thread>
#include <libcamera/base/message.h>
#include <libcamera/base/object.h>
#include <libcamera/base/thread.h>
#include "test.h"

View file

@ -10,6 +10,7 @@
#include <thread>
#include <libcamera/base/message.h>
#include <libcamera/base/object.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/utils.h>

View file

@ -9,6 +9,7 @@
#include <iostream>
#include <libcamera/base/event_dispatcher.h>
#include <libcamera/base/object.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/timer.h>

View file

@ -18,6 +18,7 @@
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/{{module_name}}_ipa_interface.h>
#include <libcamera/base/object.h>
#include <libcamera/base/thread.h>
#include "libcamera/internal/control_serializer.h"