Solid

frontend/processor.h
1 /*
2  SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef SOLID_PROCESSOR_H
8 #define SOLID_PROCESSOR_H
9 
10 #include <solid/solid_export.h>
11 
12 #include <solid/deviceinterface.h>
13 
14 namespace Solid
15 {
16 class ProcessorPrivate;
17 class Device;
18 
22 class SOLID_EXPORT Processor : public DeviceInterface
23 {
24  Q_OBJECT
25  Q_PROPERTY(int number READ number)
26  Q_PROPERTY(qulonglong maxSpeed READ maxSpeed)
27  Q_PROPERTY(bool canChangeFrequency READ canChangeFrequency)
28  Q_PROPERTY(InstructionSets instructionSets READ instructionSets)
29  Q_DECLARE_PRIVATE(Processor)
30  friend class Device;
31 
32 private:
41  explicit Processor(QObject *backendObject);
42 
43 public:
51  NoExtensions = 0x0,
52  IntelMmx = 0x1,
53  IntelSse = 0x2,
54  IntelSse2 = 0x4,
55  IntelSse3 = 0x8,
56  IntelSsse3 = 0x80,
57  IntelSse4 = 0x10,
58  IntelSse41 = 0x10,
59  IntelSse42 = 0x100,
60  Amd3DNow = 0x20,
61  AltiVec = 0x40
62  };
63  Q_ENUM(InstructionSet)
64 
65  /*
66  * Stores a combination of #InstructionSet values.
67  */
68  Q_DECLARE_FLAGS(InstructionSets, InstructionSet)
69  Q_FLAG(InstructionSets)
70 
71 
74  virtual ~Processor();
75 
83  {
84  return DeviceInterface::Processor;
85  }
86 
92  int number() const;
93 
100  int maxSpeed() const;
101 
110  bool canChangeFrequency() const;
111 
118  InstructionSets instructionSets() const;
119 };
120 
121 Q_DECLARE_OPERATORS_FOR_FLAGS(Processor::InstructionSets)
122 
123 }
124 
125 #endif
This class allows applications to deal with devices available in the underlying system.
static Type deviceInterfaceType()
Get the Solid::DeviceInterface::Type of the Processor device interface.
Base class of all the device interfaces.
Type
This enum type defines the type of device interface that a Device can have.
This device interface is available on processors.
InstructionSet
This enum contains the list of architecture extensions you can query.
The single responsibility of this class is to create arguments valid for logind Inhibit call...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:50:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.