Valkka  1.6.1
OpenSource Video Management
Macros
macro.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ban_copy_ctor(CLASS)
 
#define ban_copy_asm(CLASS)
 
#define notice_ban_copy_ctor()
 
#define frame_essentials(CLASSNAME, CLASS)
 
#define frame_clone(CLASSNAME, CLASS)
 
#define get_signal_context(SIGNALFRAME, CONTEXT)   memcpy((void*)&CONTEXT, (void*)((SIGNALFRAME)->signal_ctx_buf.data()), sizeof(CONTEXT));\
 
#define put_signal_context(SIGNALFRAME, CONTEXT, CONTEXT_NUM)
 
#define handle_error(msg)    do { perror(msg); exit(EXIT_FAILURE); } while (0)
 

Detailed Description

Author
Sampsa Riikonen
Date
2017
Version
1.6.1

Macro Definition Documentation

◆ ban_copy_asm

#define ban_copy_asm (   CLASS)
Value:
CLASS &operator= (const CLASS &f) {\
std::cout << "FATAL: copy assignment prohibited for this class" << std::endl;\
perror("FATAL: copy assignment prohibited for this class");\
exit(2);\
};\

◆ ban_copy_ctor

#define ban_copy_ctor (   CLASS)
Value:
CLASS(const CLASS &f) {\
std::cout << "FATAL: copy-construction prohibited for this class" << std::endl;\
perror("FATAL: copy-construction prohibited for this class");\
exit(2);\
};\

◆ frame_clone

#define frame_clone (   CLASSNAME,
  CLASS 
)
Value:
virtual CLASS *getClone() {\
CLASS *tmpframe = new CLASS();\
*tmpframe = *this;\
return tmpframe;\
};\

◆ frame_essentials

#define frame_essentials (   CLASSNAME,
  CLASS 
)
Value:
virtual FrameClass getFrameClass() {\
return CLASSNAME;\
};\
virtual void copyFrom(Frame *f) {\
CLASS *cf;\
cf=dynamic_cast<CLASS*>(f);\
if (!cf) {\
perror("FATAL : invalid cast at copyFrom");\
exit(5);\
}\
*this =*(cf);\
};\
CLASS(const CLASS &f) {\
std::cout << "FATAL: copy-construction prohibited for frame classes" << std::endl;\
perror("FATAL: copy-construction prohibited for frame classes");\
exit(2);\
};\
Frame: An abstract queueable class.
Definition: frame.h:112
FrameClass
Enumeration of Frame classes used by Valkka.
Definition: frame.h:53

◆ notice_ban_copy_ctor

#define notice_ban_copy_ctor ( )
Value:
{\
std::cout << "FATAL: copy-construction prohibited for this class" << std::endl;\
perror("FATAL: copy-construction prohibited for this class");\
exit(2);\
};\

◆ put_signal_context

#define put_signal_context (   SIGNALFRAME,
  CONTEXT,
  CONTEXT_NUM 
)
Value:
(SIGNALFRAME)->signal_ctx_buf.resize(sizeof(CONTEXT));\
memcpy((void*)((SIGNALFRAME)->signal_ctx_buf.data()), (void*)&CONTEXT, sizeof(CONTEXT));\
(SIGNALFRAME)->signaltype=CONTEXT_NUM;\