Developer Application Interface (ARC API) v4.5.8
ARC, Inc. GenIV Application Interface
CArcDisplay.h
1// +------------------------------------------------------------------------------------------------------------------+
2// | FILE: CArcDisplay.h ( GenIV ) |
3// +------------------------------------------------------------------------------------------------------------------+
4// | PURPOSE: This file defines the standard ARC display interface. |
5// | |
6// | |
7// | AUTHOR: Scott Streit DATE: July 16, 2013 |
8// | |
9// | Copyright 2013 Astronomical Research Cameras, Inc. All rights reserved. |
10// +------------------------------------------------------------------------------------------------------------------+
13#pragma once
14
15#include <filesystem>
16#include <string>
17#include <cstdint>
18
19#ifdef _WINDOWS
20 #include <windows.h>
21#endif
22
23#include <CArcDisplayDllMain.h>
24#include <CArcBase.h>
25
26
27
28namespace arc
29{
30 namespace gen4
31 {
32
37 class GEN4_CARCDISPLAY_API CArcDisplay : public CArcBase
38 {
39 public:
40
43 CArcDisplay( void );
44
47 virtual ~CArcDisplay( void );
48
52 static const std::string version( void ) noexcept;
53
59 void launch( std::uint32_t uiMSDelay = 1000 );
60
66 void show( const std::filesystem::path& tFitsFile ) const;
67
73 void clear( const std::int32_t iFrame = -1 ) const;
74
78 void terminate( void ) const;
79
83 void setBoxShape( void ) const;
84
89 void getVersion( void ) const;
90
91 private:
92
96 bool verifyPID( void ) const noexcept;
97
102 void runProcess( const std::string& sBuf ) const;
103
108 void runAndSaveProcess( const std::string& sBuf );
109
111 // * @param pszBuf - Buffer to hold module path. Set to '\0' on failure.
112 // * @param tBufSize - The byte size of the obuf buffer.
113 // * @return <i>true<i/> on success; <i>false</i> othewise.
114 // * @throws std::runtime_error
115 // */
116 //#ifdef _WINDOWS
117
118 // bool getModuleDirectory( TCHAR* pszBuf, size_t tBufSize );
119
120 //#else
121
122 // bool getModuleDirectory( char* pszBuf, size_t tBufSize );
123
124 // // This method is used by GetModuleDirectory to
125 // // determine the path to this DLL.
126 // static void* getModuleStub( void ) { return NULL; }
127
128 //#endif
129
131 static const std::string m_sVersion;
132
133 #ifdef _WINDOWS
134
137 PROCESS_INFORMATION m_processInfo;
138
139 #elif defined( __APPLE__ ) || defined( linux ) || defined( __linux )
140
143 pid_t m_pid;
144
145 #endif
146 };
147
148 } // end gen4 namespace
149} // end arc namespace
void show(const std::filesystem::path &tFitsFile) const
void setBoxShape(void) const
virtual ~CArcDisplay(void)
static const std::string version(void) noexcept
void clear(const std::int32_t iFrame=-1) const
void launch(std::uint32_t uiMSDelay=1000)
void terminate(void) const
void getVersion(void) const
Definition: CArcBase.h:50