capturegraph.procedures.types
#
Procedure Type System#
The type hierarchy for the CaptureGraph procedure system. All procedures declare
a return type that extends PType, enabling strong typing and validation of
data flows between procedures.
Type Hierarchy
PType
├── PVoid # No return value
├── PDirectory # File system directory
├── PFile # File reference
├── PSaveable # Can be saved to a single file
│ ├── PBool # Boolean value
│ ├── PNumber # Numeric value
│ ├── PString # Text value
│ ├── PTime # Timestamp
│ ├── PLocation # GPS coordinates
│ ├── PWeather # Weather conditions
│ ├── PImage # Captured image
│ └── PUserID # User identifier
└── PSaveableBundle # Saved as multiple files
└── PImageSequence # Multiple images
PType
#
PType is the parent of all procedure types. Procedure types are used to denote what you can expect a procedure to return. They are all named with a P prefix to denote that they are procedure types, as otherwise they could be confused with standard types.
You might notice that these classes are all empty. This is because they are only used for type checking in python, as they mark the return type of procedures when they are executed. The actual data is handled by the app executing the procedure.
Source code in capturegraph-lib/capturegraph/procedures/types.py
PVoid
#
Bases: PType
Represents procedures that perform actions but don't return data (like saving files).
They still need to return in order to indicate completion of the action.
PDirectory
#
Bases: PType
Represents a directory in the file system where data can be stored.
Directories can contain files and other directories. They can also be used to save and load bundles of data.
PFile
#
PSaveable
#
PSaveableBundle
#
PBool
#
PNumber
#
PString
#
PUserID
#
PTime
#
PLocation
#
Bases: PSaveable
Represents GPS coordinates and location metadata for geographic data capture.
Includes optional heading (compass direction in degrees 0-360) when captured with device orientation.
PWeather
#
PImage
#
PVideo
#
PImageThumbnail
#
PImageSequence
#
Bases: PSaveableBundle
Represents a sequence of related images captured together (e.g., for bursts).
PImageFlashPair
#
Bases: PSaveableBundle
Represents a pair of images: one captured with flash, one without.
The bundle contains two named files: - flash: Image captured with flash enabled - no_flash: Image captured without flash