Purpose:
|
Creates a record of the changes to a single
ENTITY during the current operation on the model.
|
|
Derivation:
|
BULLETIN_BOARD : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"bulletin_board"
|
|
Filename:
|
kern/kernel/kerndata/bulletin/bulletin.hxx
|
|
Description:
|
A
BULLETIN_BOARD contains a list of
BULLETINs, each of which records the changes to a single
ENTITY during the current operation on the model. There are two types of current bulletin-board, mainline and stacked, and completed ones may be successful or failed, depending on the reported success of the completed operation.
|
|
References:
|
KERN
|
BULLETIN, DELTA_STATE, HISTORY_STREAM
|
|
by KERN
|
BULLETIN, DELTA_STATE, outcome
|
|
Data:
|
public BULLETIN *end_b;
|
|
Pointer to last bulletin.
|
|
|
public BULLETIN *start_b;
|
|
Pointer to first bulletin.
|
|
|
public BULLETIN_BOARD *next_ptr;
|
|
Chains bulletin boards from a delta state.
|
|
|
public DELTA_STATE *owner_ptr;
|
|
The delta state from which this is chained.
|
|
|
public bb_status status;
|
|
Status of the bulletin board. Possible values are
|
|
|
bb_open_mainline,
|
|
|
bb_open_stacked,
|
|
|
bb_closed_succeeded,
|
|
|
bb_closed_failed
|
|
|
public int logging_level_when_stacked;
|
|
The number of
api_begin's minus the number of
api_end's made so far. In effect, this is the current API nesting level.
|
|
Constructor:
|
public: BULLETIN_BOARD::BULLETIN_BOARD
(
|
|
|
DELTA_STATE* ds
|
// change state
|
|
|
|
= NULL
|
|
|
);
|
|
|
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. Applications should call this constructor only with the overloaded
new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.
|
|
|
Creates a new bulletin board at start of list given by
bb_ptr in the current
delta_state.
|
|
|
|
|
|
|
public:BULLETIN_BOARD::BULLETIN_BOARD(
|
|
|
logical in_current_ds
|
// delta state
|
|
|
);
|
|
|
C++ constructor.
|
|
|
|
|
Destructor:
|
public: BULLETIN_BOARD::~BULLETIN_BOARD
();
|
|
|
C++ destructor, deleting a
BULLETIN_BOARD (usually at head of list of bulletin-boards in the
delta_state) and deletes its bulletin entries.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::reset_history_on_delete
();
|
|
|
C++ destructor, resets the history stream on deletion.
|
|
|
|
Methods:
|
public: void BULLETIN_BOARD::add
(
|
|
|
BULLETIN*
|
// bulletin board
|
|
|
);
|
|
|
Adds a new
BULLETIN_BOARD to this delta state.
|
|
|
|
|
|
|
public: int BULLETIN_BOARD::add_dead_entity
(
|
|
|
ENTITY* ent
|
|
// entity
|
|
|
);
|
|
|
Add this to the dead entities list.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::can_be_moved
() const;
|
|
|
Returns whether or not the bulletin board can be moved.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::checked
() const;
|
|
|
Returns whether or not the bulletin board has been checked.
|
|
|
|
|
|
|
public: void
|
|
|
BULLETIN_BOARD::clear_dead_entity_list ();
|
|
|
Clear the dead entity list.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::clear_history_ptrs
();
|
|
|
Clear history pointers.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::closed
() const;
|
|
|
Returns
TRUE if the bulletin board closed successfully; otherwise, it returns
FALSE.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::corrupt
() const;
|
|
|
Returns the check status, whether or not any history streams are corrupt.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::debug
(
|
|
|
FILE*
|
// file name
|
|
|
|
= debug_file_ptr
|
|
|
) const;
|
|
|
Writes information about the bulletin board to the debug file or to the specified file.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::debug
(
|
|
|
int id,
|
// entity id
|
|
|
int level,
|
// entity level
|
|
|
FILE*
|
// file name
|
|
|
|
= debug_file_ptr
|
|
|
) const;
|
|
|
Writes information about the bulletin board to the debug file or to the specified file. The first two arguments specify a branch of the entity derivation hierarchy to call debug_ent on, in addition to the normal bulletin board debugging stuff.
|
|
|
|
|
|
|
public: DELTA_STATE* BULLETIN_BOARD::delta_state
(
|
|
|
) const;
|
|
|
Returns a pointer to the owner of the delta state.
|
|
|
|
|
|
|
public: BULLETIN*
|
|
|
BULLETIN_BOARD::end_bulletin () const;
|
|
|
Returns the last bulletin in the bulletin board.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::failure
() const;
|
|
|
Returns
TRUE if the bulletin board failed to close successfully; otherwise, it returns
FALSE.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::find_bulletins
(
|
|
|
int type,
|
// entity type
|
|
|
int level,
|
// entity level
|
|
|
BULLETIN_LIST& blist
|
// bulletin list
|
|
|
) const;
|
|
|
Function for finding annotations. The first two arguments specify a branch of the entity derivation hierarchy to return bulletins for. For annotation use, we can use
ANNOTATION_TYPE and
ANNOTATION_LEVEL. It may also be useful to be more specific, such as
SWEEP_ANNOTATION_TYPE and
SWEEP_ANNOTATION_LEVEL. The is_XXXX functions generated by the
ENTITY_DEF macro work well.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::find_bulletins
(
|
|
|
is_function tester,
|
// testing function
|
|
|
BULLETIN_LIST& blist
|
// bulletin list
|
|
|
) const;
|
|
|
Function for finding annotations. The first two arguments specify a branch of the entity derivation hierarchy to return bulletins for. In this form the tester identifies the type of entity to look for. For annotation use, we can use
ANNOTATION_TYPE and
ANNOTATION_LEVEL. It may also be useful to be more specific, such as
SWEEP_ANNOTATION_TYPE and
SWEEP_ANNOTATION_LEVEL. The is_XXXX functions generated by the
ENTITY_DEF macro work well.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::fix_pointers
(
|
|
|
ENTITY_ARRAY& elist,
|
// pointers to fix
|
|
|
DELTA_STATE_LIST& dslist
|
// delta state list
|
|
|
);
|
|
|
The
fix_pointers method for each entity in the restore array is called, with the array as argument. This calls
fix_common, which calls its parent's
fix_common, and then corrects any pointers in the derived class. In practice there is never anything special for
fix_pointers to do, but it is retained for consistency and compatibility. (Supplied by the
ENTITY_FUNCTIONS and
UTILITY_DEF macros.)
|
|
|
|
|
|
|
public: HISTORY_STREAM*
|
|
|
BULLETIN_BOARD::get_alternate_stream (
|
|
|
) const;
|
|
|
Get the history stream that the bulletin board needs to be in.
|
|
|
|
|
|
|
public: bb_check_status
|
|
|
BULLETIN_BOARD::get_check_status () const;
|
|
|
Returns the bulleting board check status, indicating whether the bulletin board has been checked or not, and the result of the checking.
|
|
|
|
|
|
|
public: HISTORY_STREAM*
|
|
|
BULLETIN_BOARD::history_stream (
|
|
|
) const;
|
|
|
Returns the history stream associated with the owner pointer.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::is_dead_entity
(
|
|
|
ENTITY* ent
|
|
// entity
|
|
|
);
|
|
|
Returns
TRUE if this is a dead entity.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::merge_next
(
|
|
|
logical rollback_set
|
// on/off indicator
|
|
|
);
|
|
|
Merges next bulletin into roll back history.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::mixed
() const;
|
|
|
Returns
TRUE if this is a mixed stream.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::mixed_streams
(
|
|
|
HISTORY_STREAM*& alternative_hs,// alternate
|
|
|
|
|
|
// stream
|
|
|
logical& move_fixes
|
|
// move fixes
|
|
|
|
= * (logical* )NULL_REF,
|
// or not
|
|
|
logical remove_bulls
|
|
// remove bulletins
|
|
|
|
= FALSE
|
|
// or not
|
|
|
);
|
|
|
Returns
TRUE if the bulletin board's history is not the same as the history in entities on the bulletin board.
|
|
|
|
|
|
|
public: BULLETIN_BOARD*
|
|
|
BULLETIN_BOARD::next () const;
|
|
|
Returns the next bulletin in the bulletin board.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::open
() const;
|
|
|
Returns
TRUE if the bulletin board opened successfully; otherwise, it returns
FALSE.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::pending
() const;
|
|
|
Returns whether or not a bulleting board merge is pending.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::remove
(
|
|
|
BULLETIN*
|
// bulletin board
|
|
|
);
|
|
|
Removes a bulletin board from this delta state.
|
|
|
|
|
|
|
public: int BULLETIN_BOARD::remove_dead_entity
(
|
|
|
ENTITY* ent
|
|
// entity
|
|
|
);
|
|
|
Remove this dead entity.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::restore
(
|
|
|
BULLETIN_BOARD* previous_bb
|
// previous state
|
|
|
logical ignore_string_version
|
// ingore version
|
|
|
|
= FALSE
|
|
// or not
|
|
|
);
|
|
|
Restores roll back to previous state.
|
|
|
if (!ignore_string_version && restore_version_number STRINGLESS_HISTORY_VERSION)
|
|
read_id
|
// id for bulletin board
|
|
read_pointer
|
// owning DELTA_STATE pointer
|
|
read_int
|
// status
|
|
if(read_int)
|
// if there is at least one bulletin
|
|
BULLETIN::restore
|
// Restore an individual bulletin
|
|
|
while(read_int)
|
// if there are more bulletins
|
|
|
|
|
|
|
BULLETIN::restore
|
// Restore an individual bulletin
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::roll
();
|
|
|
Rolls back over a complete delta state, inverting it so as to allow roll forward the next time.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::rollbacks_cleared
(
|
|
|
) const;
|
|
|
Returns whether or not rollbacks have been cleared.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::save
(
|
|
|
ENTITY_LIST& elist,
|
// entities
|
|
|
DELTA_STATE_LIST& dslist
|
// delta states
|
|
|
logical ignore_string_version
|
// ingore version
|
|
|
|
= FALSE
|
|
// or not
|
|
|
);
|
|
|
Saves the delta states and entities corresponding to this bulletin board.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::set_alternate_stream
(
|
|
|
HISTORY_STREAM* ahs
|
|
// alternate stream
|
|
|
);
|
|
|
Set the history stream that the bulletin board needs to be in.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::set_check_status
(
|
|
|
bb_check_status s
|
|
// status
|
|
|
);
|
|
|
Sets the check status.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::set_pending
(
|
|
|
logical pending_value
|
|
// value
|
|
|
);
|
|
|
Set the pending value.
|
|
|
|
|
|
|
public: void BULLETIN_BOARD::set_rollbacks_cleared
(
|
|
|
logical severed
|
|
// cleared
|
|
|
);
|
|
|
Merge method, set whether or not rollbacks are cleared on merge.
|
|
|
|
|
|
|
public: int BULLETIN_BOARD::size
(
|
|
|
logical include_backups
|
// include backups
|
|
|
|
= TRUE
|
// as part of the size
|
|
|
) const;
|
|
|
Returns the size of the bulletin board.
|
|
|
|
|
|
|
public: BULLETIN*
|
|
|
BULLETIN_BOARD::start_bulletin () const;
|
|
|
Returns the last bulletin in the bulletin board.
|
|
|
|
|
|
|
public: logical BULLETIN_BOARD::successful
() const;
|
|
|
Returns
TRUE if the bulletin-board closed successfully; otherwise, it returns
FALSE.
|
|
Internal Use:
|
full_size
|
|
|
|
|
Related Fncs:
|
abort_bb, change_state, clear_rollback_ptrs, close_bulletin_board, current_bb, current_delta_state, debug_delta_state, delete_all_delta_states, delete_ds_branch, get_default_stream, initialize_delta_states, open_bulletin_board, release_bb, set_default_stream
|