ROSE 0.11.145.147
SgAsmDOSFileHeader.h
1
2#ifndef ROSE_SgAsmDOSFileHeader_H
3#define ROSE_SgAsmDOSFileHeader_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmGenericHeader.h>
7
8
9
10/* #line 1 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
11
12// WARNING -- GENERATED CODE -- DO NOT MODIFY THIS CODE -- WARNING!
13// This code is automatically generated for each
14// terminal and non-terminal within the defined
15// grammar. There is a simple way to change the
16// code to fix bugs etc. See the ROSE README file
17// for directions.
18
19// tps: (02/22/2010): Adding DLL export requirements
20#include "rosedll.h"
21
22// predeclarations for SgAsmDOSFileHeader
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
25
26/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
27
28/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
29
30#if !defined(DOCUMENTATION)
31// Class Definition for SgAsmDOSFileHeader
32class ROSE_DLL_API SgAsmDOSFileHeader : public SgAsmGenericHeader
33 {
34 public:
35
36
37/* #line 38 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
38
39 virtual SgNode* copy ( SgCopyHelp& help) const override;
40// Start of memberFunctionString
41/* #line 28275 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
42
43
44 //----------------------- Boost serialization for SgAsmDOSFileHeader -----------------------
45#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
46private:
47 friend class boost::serialization::access;
48
49 template<class S>
50 void serialize(S &s, const unsigned /*version*/) {
51 debugSerializationBegin("SgAsmDOSFileHeader");
52 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
53 s & BOOST_SERIALIZATION_NVP(p_e_last_page_size);
54 s & BOOST_SERIALIZATION_NVP(p_e_total_pages);
55 s & BOOST_SERIALIZATION_NVP(p_e_nrelocs);
56 s & BOOST_SERIALIZATION_NVP(p_e_header_paragraphs);
57 s & BOOST_SERIALIZATION_NVP(p_e_minalloc);
58 s & BOOST_SERIALIZATION_NVP(p_e_maxalloc);
59 s & BOOST_SERIALIZATION_NVP(p_e_ss);
60 s & BOOST_SERIALIZATION_NVP(p_e_sp);
61 s & BOOST_SERIALIZATION_NVP(p_e_cksum);
62 s & BOOST_SERIALIZATION_NVP(p_e_ip);
63 s & BOOST_SERIALIZATION_NVP(p_e_cs);
64 s & BOOST_SERIALIZATION_NVP(p_e_overlay);
65 s & BOOST_SERIALIZATION_NVP(p_e_relocs_offset);
66 s & BOOST_SERIALIZATION_NVP(p_e_res1);
67 s & BOOST_SERIALIZATION_NVP(p_relocs);
68 s & BOOST_SERIALIZATION_NVP(p_rm_section);
69 debugSerializationEnd("SgAsmDOSFileHeader");
70 }
71#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
73 // Local types
75public:
76#ifdef _MSC_VER
77# pragma pack (1)
78#endif
80 struct DOSFileHeader_disk {
81 unsigned char e_magic[2];
82 uint16_t e_last_page_size; //
84 uint16_t e_total_pages;
85 uint16_t e_nrelocs;
86 uint16_t e_header_paragraphs;
87 uint16_t e_minalloc;
88 uint16_t e_maxalloc;
89 uint16_t e_ss;
90 uint16_t e_sp;
91 uint16_t e_cksum;
93 uint16_t e_ip;
94 uint16_t e_cs;
95 uint16_t e_relocs_offset;
96 uint16_t e_overlay;
97 uint32_t e_res1;
98 } /* 0x20 */
99#if !defined(SWIG) && !defined(_MSC_VER)
100 __attribute__((packed))
101#endif
102 ;
103
104 struct DOSRelocEntry_disk {
105 uint16_t offset; /* 0x00 */
106 uint16_t segment; /* 0x02 */
107 } /* 0x04 */
108#if !defined(SWIG) && !defined(_MSC_VER)
109 __attribute__((packed))
110#endif
111 ;
112
113#ifdef _MSC_VER
114# pragma pack ()
115#endif
116
118 // Properties
120public:
121public:
127 uint16_t const& get_e_last_page_size() const;
128 void set_e_last_page_size(uint16_t const&);
131public:
137 uint16_t const& get_e_total_pages() const;
138 void set_e_total_pages(uint16_t const&);
141public:
147 uint16_t const& get_e_nrelocs() const;
148 void set_e_nrelocs(uint16_t const&);
151public:
157 uint16_t const& get_e_header_paragraphs() const;
158 void set_e_header_paragraphs(uint16_t const&);
161public:
167 uint16_t const& get_e_minalloc() const;
168 void set_e_minalloc(uint16_t const&);
171public:
177 uint16_t const& get_e_maxalloc() const;
178 void set_e_maxalloc(uint16_t const&);
181public:
187 uint16_t const& get_e_ss() const;
188 void set_e_ss(uint16_t const&);
191public:
197 uint16_t const& get_e_sp() const;
198 void set_e_sp(uint16_t const&);
201public:
207 uint16_t const& get_e_cksum() const;
208 void set_e_cksum(uint16_t const&);
211public:
217 uint16_t const& get_e_ip() const;
218 void set_e_ip(uint16_t const&);
221public:
227 uint16_t const& get_e_cs() const;
228 void set_e_cs(uint16_t const&);
231public:
237 uint16_t const& get_e_overlay() const;
238 void set_e_overlay(uint16_t const&);
241public:
247 rose_addr_t const& get_e_relocs_offset() const;
248 void set_e_relocs_offset(rose_addr_t const&);
251public:
257 unsigned const& get_e_res1() const;
258 void set_e_res1(unsigned const&);
261public:
265 SgAsmGenericSection* const& get_relocs() const;
266 void set_relocs(SgAsmGenericSection* const&);
269public:
273 SgAsmGenericSection* const& get_rm_section() const;
274 void set_rm_section(SgAsmGenericSection* const&);
277 // Functions
279public:
281 virtual SgAsmDOSFileHeader *parse() override {return parse(true);}
282 SgAsmDOSFileHeader *parse(bool define_rm_section);
283 virtual bool reallocate() override;
284 virtual void unparse(std::ostream&) const override;
285 virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
286 virtual const char *formatName() const override;
287
293 SgAsmGenericSection *parseRealModeSection(rose_addr_t max_offset=0);
294
300 void updateFromRealModeSection();
301
303 static bool isDos(SgAsmGenericFile*);
304
305private:
306 void *encode(SgAsmDOSFileHeader::DOSFileHeader_disk*) const;
307
309 // Deprecated 2023-11
311public:
312 virtual const char* format_name() const override ROSE_DEPRECATED("use formatName");
313 SgAsmGenericSection* parse_rm_section(rose_addr_t max_offset = 0) ROSE_DEPRECATED("use parseRealModeSection");
314 void update_from_rm_section() ROSE_DEPRECATED("use updateFromRealModeSection");
315 static bool is_DOS(SgAsmGenericFile*) ROSE_DEPRECATED("use isDos");
316public:
318 virtual ~SgAsmDOSFileHeader();
319
320public:
323
324protected:
331 void initializeProperties();
332
333
334// End of memberFunctionString
335// Start of memberFunctionString
336/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
337
338// *** COMMON CODE SECTION BEGINS HERE ***
339
340 public:
341
342 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
343 // and not required which is required to match the other aspects of the copy mechanism code generation.
344 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
345 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
346 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
347 // virtual SgNode* copy ( const SgCopyHelp & help) const;
348
350 virtual std::string class_name() const override;
351
353 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
354
356 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
357 // static const VariantT static_variant = V_SgAsmDOSFileHeader;
358 enum { static_variant = V_SgAsmDOSFileHeader };
359
360 /* the generated cast function */
362 ROSE_DLL_API friend SgAsmDOSFileHeader* isSgAsmDOSFileHeader( SgNode * s );
363
365 ROSE_DLL_API friend const SgAsmDOSFileHeader* isSgAsmDOSFileHeader( const SgNode * s );
366
367 // ******************************************
368 // * Memory Pool / New / Delete
369 // ******************************************
370
371 public:
373 static const unsigned pool_size; //
375 static std::vector<unsigned char *> pools; //
377 static SgAsmDOSFileHeader * next_node; //
378
380 static unsigned long initializeStorageClassArray(SgAsmDOSFileHeaderStorageClass *); //
381
383 static void clearMemoryPool(); //
384 static void deleteMemoryPool(); //
385
387 static void extendMemoryPoolForFileIO(); //
388
390 static SgAsmDOSFileHeader * getPointerFromGlobalIndex(unsigned long); //
392 static SgAsmDOSFileHeader * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
393
395 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
397 static void resetValidFreepointers(); //
399 static unsigned long getNumberOfLastValidPointer(); //
400
401
402#if defined(INLINE_FUNCTIONS)
404 inline void *operator new (size_t size);
405#else
407 void *operator new (size_t size);
408#endif
410 void operator delete (void* pointer, size_t size);
411
412 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
413 void operator delete (void* pointer)
414 {
415 // This is the generated delete operator...
416 SgAsmDOSFileHeader::operator delete (pointer,sizeof(SgAsmDOSFileHeader));
417 }
418
420 static size_t numberOfNodes();
421
423 static size_t memoryUsage();
424
425 // End of scope which started in IR nodes specific code
426 /* */
427
428 /* name Internal Functions
429 \brief Internal functions ... incomplete-documentation
430
431 These functions have been made public as part of the design, but they are suggested for internal use
432 or by particularly knowledgeable users for specialized tools or applications.
433
434 \internal We could not make these private because they are required by user for special purposes. And
435 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
436
437 */
438
439 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
440 // overridden in every class by *generated* implementation
442 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
443 // MS: 06/28/02 container of names of variables or container indices
444 // used used in the traversal to access AST successor nodes
445 // overridden in every class by *generated* implementation
448 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
449
450 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
451 // than all the vector copies. The implementation for these functions is generated for each class.
453 virtual size_t get_numberOfTraversalSuccessors() override;
455 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
457 virtual size_t get_childIndex(SgNode *child) override;
458
459#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
460 // MS: 08/16/2002 method for generating RTI information
462 virtual RTIReturnType roseRTI() override;
463#endif
464 /* */
465
466
467
468 /* name Deprecated Functions
469 \brief Deprecated functions ... incomplete-documentation
470
471 These functions have been deprecated from use.
472 */
473 /* */
474
476 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
477
478 // JJW (10/16/2008): Changed to a single function in Node.code, and put
479 // getVariant() in #if 0 block to prevent confusing Doxygen
480#if 0
482 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
484 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
485#endif
486 /* */
487
488
489
490
491 public:
492 /* name Traversal Support Functions
493 \brief Traversal support functions ... incomplete-documentation
494
495 These functions have been made public as part of the design, but they are suggested for internal use
496 or by particularly knowledgable users for specialized tools or applications.
497 */
498 /* */
499
500 // DQ (11/26/2005): Support for visitor pattern mechanims
501 // (inferior to ROSE traversal mechanism, experimental).
505
506 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
508 virtual void accept (ROSE_VisitorPattern & visitor) override;
509
510 // DQ (12/26/2005): Support for traversal based on the memory pool
513 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
514
518
519 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
520 // This traversal helps support internal tools that call static member functions.
521 // note: this function operates on the memory pools.
524 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
525 /* */
526
527 public:
528 /* NodeId support functions */
530 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
533 static SgAsmDOSFileHeader* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
536 static std::string getNodeIdString(SgAsmDOSFileHeader* sgnode);
537 static std::string getNodeIdStringInternal(SgAsmDOSFileHeader* sgnode);
538
539 public:
540 /* name Memory Allocation Functions
541 \brief Memory allocations functions ... incomplete-documentation
542
543 These functions have been made public as part of the design, but they are suggested for internal use
544 or by particularly knowledgable users for specialized tools or applications.
545 */
546 /* */
547
558 virtual bool isInMemoryPool() override;
559
570 virtual void checkDataMemberPointersIfInMemoryPool() override;
571
572 // DQ (4/30/2006): Modified to be a const function.
587 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
588
599
611 virtual long getChildIndex( SgNode* childNode ) const override;
612
613 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
614 // comment here (changed to be a C style comment and not be a doxygen comment).
615 /* \brief Constructor for use by AST File I/O Mechanism
616
617 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
618 which obtained via fast binary file I/O from disk.
619 */
620 // SgAsmDOSFileHeader( SgAsmDOSFileHeaderStorageClass& source );
621
622
623
624
625
626 // JH (10/24/2005): methods added to support the ast file IO
627 private:
628
629 /* name AST Memory Allocation Support Functions
630 \brief Memory allocations support....
631
632 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
633 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
634 and support the AST File I/O Mechanism.
635 */
636 /* */
637
638 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
639 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
640 that I use the same type everywhere, if any changes are made. THe second one declares the type
641 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
642 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
643 a correspinding one in the AST_FILE_IO class!
644 */
645 // DQ (9/2/2015): This typedef is no longer used, we can't define the
646 // comment here (changed to be a C style comment and not be a doxygen comment).
647 /* \brief Typedef used for low level memory access.
648 */
649 // typedef unsigned char* TestType;
650
651 // DQ (9/2/2015): This typedef is no longer used, we can't define the
652 // comment here (changed to be a C style comment and not be a doxygen comment).
653 /* \brief Typedef used to hold memory addresses as values.
654 */
655 // typedef unsigned long AddressType;
656
657
658
659 // necessary, to have direct access to the p_freepointer and the private methods !
661 friend class AST_FILE_IO;
662
664 friend class SgAsmDOSFileHeaderStorageClass;
665
667 friend class AstSpecificDataManagingClass;
668
670 friend class AstSpecificDataManagingClassStorageClass;
671 public:
673 SgAsmDOSFileHeader( const SgAsmDOSFileHeaderStorageClass& source );
674
675 // private: // JJW hack
676 /*
677 name AST Memory Allocation Support Variables
678 Memory allocations support variables
679
680 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
681 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
682 and support the AST File I/O Mechanism.
683 */
684 /* */
685
686 public:
687
688 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
689 // to current node (so that it will work cleanly with build functions to specify patterns).
690 // virtual SgNode* addRegExpAttribute();
697
698#ifndef _MSC_VER
699// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
700// and likely never fully implemented nor tested. Files remain in the src tree but are no
701// longer built.
702#define BUILD_ATERM_SUPPORT 0
703 #if BUILD_ATERM_SUPPORT
704 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
705 // DQ (10/4/2014): Adding ATerm support to ROSE.
715 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
716 virtual ATerm generate_ATerm() override;
717
719 virtual void generate_ATerm_Annotation(ATerm & term) override;
720 #endif
721 #endif // BUILD_ATERM_SUPPORT
722#endif
723 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
724 // virtual generate_AST(ATerm & term);
725 // virtual void read_ATerm_Annotation(ATerm & term);
726
727// *** COMMON CODE SECTION ENDS HERE ***
728
729
730// End of memberFunctionString
731// Start of memberFunctionString
732/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
733
734 // the generated cast function
735 // friend ROSE_DLL_API SgAsmDOSFileHeader* isSgAsmDOSFileHeader ( SgNode* s );
736
737 typedef SgAsmGenericHeader base_node_type;
738
739
740// End of memberFunctionString
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758 protected:
759// Start of memberFunctionString
760uint16_t p_e_last_page_size;
761
762// End of memberFunctionString
763// Start of memberFunctionString
764uint16_t p_e_total_pages;
765
766// End of memberFunctionString
767// Start of memberFunctionString
768uint16_t p_e_nrelocs;
769
770// End of memberFunctionString
771// Start of memberFunctionString
772uint16_t p_e_header_paragraphs;
773
774// End of memberFunctionString
775// Start of memberFunctionString
776uint16_t p_e_minalloc;
777
778// End of memberFunctionString
779// Start of memberFunctionString
780uint16_t p_e_maxalloc;
781
782// End of memberFunctionString
783// Start of memberFunctionString
784uint16_t p_e_ss;
785
786// End of memberFunctionString
787// Start of memberFunctionString
788uint16_t p_e_sp;
789
790// End of memberFunctionString
791// Start of memberFunctionString
792uint16_t p_e_cksum;
793
794// End of memberFunctionString
795// Start of memberFunctionString
796uint16_t p_e_ip;
797
798// End of memberFunctionString
799// Start of memberFunctionString
800uint16_t p_e_cs;
801
802// End of memberFunctionString
803// Start of memberFunctionString
804uint16_t p_e_overlay;
805
806// End of memberFunctionString
807// Start of memberFunctionString
808rose_addr_t p_e_relocs_offset;
809
810// End of memberFunctionString
811// Start of memberFunctionString
812unsigned p_e_res1;
813
814// End of memberFunctionString
815// Start of memberFunctionString
816SgAsmGenericSection* p_relocs;
817
818// End of memberFunctionString
819// Start of memberFunctionString
820SgAsmGenericSection* p_rm_section;
821
822// End of memberFunctionString
823
825 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_last_page_size>;
826 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_total_pages>;
827 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_nrelocs>;
828 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_header_paragraphs>;
829 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_minalloc>;
830 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_maxalloc>;
831 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_ss>;
832 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_sp>;
833 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_cksum>;
834 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_ip>;
835 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_cs>;
836 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_overlay>;
837 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, rose_addr_t,&SgAsmDOSFileHeader::p_e_relocs_offset>;
838 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, unsigned,&SgAsmDOSFileHeader::p_e_res1>;
839 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, SgAsmGenericSection*,&SgAsmDOSFileHeader::p_relocs>;
840 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, SgAsmGenericSection*,&SgAsmDOSFileHeader::p_rm_section>;
841
842/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
843
844
845 };
846#endif
847
848// postdeclarations for SgAsmDOSFileHeader
849
850/* #line 851 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
851
852/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
853
854/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
855
856
857/* #line 858 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
858
859#endif // ROSE_SgAsmDOSFileHeader_H
860
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Represents the file header for DOS executables.
Base class for binary files.
Base class for container file headers.
virtual const char * formatName() const
Returns the name of the file format.
virtual void dump(FILE *, const char *prefix, ssize_t idx) const override
Print some debugging info.
virtual bool reallocate() override
Called prior to unparse to make things consistent.
virtual void unparse(std::ostream &) const override
Unparse headers and all they point to.
Contiguous region of a file.
virtual SgAsmGenericSection * parse()
Parse contents of the section.
Supporting class from copy mechanism within ROSE.
Definition sageCopy.h:26
This class represents the base class for all IR nodes within Sage III.
virtual size_t get_numberOfTraversalSuccessors()
return number of children in the traversal successor list
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual std::vector< std::string > get_traversalSuccessorNamesContainer()
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual size_t get_childIndex(SgNode *child)
index-based access to traversal successors by child node
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual std::vector< SgNode * > get_traversalSuccessorContainer()
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
virtual SgNode * get_traversalSuccessorByIndex(size_t idx)
index-based access to traversal successors by index number
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
On-disk format of DOS file header.