Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / ACE / apps / soreduce / Signature.h
blobf2be8aaae1f40a56366d6732cd2c93f65447d263
1 // -*- C++ -*-
2 // File: Signature.h
4 // Author: Phil Mesnier
7 #ifndef _SIGNATURE_H_
8 #define _SIGNATURE_H_
10 // Signature class encapsulates a single line of nm output. This line may be
11 // either an "undefined" name to be resolved, or text or data which resolves
12 // the unknowns. Some of the features of the Signature class are currently
13 // unused, such as owner_, which is anticipation of analysis that may lead to
14 // further code reduction. The premise being that unresolved symbols that are
15 // defined within otherwise unused code should not be resolved. However this
16 // information is not available in the output of nm. Further research is
17 // required.
19 // Signatures are reference counted to avoid duplication.
21 #include <ace/SString.h>
23 class Signature {
24 public:
26 enum Kind {
27 text_,
28 undef_
31 Signature (const ACE_CString &);
32 void used ();
33 int used_count() const;
35 const ACE_CString &name() const;
37 Signature *dup();
38 void release();
40 private:
41 ACE_CString name_;
42 int ref_count_;
43 int used_;
44 Signature * owner_;
45 Kind kind_;
48 #endif